From: Jarkko Pöyry Date: Thu, 26 Feb 2015 02:14:28 +0000 (-0800) Subject: Vary fragment shader in separate shader random tests. X-Git-Tag: upstream/0.1.0~1921^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b6b88e78c917d9367258c0905cd7e85b8538471;p=platform%2Fupstream%2FVK-GL-CTS.git Vary fragment shader in separate shader random tests. - Use supplied random seed in genFrgShaderSrc to vary generated fragment shaders slightly. This prevents random test cases from always using identical fragment shader pipeline programs. Prior to this CL, the supplied random seed was unused. Change-Id: Ib74b16cc92f41181a415966a4f2e4feab83781af --- diff --git a/modules/gles31/functional/es31fSeparateShaderTests.cpp b/modules/gles31/functional/es31fSeparateShaderTests.cpp index a387e97e4..71c7be275 100644 --- a/modules/gles31/functional/es31fSeparateShaderTests.cpp +++ b/modules/gles31/functional/es31fSeparateShaderTests.cpp @@ -551,7 +551,14 @@ string genFrgShaderSrc (deUint32 seed, if (inputs.size() > 0) { - oss << "\t" << "switch (imod(int(0.5 * (gl_FragCoord.x - gl_FragCoord.y)), " + oss << "\t" + << "switch (imod(int(0.5 * ("; + + printFloat(oss, rnd.getFloat(0.5f, 2.0f)); + oss << " * gl_FragCoord.x - "; + + printFloat(oss, rnd.getFloat(0.5f, 2.0f)); + oss << " * gl_FragCoord.y)), " << inputs.size() << "))" << "\n" << "\t" << "{" << "\n";