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

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

Issue 2098913002: GLVersionInfo: alse detect es3 support with extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix references to IsES3Capable Created 4 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 | « no previous file | gpu/command_buffer/service/feature_info.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 (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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers_); 161 GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers_);
162 if (max_draw_buffers_ < 1) 162 if (max_draw_buffers_ < 1)
163 max_draw_buffers_ = 1; 163 max_draw_buffers_ = 1;
164 } 164 }
165 if (feature_info_->feature_flags().ext_blend_func_extended) { 165 if (feature_info_->feature_flags().ext_blend_func_extended) {
166 GetIntegerv(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT, 166 GetIntegerv(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT,
167 &max_dual_source_draw_buffers_); 167 &max_dual_source_draw_buffers_);
168 DCHECK(max_dual_source_draw_buffers_ >= 1); 168 DCHECK(max_dual_source_draw_buffers_ >= 1);
169 } 169 }
170 170
171 if (feature_info_->gl_version_info().IsES3Capable()) { 171 if (feature_info_->gl_version_info().is_es3_capable) {
172 const GLint kMinTransformFeedbackSeparateAttribs = 4; 172 const GLint kMinTransformFeedbackSeparateAttribs = 4;
173 if (!QueryGLFeatureU(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, 173 if (!QueryGLFeatureU(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
174 kMinTransformFeedbackSeparateAttribs, 174 kMinTransformFeedbackSeparateAttribs,
175 &max_transform_feedback_separate_attribs_)) { 175 &max_transform_feedback_separate_attribs_)) {
176 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum " 176 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum "
177 << "transform feedback separate attribs is too small (" 177 << "transform feedback separate attribs is too small ("
178 << max_transform_feedback_separate_attribs_ << ", should be " 178 << max_transform_feedback_separate_attribs_ << ", should be "
179 << kMinTransformFeedbackSeparateAttribs << ")."; 179 << kMinTransformFeedbackSeparateAttribs << ").";
180 return false; 180 return false;
181 } 181 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 return false; 248 return false;
249 } 249 }
250 if (!QueryGLFeature(GL_MAX_CUBE_MAP_TEXTURE_SIZE, kMinCubeMapSize, 250 if (!QueryGLFeature(GL_MAX_CUBE_MAP_TEXTURE_SIZE, kMinCubeMapSize,
251 &max_cube_map_texture_size)) { 251 &max_cube_map_texture_size)) {
252 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum " 252 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum "
253 << "cube texture size is too small (" 253 << "cube texture size is too small ("
254 << max_cube_map_texture_size << ", should be " 254 << max_cube_map_texture_size << ", should be "
255 << kMinCubeMapSize << ")."; 255 << kMinCubeMapSize << ").";
256 return false; 256 return false;
257 } 257 }
258 if (feature_info_->gl_version_info().IsES3Capable() && 258 if (feature_info_->gl_version_info().is_es3_capable &&
259 !QueryGLFeature(GL_MAX_3D_TEXTURE_SIZE, kMin3DTextureSize, 259 !QueryGLFeature(GL_MAX_3D_TEXTURE_SIZE, kMin3DTextureSize,
260 &max_3d_texture_size)) { 260 &max_3d_texture_size)) {
261 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum " 261 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum "
262 << "3d texture size is too small (" << max_3d_texture_size 262 << "3d texture size is too small (" << max_3d_texture_size
263 << ", should be " << kMin3DTextureSize << ")."; 263 << ", should be " << kMin3DTextureSize << ").";
264 return false; 264 return false;
265 } 265 }
266 if (feature_info_->gl_version_info().IsES3Capable() && 266 if (feature_info_->gl_version_info().is_es3_capable &&
267 !QueryGLFeature(GL_MAX_ARRAY_TEXTURE_LAYERS, kMinArrayTextureLayers, 267 !QueryGLFeature(GL_MAX_ARRAY_TEXTURE_LAYERS, kMinArrayTextureLayers,
268 &max_array_texture_layers)) { 268 &max_array_texture_layers)) {
269 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum " 269 DLOG(ERROR) << "ContextGroup::Initialize failed because maximum "
270 << "array texture layers is too small (" 270 << "array texture layers is too small ("
271 << max_array_texture_layers 271 << max_array_texture_layers
272 << ", should be " << kMinArrayTextureLayers << ")."; 272 << ", should be " << kMinArrayTextureLayers << ").";
273 return false; 273 return false;
274 } 274 }
275 if (feature_info_->feature_flags().arb_texture_rectangle && 275 if (feature_info_->feature_flags().arb_texture_rectangle &&
276 !QueryGLFeature(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, 276 !QueryGLFeature(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB,
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 GLuint client_id, GLuint* service_id) const { 592 GLuint client_id, GLuint* service_id) const {
593 Buffer* buffer = buffer_manager_->GetBuffer(client_id); 593 Buffer* buffer = buffer_manager_->GetBuffer(client_id);
594 if (!buffer) 594 if (!buffer)
595 return false; 595 return false;
596 *service_id = buffer->service_id(); 596 *service_id = buffer->service_id();
597 return true; 597 return true;
598 } 598 }
599 599
600 } // namespace gles2 600 } // namespace gles2
601 } // namespace gpu 601 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698