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

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

Issue 18492005: Add GL_EXT_multisampled_render_to_texture support to command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved ahead to TOT Created 7 years, 5 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 | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/feature_info.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/command_buffer/service/context_group.h" 5 #include "gpu/command_buffer/service/context_group.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 const GLint kMinRenderbufferSize = 512; // GL says 1 pixel! 94 const GLint kMinRenderbufferSize = 512; // GL says 1 pixel!
95 GLint max_renderbuffer_size = 0; 95 GLint max_renderbuffer_size = 0;
96 if (!QueryGLFeature( 96 if (!QueryGLFeature(
97 GL_MAX_RENDERBUFFER_SIZE, kMinRenderbufferSize, 97 GL_MAX_RENDERBUFFER_SIZE, kMinRenderbufferSize,
98 &max_renderbuffer_size)) { 98 &max_renderbuffer_size)) {
99 LOG(ERROR) << "ContextGroup::Initialize failed because maximum " 99 LOG(ERROR) << "ContextGroup::Initialize failed because maximum "
100 << "renderbuffer size too small."; 100 << "renderbuffer size too small.";
101 return false; 101 return false;
102 } 102 }
103 GLint max_samples = 0; 103 GLint max_samples = 0;
104 if (feature_info_->feature_flags().chromium_framebuffer_multisample) { 104 if (feature_info_->feature_flags().chromium_framebuffer_multisample ||
105 glGetIntegerv(GL_MAX_SAMPLES, &max_samples); 105 feature_info_->feature_flags().multisampled_render_to_texture) {
106 if (feature_info_->feature_flags(
107 ).use_img_for_multisampled_render_to_texture) {
108 glGetIntegerv(GL_MAX_SAMPLES_IMG, &max_samples);
109 } else {
110 glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
111 }
106 } 112 }
107 113
108 if (feature_info_->feature_flags().ext_draw_buffers) { 114 if (feature_info_->feature_flags().ext_draw_buffers) {
109 GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &max_color_attachments_); 115 GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &max_color_attachments_);
110 if (max_color_attachments_ < 1) 116 if (max_color_attachments_ < 1)
111 max_color_attachments_ = 1; 117 max_color_attachments_ = 1;
112 GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers_); 118 GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers_);
113 if (max_draw_buffers_ < 1) 119 if (max_draw_buffers_ < 1)
114 max_draw_buffers_ = 1; 120 max_draw_buffers_ = 1;
115 draw_buffer_ = GL_BACK; 121 draw_buffer_ = GL_BACK;
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 GLenum pname, GLint min_required, uint32* v) { 377 GLenum pname, GLint min_required, uint32* v) {
372 uint32 value = 0; 378 uint32 value = 0;
373 GetIntegerv(pname, &value); 379 GetIntegerv(pname, &value);
374 bool result = CheckGLFeatureU(min_required, &value); 380 bool result = CheckGLFeatureU(min_required, &value);
375 *v = value; 381 *v = value;
376 return result; 382 return result;
377 } 383 }
378 384
379 } // namespace gles2 385 } // namespace gles2
380 } // namespace gpu 386 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698