aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2024-05-05 10:34:59 +0300
committerLorenzo Dal Col <lorenzo@khronosgroup.org>2024-05-09 17:17:02 +0000
commitcac876294f15de649fc389f9534edd495c30aa3c (patch)
tree2e00b70069720b4da4bf44579671e05767441147
parent2df8d5a9b98e66ec3e1019a8a88bce9c0d61a7a8 (diff)
downloaddeqp-upstream-vulkan-cts-1.3.6.tar.gz
Allow n_ulp for dithering tests using additive blendingupstream-vulkan-cts-1.3.6
Components: Vulkan VK-GL-CTS issue: 5091 Affected tests: dEQP-VK.renderpass.dithering* dEQP-VK.renderpass2.dithering* dEQP-VK.dynamic_rendering.*.dithering* Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Change-Id: I921cdb123a7b768a7d0235500d3128c79827c7f3
-rw-r--r--external/vulkancts/modules/vulkan/renderpass/vktRenderPassDitheringTests.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDitheringTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDitheringTests.cpp
index 02c345e7a..4a57fd32f 100644
--- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDitheringTests.cpp
+++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDitheringTests.cpp
@@ -325,7 +325,11 @@ tcu::TestStatus DitheringTestInstance::iterate (void)
const tcu::ConstPixelBufferAccess& resultAccess = resultTextureLevelResult->getAccess();
// 1 ULP will always be 1 bit difference no matter the format
- const tcu::UVec4 threshold (1u, 1u, 1u, 1u);
+ // However, we allow N ULP for additive blending tests since drivers may do dithering while rendering (per draw)
+ // which can cause dither pattern to exceed 1ULP threshold with additive blending, see discussion in:
+ // https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3785#note_384389
+ const deUint32 n_ulp = (m_testParams.blending && m_testParams.dstFactor == VK_BLEND_FACTOR_ONE) ? 4u : 1u;
+ const tcu::UVec4 threshold (n_ulp, n_ulp, n_ulp, n_ulp);
if (!tcu::intThresholdCompare(m_context.getTestContext().getLog(), "", "", referenceAccess,
resultAccess, threshold, tcu::COMPARE_LOG_ON_ERROR))