Avoid out-of-range depth values
authorPiers Daniell <pdaniell@nvidia.com>
Tue, 8 Aug 2017 22:03:35 +0000 (16:03 -0600)
committerDaniel Koch <dkoch@nvidia.com>
Tue, 16 Jan 2018 23:47:15 +0000 (18:47 -0500)
commit98b6348344b9ded839e0596532e64d8cbbc83e39
tree08d21c160c886229d611e8a7f117855830ce0c7a
parent0a8f84ca1d950406b02372942902a286137f1fe0
Avoid out-of-range depth values

The "d32_sfloat_large_depth" variants of the
dEQP-VK.glsl.builtin_var.fragdepth.* tests rely on undefined behavior
because it uses an out-of-range depth value. The unextended Vulkan spec
requires depth values to be in the range of 0.0..1.0. The test was using
a depth value of 20.0..21.0 and expecting the implementation to clamp.

Instead of disabling this part of the test entirely, only run it if the
implementation exposes the VK_EXT_depth_range_unrestricted device
extension, which does have defined behavior with depth values outside
the range of 0.0..1.0.

Affects:

dEQP-VK.glsl.builtin_var.fragdepth.*d32_sfloat_large_depth

Components: Vulkan

VK-GL-CTS issue: 623

Change-Id: I436b8b98bebe3ef37bd306d93da2bf8c40eee6c8
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderBuiltinVarTests.cpp