Always accumulate errors in desc set random tests
Tests using DEPENDENT and RUNTIME_SIZE index types were overwriting the
value of the accumulated error with each load operation. This has two
problems:
* Sometimes the result of a load operation would not be used in the next
load operation. This happens when the next descriptor to check is not
an array. In these cases the implementation may remove load
operations, which means they would not be checked.
* As long as the implementation does not crash and the last load
operation works as expected, the implementation was allowed to load
incorrect values in those operations, because only the last load would
be taken into account to decide if the output storage image will have
a "good" or "bad" value.
This commit makes all test variants accumulate errors in the "accum"
variable that's used at the end of each test.
Affected tests:
dEQP-VK.binding_model.descriptorset_random.*
Components: Vulkan
VK-GL-CTS issue: 2763
Change-Id: I4de1bd4525d378b5ec2b7aad3faae81d956a9d7d
diff --git a/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp b/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp
index 0cdf13b..8d02b95 100644
--- a/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp
+++ b/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp
@@ -898,16 +898,9 @@
break;
default: DE_ASSERT(0);
}
- if (m_data.indexType == INDEX_TYPE_DEPENDENT || m_data.indexType == INDEX_TYPE_RUNTIME_SIZE)
- {
- // Set accum to zero, it is added to the next index.
- checks << " accum = temp - " << descriptor << ";\n";
- }
- else
- {
- // Accumulate any incorrect values.
- checks << " accum |= temp - " << descriptor << ";\n";
- }
+
+ // Accumulate any incorrect values.
+ checks << " accum |= temp - " << descriptor << ";\n";
}
else
{