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

Side by Side Diff: gpu/command_buffer/service/context_group.cc

Issue 3122033: Adds support for EXT_framebuffer_multisample... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "app/gfx/gl/gl_implementation.h" 5 #include "app/gfx/gl/gl_implementation.h"
6 #include "gpu/command_buffer/service/context_group.h" 6 #include "gpu/command_buffer/service/context_group.h"
7 #include "gpu/command_buffer/common/id_allocator.h" 7 #include "gpu/command_buffer/common/id_allocator.h"
8 #include "gpu/command_buffer/service/buffer_manager.h" 8 #include "gpu/command_buffer/service/buffer_manager.h"
9 #include "gpu/command_buffer/service/framebuffer_manager.h" 9 #include "gpu/command_buffer/service/framebuffer_manager.h"
10 #include "gpu/command_buffer/service/program_manager.h" 10 #include "gpu/command_buffer/service/program_manager.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 if (enable_texture_half_float) { 137 if (enable_texture_half_float) {
138 validators_.pixel_type.AddValue(GL_HALF_FLOAT_OES); 138 validators_.pixel_type.AddValue(GL_HALF_FLOAT_OES);
139 AddExtensionString("GL_OES_texture_half_float"); 139 AddExtensionString("GL_OES_texture_half_float");
140 if (enable_texture_half_float_linear) { 140 if (enable_texture_half_float_linear) {
141 AddExtensionString("GL_OES_texture_half_float_linear"); 141 AddExtensionString("GL_OES_texture_half_float_linear");
142 } 142 }
143 } 143 }
144 144
145 // Check for multisample support
146 if (strstr(extensions, "GL_EXT_framebuffer_multisample")) {
147 extension_flags_.ext_framebuffer_multisample = true;
148 validators_.frame_buffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT);
149 validators_.frame_buffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT);
150 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT);
151 validators_.g_l_state.AddValue(GL_DRAW_FRAMEBUFFER_BINDING_EXT);
152 validators_.render_buffer_parameter.AddValue(GL_MAX_SAMPLES_EXT);
153 AddExtensionString("GL_EXT_framebuffer_multisample");
154 AddExtensionString("GL_EXT_framebuffer_blit");
155 }
156
145 // TODO(gman): Add support for these extensions. 157 // TODO(gman): Add support for these extensions.
146 // GL_OES_depth24 158 // GL_OES_depth24
147 // GL_OES_depth32 159 // GL_OES_depth32
148 // GL_OES_packed_depth_stencil 160 // GL_OES_packed_depth_stencil
149 // GL_OES_element_index_uint 161 // GL_OES_element_index_uint
150 162
151 buffer_manager_.reset(new BufferManager()); 163 buffer_manager_.reset(new BufferManager());
152 framebuffer_manager_.reset(new FramebufferManager()); 164 framebuffer_manager_.reset(new FramebufferManager());
153 renderbuffer_manager_.reset(new RenderbufferManager()); 165 renderbuffer_manager_.reset(new RenderbufferManager());
154 shader_manager_.reset(new ShaderManager()); 166 shader_manager_.reset(new ShaderManager());
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 253 }
242 IdAllocator* id_allocator = new IdAllocator(); 254 IdAllocator* id_allocator = new IdAllocator();
243 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator); 255 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator);
244 return id_allocator; 256 return id_allocator;
245 } 257 }
246 258
247 } // namespace gles2 259 } // namespace gles2
248 } // namespace gpu 260 } // namespace gpu
249 261
250 262
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698