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
if ((formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) == 0)
throw tcu::NotSupportedError("MarkerImage format not supported as storage image");
+
+ if (m_largeDepthEnable && !de::contains(context.getDeviceExtensions().begin(), context.getDeviceExtensions().end(), "VK_EXT_depth_range_unrestricted"))
+ throw tcu::NotSupportedError("large_depth test variants require the VK_EXT_depth_range_unrestricted extension");
}
catch (const vk::Error& e)
{
if (m_largeDepthEnable)
expectedValue += m_largeDepthBase;
- if (expectedValue > 1.0f)
- expectedValue = 1.0f;
-
- if (expectedValue < 0.0f)
- expectedValue = 0.0f;
-
for (deUint32 sampleNdx = 0; sampleNdx < (deUint32)m_samples; sampleNdx++)
{
const float actualValue = validationBuffer.getPixel(sampleNdx + m_samples * colNdx, rowNdx).x();