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

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

Issue 2474593002: Float formats are allowed for CopyTexImage with EXT_color_buffer_float (Closed)
Patch Set: Created 4 years, 1 month 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
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 89224142d9d653ecc0d4fe50762c2d901dfeab8a..d30a3e831924b2412daf1f3c1504e8fdbf0103c0 100644
--- a/gpu/command_buffer/service/test_helper.cc
+++ b/gpu/command_buffer/service/test_helper.cc
@@ -538,7 +538,8 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
if ((strstr(extensions, "GL_ARB_texture_float") ||
gl_info.is_desktop_core_profile) ||
- (gl_info.is_es3 && strstr(extensions, "GL_EXT_color_buffer_float"))) {
+ (gl_info.is_es3 && strstr(extensions, "GL_OES_texture_float") &&
qiankun 2016/11/02 10:30:05 GL_OES_texture_float is needed for this condition,
+ strstr(extensions, "GL_EXT_color_buffer_float"))) {
static const GLuint tx_ids[] = {101, 102};
static const GLuint fb_ids[] = {103, 104};
const GLsizei width = 16;
@@ -575,6 +576,7 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
EXPECT_CALL(*gl, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
.WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
.RetiresOnSaturation();
+ GLenum status_rgba = GL_FRAMEBUFFER_COMPLETE;
EXPECT_CALL(*gl, TexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F, width, width, 0,
GL_RGB, GL_FLOAT, _))
.Times(1)
@@ -587,7 +589,9 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
EXPECT_CALL(*gl, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
.WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
.RetiresOnSaturation();
+ }
+ if (status_rgba == GL_FRAMEBUFFER_COMPLETE) {
qiankun 2016/11/02 10:30:05 see discussion in https://codereview.chromium.org/
if (enable_es3 && gl_info.is_es3_capable) {
EXPECT_CALL(*gl, TexImage2D(GL_TEXTURE_2D, 0, GL_R16F, width, width,
0, GL_RED, GL_FLOAT, _))

Powered by Google App Engine
This is Rietveld 408576698