From 065cde5304da4f2d89e0c8d422870917453a383e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Fri, 3 Apr 2015 12:43:15 -0700 Subject: [PATCH] Fix clearing SRGB renderbuffers in copy image tests. Bug: 19897810 Change-Id: I7a57bfcbebf7137aac8ebebbde1905310c0e741b --- modules/gles31/functional/es31fCopyImageTests.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/gles31/functional/es31fCopyImageTests.cpp b/modules/gles31/functional/es31fCopyImageTests.cpp index 55df903..0b02266 100644 --- a/modules/gles31/functional/es31fCopyImageTests.cpp +++ b/modules/gles31/functional/es31fCopyImageTests.cpp @@ -664,7 +664,7 @@ void genRenderbufferImage (const glw::Functions& gl, gl.clearBufferfv(GL_COLOR, 0, (const float*)&color); GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to clear renderbuffer."); - tcu::clear(refAccess, color); + tcu::clear(refAccess, (tcu::isSRGB(format) ? tcu::linearToSRGB(color) : color)); } else if (isIntFormat(info.getFormat())) { @@ -673,6 +673,7 @@ void genRenderbufferImage (const glw::Functions& gl, gl.clearBufferiv(GL_COLOR, 0, (const deInt32*)&color); GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to clear renderbuffer."); + DE_ASSERT(!tcu::isSRGB(format)); tcu::clear(refAccess, color); } else if (isUintFormat(info.getFormat())) @@ -682,6 +683,7 @@ void genRenderbufferImage (const glw::Functions& gl, gl.clearBufferuiv(GL_COLOR, 0, (const deUint32*)&color); GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to clear renderbuffer."); + DE_ASSERT(!tcu::isSRGB(format)); tcu::clear(refAccess, color); } else @@ -692,7 +694,7 @@ void genRenderbufferImage (const glw::Functions& gl, gl.clear(GL_COLOR_BUFFER_BIT); GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to clear renderbuffer."); - tcu::clear(refAccess, color); + tcu::clear(refAccess, (tcu::isSRGB(format) ? tcu::linearToSRGB(color) : color)); } } } -- 2.7.4