From: Stephen Clarke Date: Fri, 21 Dec 2018 12:38:35 +0000 (+0000) Subject: Set correct range for OpVectorTimesScalar tests X-Git-Tag: upstream/1.3.5~2185^2^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ece81acc86cc100e458289738b21d9b8feb97cc;p=platform%2Fupstream%2FVK-GL-CTS.git 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) --- 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;