diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-06-08 12:40:02 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-06-08 12:40:02 +0300 |
commit | 857e1c445c3aa87d8720521a44000b926975dc4e (patch) | |
tree | 60777799256fe664dfd67669d35a5d546ab7f740 /shaders-no-opt | |
parent | 553a7f959b6b90f89054a1df50b50dfcdc3389be (diff) |
GLSL: Support uint code for sparse residency query.
Diffstat (limited to 'shaders-no-opt')
-rw-r--r-- | shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag b/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag new file mode 100644 index 00000000..9b2eb728 --- /dev/null +++ b/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag @@ -0,0 +1,57 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 8 +; Bound: 30 +; Schema: 0 + OpCapability Shader + OpCapability SparseResidency + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %vUV %FragColor + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpSourceExtension "GL_ARB_sparse_texture2" + OpSourceExtension "GL_ARB_sparse_texture_clamp" + OpName %main "main" + OpName %ret "ret" + OpName %uSamp "uSamp" + OpName %vUV "vUV" + OpName %texel "texel" + OpName %ResType "ResType" + OpName %FragColor "FragColor" + OpDecorate %uSamp DescriptorSet 0 + OpDecorate %uSamp Binding 0 + OpDecorate %vUV Location 0 + OpDecorate %FragColor Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %bool = OpTypeBool +%_ptr_Function_bool = OpTypePointer Function %bool + %float = OpTypeFloat 32 + %10 = OpTypeImage %float 2D 0 0 0 1 Unknown + %11 = OpTypeSampledImage %10 +%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11 + %uSamp = OpVariable %_ptr_UniformConstant_11 UniformConstant + %v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float + %vUV = OpVariable %_ptr_Input_v2float Input + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %uint = OpTypeInt 32 0 + %ResType = OpTypeStruct %uint %v4float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %main = OpFunction %void None %3 + %5 = OpLabel + %ret = OpVariable %_ptr_Function_bool Function + %texel = OpVariable %_ptr_Function_v4float Function + %14 = OpLoad %11 %uSamp + %18 = OpLoad %v2float %vUV + %24 = OpImageSparseSampleImplicitLod %ResType %14 %18 + %25 = OpCompositeExtract %v4float %24 1 + OpStore %texel %25 + %26 = OpCompositeExtract %uint %24 0 + %27 = OpImageSparseTexelsResident %bool %26 + OpStore %ret %27 + OpReturn + OpFunctionEnd |