Only use single-mipped MS images when testing textureSamples()
authorDominik Witczak <Dominik.Witczak@amd.com>
Fri, 15 Jul 2016 07:15:01 +0000 (09:15 +0200)
committerPyry Haulos <phaulos@google.com>
Fri, 22 Jul 2016 20:43:29 +0000 (13:43 -0700)
This MR changes two aspects of the
dEQP-VK.glsl.texture_functions.query.texturesamples tests:

 * Only MS images are now bound to sampled image bindings.
 * As per recent spec clarification, MS images should always be
single-mipped.

Fixes #432

external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTextureFunctionTests.cpp

index 8f428cc..371698a 100644 (file)
@@ -1734,7 +1734,7 @@ void ShaderRenderCaseInstance::useSampler (deUint32 bindingLocation, deUint32 te
 
                texFormat                                                                       = texture.getFormat();
                texSize                                                                         = tcu::UVec3(texture.getWidth(), texture.getHeight(), 1u);
-               mipLevels                                                                       = (deUint32)texture.getNumLevels();
+               mipLevels                                                                       = isMSTexture ? 1u : (deUint32)texture.getNumLevels();
                arrayLayers                                                                     = 1u;
 
                textureData.resize(mipLevels);
@@ -1753,7 +1753,7 @@ void ShaderRenderCaseInstance::useSampler (deUint32 bindingLocation, deUint32 te
 
                texFormat                                                                       = texture.getFormat();
                texSize                                                                         = tcu::UVec3(texture.getSize(), texture.getSize(), 1u);
-               mipLevels                                                                       = (deUint32)texture.getNumLevels();
+               mipLevels                                                                       = isMSTexture ? 1u : (deUint32)texture.getNumLevels();
                arrayLayers                                                                     = 6u;
 
                static const tcu::CubeFace              cubeFaceMapping[tcu::CUBEFACE_LAST] =
@@ -1787,7 +1787,7 @@ void ShaderRenderCaseInstance::useSampler (deUint32 bindingLocation, deUint32 te
 
                texFormat                                                                       = texture.getFormat();
                texSize                                                                         = tcu::UVec3(texture.getWidth(), texture.getHeight(), 1u);
-               mipLevels                                                                       = (deUint32)texture.getNumLevels();
+               mipLevels                                                                       = isMSTexture ? 1u : (deUint32)texture.getNumLevels();
                arrayLayers                                                                     = (deUint32)texture.getNumLayers();
 
                textureData.resize(mipLevels);
@@ -1814,7 +1814,7 @@ void ShaderRenderCaseInstance::useSampler (deUint32 bindingLocation, deUint32 te
 
                texFormat                                                                       = texture.getFormat();
                texSize                                                                         = tcu::UVec3(texture.getWidth(), texture.getHeight(), texture.getDepth());
-               mipLevels                                                                       = (deUint32)texture.getNumLevels();
+               mipLevels                                                                       = isMSTexture ? 1u : (deUint32)texture.getNumLevels();
                arrayLayers                                                                     = 1u;
 
                textureData.resize(mipLevels);
index a0e24b3..f696690 100644 (file)
@@ -1703,7 +1703,6 @@ TextureSamplesInstance::TextureSamplesInstance (Context&                          context,
 
                static const vk::VkSampleCountFlagBits  sampleFlags[]   =
                {
-                       vk::VK_SAMPLE_COUNT_1_BIT,
                        vk::VK_SAMPLE_COUNT_2_BIT,
                        vk::VK_SAMPLE_COUNT_4_BIT,
                        vk::VK_SAMPLE_COUNT_8_BIT,