From e14d8832445f75d9bd624cd4f6af15c8d84bc5cb Mon Sep 17 00:00:00 2001 From: Andrey Tuganov Date: Mon, 5 Feb 2018 12:14:40 -0500 Subject: [PATCH] Fix invalid memory semantics in barrier tests The tests were breaking the rule: "If the semantics for OpControlBarrier is not None, then it must include at least one storage class." https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#spirvenv-module-validation Affects: dEQP-VK.spirv_assembly.instruction.graphics.barrier.* Components: Vulkan VK-GL-CTS issue: 989 Change-Id: I3a1d42ae6f0a6ca63e3f32b76f09fa736ff49dc0 --- .../spirv_assembly/vktSpvAsmInstructionTests.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp index 14ffc70..49f50ca 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp @@ -7398,12 +7398,12 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) // A barrier inside a function body. fragments["pre_main"] = "%Workgroup = OpConstant %i32 2\n" - "%SequentiallyConsistent = OpConstant %i32 0x10\n"; + "%WorkgroupAcquireRelease = OpConstant %i32 0x108\n"; fragments["testfun"] = "%test_code = OpFunction %v4f32 None %v4f32_function\n" "%param1 = OpFunctionParameter %v4f32\n" "%label_testfun = OpLabel\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "OpReturnValue %param1\n" "OpFunctionEnd\n"; addTessCtrlTest(testGroup.get(), "in_function", fragments); @@ -7411,7 +7411,7 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) // Common setup code for the following tests. fragments["pre_main"] = "%Workgroup = OpConstant %i32 2\n" - "%SequentiallyConsistent = OpConstant %i32 0x10\n" + "%WorkgroupAcquireRelease = OpConstant %i32 0x108\n" "%c_f32_5 = OpConstant %f32 5.\n"; const string setupPercentZero = // Begins %test_code function with code that sets %zero to 0u but cannot be optimized away. "%test_code = OpFunction %v4f32 None %v4f32_function\n" @@ -7430,18 +7430,18 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) "%case1 = OpLabel\n" ";This barrier should never be executed, but its presence makes test failure more likely when there's a bug.\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "%wrong_branch_alert1 = OpVectorInsertDynamic %v4f32 %param1 %c_f32_0_5 %c_i32_0\n" "OpBranch %switch_exit\n" "%switch_default = OpLabel\n" "%wrong_branch_alert2 = OpVectorInsertDynamic %v4f32 %param1 %c_f32_0_5 %c_i32_0\n" ";This barrier should never be executed, but its presence makes test failure more likely when there's a bug.\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "OpBranch %switch_exit\n" "%case0 = OpLabel\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "OpBranch %switch_exit\n" "%switch_exit = OpLabel\n" @@ -7459,12 +7459,12 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) "%else = OpLabel\n" ";This barrier should never be executed, but its presence makes test failure more likely when there's a bug.\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "%wrong_branch_alert = OpVectorInsertDynamic %v4f32 %param1 %c_f32_0_5 %c_i32_0\n" "OpBranch %exit\n" "%then = OpLabel\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "OpBranch %exit\n" "%exit = OpLabel\n" @@ -7492,7 +7492,7 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) "%exit = OpLabel\n" "%val = OpPhi %f32 %val0 %else %val1 %then\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "%ret = OpVectorInsertDynamic %v4f32 %param1 %val %zero\n" "OpReturnValue %ret\n" "OpFunctionEnd\n"; @@ -7501,7 +7501,7 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) // A barrier inside a loop. fragments["pre_main"] = "%Workgroup = OpConstant %i32 2\n" - "%SequentiallyConsistent = OpConstant %i32 0x10\n" + "%WorkgroupAcquireRelease = OpConstant %i32 0x108\n" "%c_f32_10 = OpConstant %f32 10.\n"; fragments["testfun"] = "%test_code = OpFunction %v4f32 None %v4f32_function\n" @@ -7514,7 +7514,7 @@ tcu::TestCaseGroup* createBarrierTests(tcu::TestContext& testCtx) "%loop = OpLabel\n" "%count = OpPhi %i32 %c_i32_4 %entry %count__ %loop\n" "%val1 = OpPhi %f32 %val0 %entry %val %loop\n" - "OpControlBarrier %Workgroup %Workgroup %SequentiallyConsistent\n" + "OpControlBarrier %Workgroup %Workgroup %WorkgroupAcquireRelease\n" "%fcount = OpConvertSToF %f32 %count\n" "%val = OpFAdd %f32 %val1 %fcount\n" "%count__ = OpISub %i32 %count %c_i32_1\n" -- 2.7.4