mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29: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
49
test_conformance/spirv_new/spirv_asm/fdiv_float.spvasm64
Normal file
49
test_conformance/spirv_new/spirv_asm/fdiv_float.spvasm64
Normal file
@@ -0,0 +1,49 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos SPIR-V Tools Assembler; 0
|
||||
; Bound: 27
|
||||
; Schema: 0
|
||||
OpCapability Addresses
|
||||
OpCapability Linkage
|
||||
OpCapability Kernel
|
||||
OpCapability Int64
|
||||
%1 = OpExtInstImport "OpenCL.std"
|
||||
OpMemoryModel Physical64 OpenCL
|
||||
OpEntryPoint Kernel %2 "fmath_spv"
|
||||
OpName %res "res"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %entry "entry"
|
||||
OpDecorate %7 FuncParamAttr NoCapture
|
||||
%7 = OpDecorationGroup
|
||||
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
|
||||
OpDecorate %gl_GlobalInvocationID Constant
|
||||
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
|
||||
OpGroupDecorate %7 %res %lhs %rhs
|
||||
%ulong = OpTypeInt 64 0
|
||||
%v3ulong = OpTypeVector %ulong 3
|
||||
%_ptr_UniformConstant_v3ulong = OpTypePointer UniformConstant %v3ulong
|
||||
%void = OpTypeVoid
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_CrossWorkgroup_float = OpTypePointer CrossWorkgroup %float
|
||||
%15 = OpTypeFunction %void %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_float
|
||||
%ulong_32 = OpConstant %ulong 32
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3ulong UniformConstant
|
||||
%2 = OpFunction %void None %15
|
||||
%res = OpFunctionParameter %_ptr_CrossWorkgroup_float
|
||||
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_float
|
||||
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_float
|
||||
%entry = OpLabel
|
||||
%17 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0
|
||||
%18 = OpCompositeExtract %ulong %17 0
|
||||
%19 = OpShiftLeftLogical %ulong %18 %ulong_32
|
||||
%20 = OpShiftRightArithmetic %ulong %19 %ulong_32
|
||||
%21 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %lhs %20
|
||||
%22 = OpLoad %float %21 Aligned 4
|
||||
%23 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %rhs %20
|
||||
%24 = OpLoad %float %23 Aligned 4
|
||||
%25 = OpFDiv %float %22 %24
|
||||
%26 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %res %20
|
||||
OpStore %26 %25 Aligned 4
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
Reference in New Issue
Block a user