diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-04-21 12:41:33 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-04-21 12:48:58 +0300 |
commit | a396744f8998f0dbf4a51d0a3f18cec0726fd1fd (patch) | |
tree | 1bcf95975b6224134c0c49cffa0d4f442bd0b6a5 /shaders | |
parent | 55dfbead2f6c03497984a35485d10524378f0484 (diff) |
Ensure unpack/pack2x32 tests are compatible with test suite.
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/asm/frag/pack-and-unpack-uint2.asm.frag | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/shaders/asm/frag/pack-and-unpack-uint2.asm.frag b/shaders/asm/frag/pack-and-unpack-uint2.asm.frag new file mode 100644 index 00000000..43d0970e --- /dev/null +++ b/shaders/asm/frag/pack-and-unpack-uint2.asm.frag @@ -0,0 +1,55 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 34 +; Schema: 0 + OpCapability Shader + OpCapability Int64 + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %FragColor + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpSourceExtension "GL_ARB_gpu_shader_int64" + OpName %main "main" + OpName %packed "packed" + OpName %unpacked "unpacked" + OpName %FragColor "FragColor" + OpDecorate %FragColor Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %ulong = OpTypeInt 64 0 +%_ptr_Function_ulong = OpTypePointer Function %ulong + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %uint_18 = OpConstant %uint 18 + %uint_52 = OpConstant %uint 52 + %13 = OpConstantComposite %v2uint %uint_18 %uint_52 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %uint_0 = OpConstant %uint 0 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %3 + %5 = OpLabel + %packed = OpVariable %_ptr_Function_ulong Function + %unpacked = OpVariable %_ptr_Function_v2uint Function + %14 = OpBitcast %ulong %13 + OpStore %packed %14 + %17 = OpLoad %ulong %packed + %18 = OpBitcast %v2uint %17 + OpStore %unpacked %18 + %25 = OpAccessChain %_ptr_Function_uint %unpacked %uint_0 + %26 = OpLoad %uint %25 + %27 = OpConvertUToF %float %26 + %29 = OpAccessChain %_ptr_Function_uint %unpacked %uint_1 + %30 = OpLoad %uint %29 + %31 = OpConvertUToF %float %30 + %33 = OpCompositeConstruct %v4float %27 %31 %float_1 %float_1 + OpStore %FragColor %33 + OpReturn + OpFunctionEnd |