From 2ece81acc86cc100e458289738b21d9b8feb97cc Mon Sep 17 00:00:00 2001 From: Stephen Clarke Date: Fri, 21 Dec 2018 12:38:35 +0000 Subject: [PATCH] Set correct range for OpVectorTimesScalar tests The min[] and max[] values should be based on the result in double precision, not after it has been converted to fp16type. Affects: dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_2.opvectortimesscalar dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_3.opvectortimesscalar dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_4.opvectortimesscalar dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_2.opvectortimesscalar* dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_3.opvectortimesscalar* dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_4.opvectortimesscalar* Components: Vulkan VK-GL-CTS issue: 1532 Change-Id: I30810c8c954ee899bb05602b1f8805f82ac021b3 (cherry picked from commit 12b26bd9762dd56068522cc0a17b26c9e31df1e2) --- .../modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp index 47ce3aa..94e7d7e 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp @@ -14368,12 +14368,13 @@ struct fp16VectorTimesScalar : public fp16AllComponents for (size_t componentNdx = 0; componentNdx < getArgCompCount(0); ++componentNdx) { - const fp16type x (in[0][componentNdx]); - const fp16type m (s.asDouble() * x.asDouble()); + const fp16type x (in[0][componentNdx]); + const double result (s.asDouble() * x.asDouble()); + const fp16type m (result); out[componentNdx] = m.bits(); - min[componentNdx] = getMin(m.asDouble(), getULPs(in)); - max[componentNdx] = getMax(m.asDouble(), getULPs(in)); + min[componentNdx] = getMin(result, getULPs(in)); + max[componentNdx] = getMax(result, getULPs(in)); } return true; -- 2.7.4