Skip to content

Commit

Permalink
Skip fconvert16 if float16 not supported
Browse files Browse the repository at this point in the history
The SPIR-V instruction test for float16 wasn't checking for the float16
capability correctly so didn't work properly on implementations that
don't support it.

Components: Vulkan
VK-GL-CTS issue: 1499
Affects:
    dEQP-VK.spirv_assembly.instruction.compute.opspecconstantop.fconvert16

Change-Id: Id8dfc596acda41da670b2d6c08bde9920df99268
  • Loading branch information
gnl21 authored and alegal-arm committed Dec 7, 2018
1 parent 4931ac2 commit f88209e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2791,6 +2791,8 @@ tcu::TestCaseGroup* createSpecConstantGroup (tcu::TestContext& testCtx)
// Special SPIR-V code for FConvert-case for 16-bit floats
if (strcmp(cases[caseNdx].caseName, "fconvert16") == 0)
{
spec.extensions.push_back("VK_KHR_shader_float16_int8");
spec.requestedVulkanFeatures.extFloat16Int8 = EXTFLOAT16INT8FEATURES_FLOAT16;
specializations["CAPABILITIES"] = "OpCapability Float16\n"; // Adds 16-bit float capability
specializations["OPTYPE_DEFINITIONS"] = "%f16 = OpTypeFloat 16\n"; // Adds 16-bit float type
specializations["TYPE_CONVERT"] = "%sc_final32 = OpConvertFToS %i32 %sc_final\n"; // Converts 16-bit float to 32-bit integer
Expand Down

0 comments on commit f88209e

Please sign in to comment.