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

Unified Diff: gpu/command_buffer/service/test_helper.cc

Issue 2009073002: command_buffer: Guard on extension and profiles in the decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check for GL errors in the unittest Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/test_helper.cc
diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc
index 7f265328a548353f939763f45f767a4b0dab0220..3ad2093b7eba1b9476a22b6901d79f43b24f8e2d 100644
--- a/gpu/command_buffer/service/test_helper.cc
+++ b/gpu/command_buffer/service/test_helper.cc
@@ -343,7 +343,7 @@ void TestHelper::SetupContextGroupInitExpectations(
.RetiresOnSaturation();
if (strstr(extensions, "GL_EXT_framebuffer_multisample") ||
strstr(extensions, "GL_EXT_multisampled_render_to_texture") ||
- gl_info.is_es3) {
+ gl_info.is_es3 || gl_info.is_desktop_core_profile) {
EXPECT_CALL(*gl, GetIntegerv(GL_MAX_SAMPLES, _))
.WillOnce(SetArgumentPointee<1>(kMaxSamples))
.RetiresOnSaturation();
@@ -353,6 +353,18 @@ void TestHelper::SetupContextGroupInitExpectations(
.RetiresOnSaturation();
}
+ if (strstr(extensions, "GL_EXT_draw_buffers") ||
+ strstr(extensions, "GL_ARB_draw_buffers") ||
+ (gl_info.is_es3 && strstr(extensions, "GL_NV_draw_buffers")) ||
+ gl_info.is_desktop_core_profile) {
+ EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _))
+ .WillOnce(SetArgumentPointee<1>(8))
+ .RetiresOnSaturation();
+ EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, _))
+ .WillOnce(SetArgumentPointee<1>(8))
+ .RetiresOnSaturation();
+ }
+
if (gl_info.IsAtLeastGL(3, 3) ||
(gl_info.IsAtLeastGL(3, 2) &&
strstr(extensions, "GL_ARB_blend_func_extended")) ||
@@ -396,7 +408,8 @@ void TestHelper::SetupContextGroupInitExpectations(
.WillOnce(SetArgumentPointee<1>(kMaxArrayTextureLayers))
.RetiresOnSaturation();
}
- if (strstr(extensions, "GL_ARB_texture_rectangle")) {
+ if (strstr(extensions, "GL_ARB_texture_rectangle") ||
+ gl_info.is_desktop_core_profile) {
EXPECT_CALL(*gl, GetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE, _))
.WillOnce(SetArgumentPointee<1>(kMaxRectangleTextureSize))
.RetiresOnSaturation();
@@ -408,7 +421,7 @@ void TestHelper::SetupContextGroupInitExpectations(
.WillOnce(SetArgumentPointee<1>(kMaxVertexTextureImageUnits))
.RetiresOnSaturation();
- if (gl_info.is_es) {
+ if (gl_info.is_es || gl_info.is_desktop_core_profile) {
EXPECT_CALL(*gl, GetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, _))
.WillOnce(SetArgumentPointee<1>(kMaxFragmentUniformVectors))
.RetiresOnSaturation();
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698