Allow rounding error when reading back Z buffer
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 22 Nov 2021 07:29:50 +0000 (08:29 +0100)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 7 Jan 2022 18:00:28 +0000 (13:00 -0500)
commit1a8cfa6dd21ab69339adf7fc8b989dcf8577f50e
tree7766f663d69220d3b98341fb36302356e21afb0a
parent4da7fa3cdf01887635f52c2c290b7064cb186c6b
Allow rounding error when reading back Z buffer

The early fragment test produces Z values <= 0.5 and uses a shader
to write 0.75 that it expects to be ignored due to early fragment
tests, which it verifies by reading back the Z buffer and testing
that all values are <= 0.5.

On our platform, we observe that on storing 0.5 we retrieve
0.500008, which makes us fail the test incorrectly. Fix this
by adding a small room for rounding error, like we do for
other verification paths in these tests.

While we are doing this, lower the tolerance admited for
the late fragment test case as well.

Components: Vulkan
VK-GL-CTS Issue: 3340
Affects:
dEQP-VK.fragment_operations.early_fragment.discard_early_fragment_tests_depth
dEQP-VK.fragment_operations.early_fragment.discard_no_early_fragment_tests_depth

Change-Id: I8e1782b81d0e74a4a5af3e3cac40c9679f543ac6
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp