mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
* initial support for cl_khr_expect_assume Tests expect with 64-bit SPIR-V binaries. * add support for assume testing with 64-bit binaries * add 32-bit SPIR-V files * fix formatting * address review comments
38 lines
1.6 KiB
Plaintext
38 lines
1.6 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.0
|
|
; Generator: Khronos LLVM/SPIR-V Translator; 14
|
|
; Bound: 22
|
|
; Schema: 0
|
|
OpCapability Addresses
|
|
OpCapability Linkage
|
|
OpCapability Kernel
|
|
OpCapability ExpectAssumeKHR
|
|
OpExtension "SPV_KHR_expect_assume"
|
|
%1 = OpExtInstImport "OpenCL.std"
|
|
OpMemoryModel Physical32 OpenCL
|
|
OpEntryPoint Kernel %test_assume "test_assume" %gl_GlobalInvocationID
|
|
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
|
|
OpDecorate %gl_GlobalInvocationID Constant
|
|
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
|
|
%void = OpTypeVoid
|
|
%bool = OpTypeBool
|
|
%uint = OpTypeInt 32 0
|
|
%v3uint = OpTypeVector %uint 3
|
|
%uint_0 = OpConstantNull %uint
|
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
|
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
|
|
%functype = OpTypeFunction %void %_ptr_CrossWorkgroup_uint %uint
|
|
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
|
|
%test_assume = OpFunction %void None %functype
|
|
%dst = OpFunctionParameter %_ptr_CrossWorkgroup_uint
|
|
%value = OpFunctionParameter %uint
|
|
%13 = OpLabel
|
|
%test = OpSGreaterThan %bool %value %uint_0
|
|
OpAssumeTrueKHR %test
|
|
%global_id = OpLoad %v3uint %gl_GlobalInvocationID Aligned 32
|
|
%gid_0 = OpCompositeExtract %uint %global_id 0
|
|
%dst_gid_0 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %dst %gid_0
|
|
OpStore %dst_gid_0 %value Aligned 4
|
|
OpReturn
|
|
OpFunctionEnd
|