Avoid out-of-range depth values
authorPiers Daniell <pdaniell@nvidia.com>
Tue, 8 Aug 2017 22:03:35 +0000 (16:03 -0600)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 25 Aug 2017 10:50:06 +0000 (06:50 -0400)
commit9121ea6dbdfe81316c441ee72d60f939c9dd701d
tree7343842e6aeba2f7e2e3b973b6294ed4dd34b59c
parentb1859125eb50c88ef7ddacb673bc368d04358371
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