diff options
author | Alexander Galazin <alexander.galazin@arm.com> | 2017-05-11 14:27:20 +0200 |
---|---|---|
committer | Pyry Haulos <phaulos@google.com> | 2017-05-15 13:16:54 -0700 |
commit | 102cfe8b1147c7bada5ed5bcb0430743fc1a1a63 (patch) | |
tree | ce17f3e4d04b5607373df5ce6c5b100be3edb47e | |
parent | 148890e79faa5c5dda04f73c0162553b640f04d0 (diff) | |
download | deqp-102cfe8b1147c7bada5ed5bcb0430743fc1a1a63.tar.gz |
Fix texture/sampler mapping in sRGB tests
sRGB decode tests assume that an API side texture with index i
is connected with a shader sampler variable uTexture with index i.
This relation was however incorrectly established, e.g.
the tests were mapping texture0 to a sampler with location 0, while
such sampler was not necessarily uTexture0.
This change fixes the mapping and makes the relation more obvious.
Components: AOSP
Affects:
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.*.toggled
dEQP-GLES31.functional.srgb_texture_decode.skip_decode.*.conversion_gpu
Google bug: 38257749
Change-Id: I16508f6033b31583b1c5973b70a610dd59e78e8f
(cherry picked from commit c8efb45eadba4a910ab5770b2207582cf1bb7ca0)
-rw-r--r-- | modules/gles31/functional/es31fSRGBDecodeTests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gles31/functional/es31fSRGBDecodeTests.cpp b/modules/gles31/functional/es31fSRGBDecodeTests.cpp index d3f947f35..41e3a8ced 100644 --- a/modules/gles31/functional/es31fSRGBDecodeTests.cpp +++ b/modules/gles31/functional/es31fSRGBDecodeTests.cpp @@ -42,6 +42,7 @@ #include "gluObjectWrapper.hpp" #include "gluStrUtil.hpp" #include "tcuTestLog.hpp" +#include "deStringUtil.hpp" namespace deqp { @@ -1318,7 +1319,7 @@ void SRGBTestCase::render (void) { gl.activeTexture(GL_TEXTURE0 + (glw::GLenum)textureSourceIdx); gl.bindTexture(m_textureSourceList[textureSourceIdx]->getGLTargetType(), m_textureSourceList[textureSourceIdx]->getHandle()); - glw::GLuint samplerUniformLocationID = gl.getUniformLocation(m_shaderProgramList[0]->getHandle(), m_shaderProgramList[0]->getUniformAtLocation(textureSourceIdx).name.c_str()); + glw::GLuint samplerUniformLocationID = gl.getUniformLocation(m_shaderProgramList[0]->getHandle(), (std::string("uTexture") + de::toString(textureSourceIdx)).c_str()); TCU_CHECK(samplerUniformLocationID != (glw::GLuint)-1); gl.uniform1i(samplerUniformLocationID, (glw::GLenum)textureSourceIdx); } @@ -1742,7 +1743,7 @@ void DecodeToggledCase::render (void) { gl.activeTexture(GL_TEXTURE0 + (glw::GLenum)textureSourceIdx); gl.bindTexture(m_textureSourceList[textureSourceIdx]->getGLTargetType(), m_textureSourceList[textureSourceIdx]->getHandle()); - glw::GLuint samplerUniformLocationID = gl.getUniformLocation(m_shaderProgramList[programIdx]->getHandle(), m_shaderProgramList[programIdx]->getUniformAtLocation(textureSourceIdx).name.c_str()); + glw::GLuint samplerUniformLocationID = gl.getUniformLocation(m_shaderProgramList[programIdx]->getHandle(), (std::string("uTexture") + de::toString(textureSourceIdx)).c_str()); TCU_CHECK(samplerUniformLocationID != (glw::GLuint) - 1); gl.uniform1i(samplerUniformLocationID, (glw::GLenum)textureSourceIdx); } |