mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 00:39:03 +00:00
Reformat SPIR-V assembly and fix validation errors (#472)
* Reformat SPIR-V assembly using spirv-dis Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Fix duplicate non-aggregate type decls in SPIR-V as reported by spirv-val Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Reposition OpExtensions correctly in SPIR-V as reported by spirv-val Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Reposition OpVariables correctly in SPIR-V as reported by spirv-val Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Add missing OpTypeImage access qualifiers in SPIR-V as reported by spirv-val Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Remove same-width OpSConverts in SPIR-V as reported by spirv-val Signed-off-by: Stuart Brady <stuart.brady@arm.com> * Replace -ILPath with --spirv-binaries-path in README Signed-off-by: Stuart Brady <stuart.brady@arm.com>
This commit is contained in:
committed by
Kévin Petit
parent
60101c24cf
commit
2398587980
65
test_conformance/spirv_new/spirv_asm/phi_4.spvasm32
Normal file
65
test_conformance/spirv_new/spirv_asm/phi_4.spvasm32
Normal file
@@ -0,0 +1,65 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos SPIR-V Tools Assembler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Addresses
|
||||
OpCapability Linkage
|
||||
OpCapability Kernel
|
||||
OpMemoryModel Physical32 OpenCL
|
||||
OpEntryPoint Kernel %1 "phi_4"
|
||||
OpName %res "res"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpDecorate %5 FuncParamAttr NoCapture
|
||||
%5 = OpDecorationGroup
|
||||
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
|
||||
OpDecorate %gl_GlobalInvocationID Constant
|
||||
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
|
||||
OpGroupDecorate %5 %res %lhs %rhs
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_UniformConstant_v3uint = OpTypePointer UniformConstant %v3uint
|
||||
%bool = OpTypeBool
|
||||
%void = OpTypeVoid
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
|
||||
%14 = OpTypeFunction %void %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3uint UniformConstant
|
||||
%1 = OpFunction %void None %14
|
||||
%res = OpFunctionParameter %_ptr_CrossWorkgroup_uint
|
||||
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
|
||||
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
|
||||
%15 = OpLabel
|
||||
%16 = OpLoad %v3uint %gl_GlobalInvocationID Aligned 0
|
||||
%17 = OpCompositeExtract %uint %16 0
|
||||
%18 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %lhs %17
|
||||
%19 = OpLoad %uint %18 Aligned 4
|
||||
%20 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %rhs %17
|
||||
%21 = OpLoad %uint %20 Aligned 4
|
||||
%22 = OpSLessThan %bool %19 %21
|
||||
OpBranchConditional %22 %23 %24
|
||||
%23 = OpLabel
|
||||
%25 = OpSLessThan %bool %19 %uint_0
|
||||
OpBranchConditional %25 %26 %27
|
||||
%26 = OpLabel
|
||||
%28 = OpISub %uint %uint_0 %19
|
||||
OpBranch %29
|
||||
%27 = OpLabel
|
||||
%30 = OpISub %uint %19 %uint_0
|
||||
OpBranch %29
|
||||
%24 = OpLabel
|
||||
%31 = OpSLessThan %bool %21 %uint_0
|
||||
OpBranchConditional %31 %32 %33
|
||||
%32 = OpLabel
|
||||
%34 = OpISub %uint %uint_0 %21
|
||||
OpBranch %29
|
||||
%33 = OpLabel
|
||||
%35 = OpISub %uint %21 %uint_0
|
||||
OpBranch %29
|
||||
%29 = OpLabel
|
||||
%36 = OpPhi %uint %28 %26 %30 %27 %34 %32 %35 %33
|
||||
%37 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %res %17
|
||||
OpStore %37 %36 Aligned 4
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
Reference in New Issue
Block a user