These tests perform an addition whose Rounding mode is unspecified
according to the specification. This test is not testing addition,
it is testing that the input values are read correctly, so modify
the input values such that they do not require rounding.
Affected tests:
* dEQP-VK.spirv_assembly.instruction.compute.indexing.input.non16basealignment*
Components: Vulkan
VK-GL-CTS issue: 1473
Change-Id: Ifab284d95cc2e36c3a551c30d57deeca7bd8d4b2
inputData.reserve(numInputFloats);
for (deUint32 numIdx = 0; numIdx < numInputFloats; ++numIdx)
- inputData.push_back(rnd.getFloat());
+ {
+ float f = rnd.getFloat();
+
+ // CPU might not use the same rounding mode as the GPU. Use whole numbers to avoid rounding differences.
+ f = deFloatFloor(f);
+
+ inputData.push_back(f);
+ }
spec.inputs.push_back(Resource(BufferSp(new Float32Buffer(inputData)), VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));