Avoid 32-bit precision issues in ShaderRender tests
authorMaciej Jesionowski <maciej.jesionowski@amd.com>
Wed, 4 Oct 2017 17:08:12 +0000 (19:08 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 6 Oct 2017 21:24:47 +0000 (17:24 -0400)
These tests are very sensitive to floating-point precision. The default
GRID_SIZE of 90 units is problematic in 32-bit mode. The error is
visible only in Release builds and affects CPU-generated reference
image.

Affects:
* dEQP-VK.glsl.texture_functions.*
* dEQP-VK.glsl.operator.*

VK-GL-CTS issue: 751
Components: Vulkan

Change-Id: I0ca501e180339cd0e1430cab3eb08a14f68f9802

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

index 246d7bc..baebda4 100644 (file)
@@ -564,7 +564,8 @@ ShaderOperatorCaseInstance::ShaderOperatorCaseInstance (Context&                            context,
                                                                                                                const ShaderEvaluator&  evaluator,
                                                                                                                const UniformSetup&             uniformSetup,
                                                                                                                const ShaderDataSpec    spec)
-       : ShaderRenderCaseInstance      (context, isVertexCase, evaluator, uniformSetup, DE_NULL)
+       : ShaderRenderCaseInstance      (context, isVertexCase, evaluator, uniformSetup, DE_NULL, IMAGE_BACKING_MODE_REGULAR,
+                                                               (isVertexCase ? 92 : GRID_SIZE_DEFAULT_FRAGMENT))
        , m_spec                                        (spec)
 {
        // Setup the user attributes.
index 43dc78b..be2e679 100644 (file)
@@ -686,7 +686,8 @@ ShaderTextureFunctionInstance::ShaderTextureFunctionInstance (Context&                                              cont
                                                                                                                          const TextureSpec&                    textureSpec,
                                                                                                                          const TexLookupParams&                lookupParams,
                                                                                                                          const ImageBackingMode                imageBackingMode)
-       : ShaderRenderCaseInstance      (context, isVertexCase, evaluator, uniformSetup, DE_NULL, imageBackingMode)
+       : ShaderRenderCaseInstance      (context, isVertexCase, evaluator, uniformSetup, DE_NULL, imageBackingMode,
+                                                               (isVertexCase ? 92 : GRID_SIZE_DEFAULT_FRAGMENT))
        , m_lookupSpec                          (lookupSpec)
        , m_textureSpec                         (textureSpec)
        , m_lookupParams                        (lookupParams)