Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(829)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h

Issue 2298613010: gpu, cmaa: copy RGBA8 texture via glCopyTexSubImage2D() instead of imageStore(). (Closed)
Patch Set: fix small errata Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_
7 7
8 #include "gpu/command_buffer/service/gl_utils.h" 8 #include "gpu/command_buffer/service/gl_utils.h"
9 #include "gpu/gpu_export.h" 9 #include "gpu/gpu_export.h"
10 10
(...skipping 26 matching lines...) Expand all
37 void ApplyFramebufferAttachmentCMAAINTEL(gles2::GLES2Decoder* decoder, 37 void ApplyFramebufferAttachmentCMAAINTEL(gles2::GLES2Decoder* decoder,
38 gles2::Framebuffer* framebuffer); 38 gles2::Framebuffer* framebuffer);
39 39
40 private: 40 private:
41 // Applies the CMAA algorithm to a texture. 41 // Applies the CMAA algorithm to a texture.
42 void ApplyCMAAEffectTexture(GLuint source_texture, GLuint dest_texture); 42 void ApplyCMAAEffectTexture(GLuint source_texture, GLuint dest_texture);
43 43
44 void OnSize(GLint width, GLint height); 44 void OnSize(GLint width, GLint height);
45 void ReleaseTextures(); 45 void ReleaseTextures();
46 46
47 void CopyTexture(GLint source, GLint dest, bool via_fbo); 47 void CopyTexture(GLint dest);
48 GLuint CreateProgram(const char* defines, 48 GLuint CreateProgram(const char* defines,
49 const char* vs_source, 49 const char* vs_source,
50 const char* fs_source); 50 const char* fs_source);
51 GLuint CreateShader(GLenum type, const char* defines, const char* source); 51 GLuint CreateShader(GLenum type, const char* defines, const char* source);
52 52
53 bool initialized_; 53 bool initialized_;
54 bool textures_initialized_; 54 bool textures_initialized_;
55 bool is_in_gamma_correct_mode_; 55 bool is_in_gamma_correct_mode_;
56 bool supports_usampler_; 56 bool supports_usampler_;
57 bool supports_r8_image_; 57 bool supports_r8_image_;
58 bool supports_r8_read_format_; 58 bool supports_r8_read_format_;
59 bool is_gles31_compatible_; 59 bool is_gles31_compatible_;
60 60
61 int frame_id_; 61 int frame_id_;
62 62
63 GLint width_; 63 GLint width_;
64 GLint height_; 64 GLint height_;
65 65
66 GLuint copy_to_framebuffer_shader_;
67 GLuint copy_to_image_shader_;
68 GLuint edges0_shader_; 66 GLuint edges0_shader_;
69 GLuint edges1_shader_; 67 GLuint edges1_shader_;
70 GLuint edges_combine_shader_; 68 GLuint edges_combine_shader_;
71 GLuint process_and_apply_shader_; 69 GLuint process_and_apply_shader_;
72 GLuint debug_display_edges_shader_; 70 GLuint debug_display_edges_shader_;
73 71
74 GLuint cmaa_framebuffer_; 72 GLuint cmaa_framebuffer_;
75 GLuint copy_framebuffer_; 73 GLuint copy_framebuffer_;
76 74
77 GLuint rgba8_texture_; 75 GLuint rgba8_texture_;
78 GLuint working_color_texture_; 76 GLuint working_color_texture_;
79 GLuint edges0_texture_; 77 GLuint edges0_texture_;
80 GLuint edges1_texture_; 78 GLuint edges1_texture_;
81 GLuint mini4_edge_texture_; 79 GLuint mini4_edge_texture_;
82 GLuint mini4_edge_depth_texture_; 80 GLuint mini4_edge_depth_texture_;
83 81
84 GLuint edges1_shader_result_texture_float4_slot1_; 82 GLuint edges1_shader_result_texture_float4_slot1_;
85 GLuint edges1_shader_result_texture_; 83 GLuint edges1_shader_result_texture_;
86 GLuint edges_combine_shader_result_texture_float4_slot1_; 84 GLuint edges_combine_shader_result_texture_float4_slot1_;
87 GLuint process_and_apply_shader_result_texture_float4_slot1_; 85 GLuint process_and_apply_shader_result_texture_float4_slot1_;
88 GLuint edges_combine_shader_result_texture_slot2_; 86 GLuint edges_combine_shader_result_texture_slot2_;
89 GLuint copy_to_image_shader_outTexture_;
90 87
91 static const char vert_str_[]; 88 static const char vert_str_[];
92 static const char cmaa_frag_s1_[]; 89 static const char cmaa_frag_s1_[];
93 static const char cmaa_frag_s2_[]; 90 static const char cmaa_frag_s2_[];
94 static const char copy_frag_str_[];
95 91
96 DISALLOW_COPY_AND_ASSIGN(ApplyFramebufferAttachmentCMAAINTELResourceManager); 92 DISALLOW_COPY_AND_ASSIGN(ApplyFramebufferAttachmentCMAAINTELResourceManager);
97 }; 93 };
98 94
99 } // namespace gles2 95 } // namespace gles2
100 } // namespace gpu 96 } // namespace gpu
101 97
102 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMA A_INTEL_H_ 98 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMA A_INTEL_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698