OpaqueTypeIndexingTests: fixed cubeshadow sampler - valid coords setup
authorasokolow <aleksy.sokolowski@intel.com>
Tue, 19 Jan 2016 08:08:13 +0000 (09:08 +0100)
committerPiotrowski, Piotr <piotr.piotrowski@intel.com>
Tue, 19 Jan 2016 12:31:01 +0000 (13:31 +0100)
external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp

index 8077972bf5ffd09c44f874bbc9b46cc9079a8551..248cd986744e93ad3144b43ff33948cc700e5fc0 100644 (file)
@@ -459,6 +459,26 @@ tcu::TestStatus SamplerIndexingCaseInstance::iterate (void)
 
        coords.resize(numInvocations * getDataTypeScalarSize(coordType));
 
+       if (texType == TEXTURE_TYPE_CUBE)
+       {
+               if (isShadowSampler(m_samplerType))
+               {
+                       for (int i = 0; i < coords.size() / 4; i++)
+                       {
+                               coords[4 * i] = 1.0f;
+                               coords[4 * i + 1] = coords[4 * i + 2] = coords[4 * i + 3] = 0.0f;
+                       }
+               }
+               else
+               {
+                       for (int i = 0; i < coords.size() / 3; i++)
+                       {
+                               coords[3 * i] = 1.0f;
+                               coords[3 * i + 1] = coords[3 * i + 2] = 0.0f;
+                       }
+               }
+       }
+
        if (isShadowSampler(m_samplerType))
        {
                // Use different comparison value per invocation.