diff options
Diffstat (limited to '3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm')
35 files changed, 2950 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp new file mode 100644 index 00000000000..8f4c95783d9 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp @@ -0,0 +1,55 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 52 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "values" + OpName %_ "" + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SSBO 0 Offset 0 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_100 = OpConstant %int 100 + %bool = OpTypeBool +%_runtimearr_int = OpTypeRuntimeArray %int + %SSBO = OpTypeStruct %_runtimearr_int +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform +%_ptr_Uniform_int = OpTypePointer Uniform %int + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + OpBranch %32 + %32 = OpLabel + %51 = OpPhi %int %int_0 %5 %49 %loop_continue + %38 = OpSLessThan %bool %51 %int_100 + OpLoopMerge %loop_merge %loop_continue None + OpBranchConditional %38 %loop_body %loop_merge + %loop_body = OpLabel + %40 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %51 + OpBranch %loop_continue + %loop_continue = OpLabel + %41 = OpLoad %int %40 + %44 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %41 + OpStore %44 %51 + %47 = OpIAdd %int %41 %int_1 + %48 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %47 + %49 = OpLoad %int %48 + OpStore %40 %49 + OpBranch %32 + %loop_merge = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp new file mode 100644 index 00000000000..b1ddd7cc8f6 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp @@ -0,0 +1,54 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 52 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "values" + OpName %_ "" + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SSBO 0 Offset 0 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_100 = OpConstant %int 100 + %bool = OpTypeBool +%_runtimearr_int = OpTypeRuntimeArray %int + %SSBO = OpTypeStruct %_runtimearr_int +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform +%_ptr_Uniform_int = OpTypePointer Uniform %int + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + OpBranch %32 + %32 = OpLabel + %51 = OpPhi %int %int_0 %5 %49 %loop_continue + %38 = OpSLessThan %bool %51 %int_100 + OpLoopMerge %loop_merge %loop_continue None + OpBranchConditional %38 %loop_body %loop_merge + %loop_body = OpLabel + %40 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %51 + OpBranch %loop_continue + %loop_continue = OpLabel + %41 = OpLoad %int %40 + %44 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %41 + OpStore %44 %51 + %47 = OpIAdd %int %41 %int_1 + %48 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %47 + %49 = OpLoad %int %48 + OpBranch %32 + %loop_merge = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp new file mode 100644 index 00000000000..0e1ce235d21 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp @@ -0,0 +1,131 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 76 +; Schema: 0 + OpCapability Shader + OpCapability Int16 + OpCapability StorageBuffer16BitAccess + OpExtension "SPV_KHR_16bit_storage" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "s32" + OpMemberName %SSBO 1 "u32" + OpMemberName %SSBO 2 "s16" + OpMemberName %SSBO 3 "u16" + OpMemberName %SSBO 4 "f32" + OpName %_ "" + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 4 + OpMemberDecorate %SSBO 2 Offset 8 + OpMemberDecorate %SSBO 3 Offset 10 + OpMemberDecorate %SSBO 4 Offset 12 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %short = OpTypeInt 16 1 + %ushort = OpTypeInt 16 0 + %float = OpTypeFloat 32 + %SSBO = OpTypeStruct %int %uint %short %ushort %float +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int_2 = OpConstant %int 2 + %int_0 = OpConstant %int 0 +%_ptr_Uniform_int = OpTypePointer Uniform %int +%_ptr_Uniform_short = OpTypePointer Uniform %short + %int_1 = OpConstant %int 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %int_3 = OpConstant %int 3 +%_ptr_Uniform_ushort = OpTypePointer Uniform %ushort + %int_4 = OpConstant %int 4 +%_ptr_Uniform_float = OpTypePointer Uniform %float + %main = OpFunction %void None %3 + %5 = OpLabel + %ptr_s32 = OpAccessChain %_ptr_Uniform_int %_ %int_0 + %ptr_u32 = OpAccessChain %_ptr_Uniform_uint %_ %int_1 + %ptr_s16 = OpAccessChain %_ptr_Uniform_short %_ %int_2 + %ptr_u16 = OpAccessChain %_ptr_Uniform_ushort %_ %int_3 + %ptr_f32 = OpAccessChain %_ptr_Uniform_float %_ %int_4 + %s32 = OpLoad %int %ptr_s32 + %u32 = OpLoad %uint %ptr_u32 + %s16 = OpLoad %short %ptr_s16 + %u16 = OpLoad %ushort %ptr_u16 + %f32 = OpLoad %float %ptr_f32 + + ; Sign-extend + %s16_to_s32_signed = OpSConvert %int %s16 + OpStore %ptr_s32 %s16_to_s32_signed + %s16_to_u32_signed = OpSConvert %uint %s16 + OpStore %ptr_u32 %s16_to_u32_signed + + %u16_to_s32_signed = OpSConvert %int %u16 + OpStore %ptr_s32 %u16_to_s32_signed + %u16_to_u32_signed = OpSConvert %uint %u16 + OpStore %ptr_u32 %u16_to_u32_signed + + ; Zero-extend + ; Result must be unsigned for OpUConvert. + ;%s16_to_s32_unsigned = OpUConvert %int %s16 + ;OpStore %ptr_s32 %s16_to_s32_unsigned + %s16_to_u32_unsigned = OpUConvert %uint %s16 + OpStore %ptr_u32 %s16_to_u32_unsigned + + ;%u16_to_s32_unsigned = OpUConvert %int %u16 + ;OpStore %ptr_s32 %u16_to_s32_unsigned + %u16_to_u32_unsigned = OpUConvert %uint %u16 + OpStore %ptr_u32 %u16_to_u32_unsigned + + ; Truncate (SConvert == UConvert) + %s32_to_s16_signed = OpSConvert %short %s32 + OpStore %ptr_s16 %s32_to_s16_signed + %s32_to_u16_signed = OpSConvert %ushort %s32 + OpStore %ptr_u16 %s32_to_u16_signed + + %u32_to_s16_signed = OpSConvert %short %u32 + OpStore %ptr_s16 %u32_to_s16_signed + %u32_to_u16_signed = OpSConvert %ushort %u32 + OpStore %ptr_u16 %u32_to_u16_signed + + ;%s32_to_s16_unsigned = OpUConvert %short %s32 + ;OpStore %ptr_s16 %s32_to_s16_unsigned + %s32_to_u16_unsigned = OpUConvert %ushort %s32 + OpStore %ptr_u16 %s32_to_u16_unsigned + + ;%u32_to_s16_unsigned = OpUConvert %short %u32 + ;OpStore %ptr_s16 %u32_to_s16_unsigned + %u32_to_u16_unsigned = OpUConvert %ushort %u32 + OpStore %ptr_u16 %u32_to_u16_unsigned + + ; SToF + %s16_to_f32_signed = OpConvertSToF %float %s16 + OpStore %ptr_f32 %s16_to_f32_signed + %u16_to_f32_signed = OpConvertSToF %float %u16 + OpStore %ptr_f32 %u16_to_f32_signed + %s16_to_f32_unsigned = OpConvertUToF %float %s16 + OpStore %ptr_f32 %s16_to_f32_unsigned + %u16_to_f32_unsigned = OpConvertUToF %float %u16 + OpStore %ptr_f32 %u16_to_f32_unsigned + + ; FToS + %f32_to_s16_signed = OpConvertFToS %short %f32 + OpStore %ptr_s16 %f32_to_s16_signed + %f32_to_u16_signed = OpConvertFToS %ushort %f32 + OpStore %ptr_u16 %f32_to_u16_signed + + ; FToU + %f32_to_u16_unsigned = OpConvertFToU %ushort %f32 + OpStore %ptr_u16 %f32_to_u16_unsigned + ; Result must be unsigned for FToU, so don't bother testing that. + + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp new file mode 100644 index 00000000000..a3238415967 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp @@ -0,0 +1,59 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 35 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "count" + OpMemberName %SSBO 1 "data" + OpName %_ "" + OpName %gl_GlobalInvocationID "gl_GlobalInvocationID" + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 4 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId + %void = OpTypeVoid + %3 = OpTypeFunction %void + %uint = OpTypeInt 32 0 +%_runtimearr_uint = OpTypeRuntimeArray %uint + %SSBO = OpTypeStruct %uint %_runtimearr_uint +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %uint_1 = OpConstant %uint 1 + %uint_0 = OpConstant %uint 0 + %uint_1024 = OpConstant %uint 1024 + %bool = OpTypeBool + %int_1 = OpConstant %int 1 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input +%_ptr_Input_uint = OpTypePointer Input %uint + %main = OpFunction %void None %3 + %5 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 + %19 = OpAtomicIAdd %uint %16 %uint_1 %uint_0 %uint_1 + %23 = OpULessThan %bool %19 %uint_1024 + OpSelectionMerge %25 None + OpBranchConditional %23 %24 %25 + %24 = OpLabel + %32 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_0 + %33 = OpLoad %uint %32 + %34 = OpAccessChain %_ptr_Uniform_uint %_ %int_1 %19 + OpStore %34 %33 + OpBranch %25 + %25 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp new file mode 100644 index 00000000000..435fa322215 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp @@ -0,0 +1,97 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 26 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "ints" + OpMemberName %SSBO 1 "uints" + OpName %_ "" + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 16 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 + + %int_1 = OpConstant %int 1 + %uint_11 = OpConstant %uint 11 + + %SSBO = OpTypeStruct %v4int %v4uint +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v4int = OpTypePointer Uniform %v4int +%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint + %main = OpFunction %void None %3 + %5 = OpLabel + %ints_ptr = OpAccessChain %_ptr_Uniform_v4int %_ %int_0 + %uints_ptr = OpAccessChain %_ptr_Uniform_v4uint %_ %int_1 + %ints = OpLoad %v4int %ints_ptr + %uints = OpLoad %v4uint %uints_ptr + + %ints_alt = OpVectorShuffle %v4int %ints %ints 3 2 1 0 + %uints_alt = OpVectorShuffle %v4uint %uints %uints 3 2 1 0 + + %int_to_int_popcount = OpBitCount %v4int %ints + %int_to_uint_popcount = OpBitCount %v4uint %ints + %uint_to_int_popcount = OpBitCount %v4int %uints + %uint_to_uint_popcount = OpBitCount %v4uint %uints + + ; BitReverse must have matching types w.r.t. sign, yay. + %int_to_int_reverse = OpBitReverse %v4int %ints + ;%int_to_uint_reverse = OpBitReverse %v4uint %ints + ;%uint_to_int_reverse = OpBitReverse %v4int %uints + %uint_to_uint_reverse = OpBitReverse %v4uint %uints + + ; Base and Result must match. + %int_to_int_sbit = OpBitFieldSExtract %v4int %ints %int_1 %uint_11 + ;%int_to_uint_sbit = OpBitFieldSExtract %v4uint %ints %offset %count + ;%uint_to_int_sbit = OpBitFieldSExtract %v4int %uints %offset %count + %uint_to_uint_sbit = OpBitFieldSExtract %v4uint %uints %uint_11 %int_1 + + ; Base and Result must match. + %int_to_int_ubit = OpBitFieldUExtract %v4int %ints %int_1 %uint_11 + ;%int_to_uint_ubit = OpBitFieldUExtract %v4uint %ints %offset %count + ;%uint_to_int_ubit = OpBitFieldUExtract %v4int %uints %offset %count + %uint_to_uint_ubit = OpBitFieldUExtract %v4uint %uints %uint_11 %int_1 + + %int_to_int_insert = OpBitFieldInsert %v4int %ints %ints_alt %int_1 %uint_11 + %uint_to_uint_insert = OpBitFieldInsert %v4uint %uints %uints_alt %uint_11 %int_1 + + OpStore %ints_ptr %int_to_int_popcount + OpStore %uints_ptr %int_to_uint_popcount + OpStore %ints_ptr %uint_to_int_popcount + OpStore %uints_ptr %uint_to_uint_popcount + + OpStore %ints_ptr %int_to_int_reverse + ;OpStore %uints_ptr %int_to_uint_reverse + ;OpStore %ints_ptr %uint_to_int_reverse + OpStore %uints_ptr %uint_to_uint_reverse + + OpStore %ints_ptr %int_to_int_sbit + ;OpStore %uints_ptr %int_to_uint_sbit + ;OpStore %ints_ptr %uint_to_int_sbit + OpStore %uints_ptr %uint_to_uint_sbit + + OpStore %ints_ptr %int_to_int_ubit + ;OpStore %uints_ptr %int_to_uint_ubit + ;OpStore %ints_ptr %uint_to_int_ubit + OpStore %uints_ptr %uint_to_uint_ubit + + OpStore %ints_ptr %int_to_int_insert + OpStore %uints_ptr %uint_to_uint_insert + + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/bitscan.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/bitscan.asm.comp new file mode 100644 index 00000000000..e3b785cd52b --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/bitscan.asm.comp @@ -0,0 +1,72 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 35 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "u" + OpMemberName %SSBO 1 "i" + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 16 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %ivec4 = OpTypeVector %int 4 + %uint = OpTypeInt 32 0 + %uvec4 = OpTypeVector %uint 4 + %SSBO = OpTypeStruct %uvec4 %ivec4 +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int_0 = OpConstant %int 0 +%_ptr_Uniform_uvec4 = OpTypePointer Uniform %uvec4 + %int_1 = OpConstant %int 1 +%_ptr_Uniform_ivec4 = OpTypePointer Uniform %ivec4 + %main = OpFunction %void None %3 + %5 = OpLabel + %uptr = OpAccessChain %_ptr_Uniform_uvec4 %_ %int_0 + %iptr = OpAccessChain %_ptr_Uniform_ivec4 %_ %int_1 + %uvalue = OpLoad %uvec4 %uptr + %ivalue = OpLoad %ivec4 %iptr + + %lsb_uint_to_uint = OpExtInst %uvec4 %1 FindILsb %uvalue + %lsb_uint_to_int = OpExtInst %ivec4 %1 FindILsb %uvalue + %lsb_int_to_uint = OpExtInst %uvec4 %1 FindILsb %ivalue + %lsb_int_to_int = OpExtInst %ivec4 %1 FindILsb %ivalue + + %umsb_uint_to_uint = OpExtInst %uvec4 %1 FindUMsb %uvalue + %umsb_uint_to_int = OpExtInst %ivec4 %1 FindUMsb %uvalue + %umsb_int_to_uint = OpExtInst %uvec4 %1 FindUMsb %ivalue + %umsb_int_to_int = OpExtInst %ivec4 %1 FindUMsb %ivalue + + %smsb_uint_to_uint = OpExtInst %uvec4 %1 FindSMsb %uvalue + %smsb_uint_to_int = OpExtInst %ivec4 %1 FindSMsb %uvalue + %smsb_int_to_uint = OpExtInst %uvec4 %1 FindSMsb %ivalue + %smsb_int_to_int = OpExtInst %ivec4 %1 FindSMsb %ivalue + + OpStore %uptr %lsb_uint_to_uint + OpStore %iptr %lsb_uint_to_int + OpStore %uptr %lsb_int_to_uint + OpStore %iptr %lsb_int_to_int + + OpStore %uptr %umsb_uint_to_uint + OpStore %iptr %umsb_uint_to_int + OpStore %uptr %umsb_int_to_uint + OpStore %iptr %umsb_int_to_int + + OpStore %uptr %smsb_uint_to_uint + OpStore %iptr %smsb_uint_to_int + OpStore %uptr %smsb_int_to_uint + OpStore %iptr %smsb_int_to_int + + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp new file mode 100644 index 00000000000..76894aa8c26 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp @@ -0,0 +1,44 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 27 +; Schema: 0 + OpCapability Shader + OpCapability Int64 + OpCapability PhysicalStorageBufferAddressesEXT + OpExtension "SPV_EXT_physical_storage_buffer" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel PhysicalStorageBuffer64EXT GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpSourceExtension "GL_ARB_gpu_shader_int64" + OpSourceExtension "GL_EXT_buffer_reference" + OpDecorate %ptr AliasedPointerEXT + OpMemberDecorate %Registers 0 Offset 0 + OpDecorate %Registers Block + %void = OpTypeVoid + %3 = OpTypeFunction %void + %uint = OpTypeInt 32 0 +%_ptr_PhysicalStorageBufferEXT_uint = OpTypePointer PhysicalStorageBufferEXT %uint +%_ptr_Function__ptr_PhysicalStorageBufferEXT_uint = OpTypePointer Function %_ptr_PhysicalStorageBufferEXT_uint + %ulong = OpTypeInt 64 0 + %Registers = OpTypeStruct %ulong +%_ptr_PushConstant_Registers = OpTypePointer PushConstant %Registers + %registers = OpVariable %_ptr_PushConstant_Registers PushConstant + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_PushConstant_ulong = OpTypePointer PushConstant %ulong + %int_10 = OpConstant %int 10 + %uint_20 = OpConstant %uint 20 + %main = OpFunction %void None %3 + %5 = OpLabel + %ptr = OpVariable %_ptr_Function__ptr_PhysicalStorageBufferEXT_uint Function + %19 = OpAccessChain %_ptr_PushConstant_ulong %registers %int_0 + %20 = OpLoad %ulong %19 + %21 = OpConvertUToPtr %_ptr_PhysicalStorageBufferEXT_uint %20 + OpStore %ptr %21 + %22 = OpLoad %_ptr_PhysicalStorageBufferEXT_uint %ptr + OpStore %22 %uint_20 Aligned 4 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp new file mode 100644 index 00000000000..d1270d4f2af --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp @@ -0,0 +1,51 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 27 +; Schema: 0 + OpCapability Shader + OpCapability Int64 + OpCapability PhysicalStorageBufferAddressesEXT + OpExtension "SPV_EXT_physical_storage_buffer" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel PhysicalStorageBuffer64EXT GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpSourceExtension "GL_ARB_gpu_shader_int64" + OpSourceExtension "GL_EXT_buffer_reference" + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %uintPtr 0 Offset 0 + OpDecorate %uintPtr Block + OpDecorate %ptr AliasedPointerEXT + OpMemberDecorate %Registers 0 Offset 0 + OpDecorate %Registers Block + %void = OpTypeVoid + %3 = OpTypeFunction %void + %uint = OpTypeInt 32 0 +%_runtimearr_uint = OpTypeRuntimeArray %uint + %uintPtr = OpTypeStruct %_runtimearr_uint +%_ptr_PhysicalStorageBufferEXT_uint_array = OpTypePointer PhysicalStorageBufferEXT %_runtimearr_uint +%_ptr_Function__ptr_PhysicalStorageBufferEXT_uint_array = OpTypePointer Function %_ptr_PhysicalStorageBufferEXT_uint_array + %ulong = OpTypeInt 64 0 + %Registers = OpTypeStruct %ulong +%_ptr_PushConstant_Registers = OpTypePointer PushConstant %Registers + %registers = OpVariable %_ptr_PushConstant_Registers PushConstant + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_PushConstant_ulong = OpTypePointer PushConstant %ulong + %int_10 = OpConstant %int 10 + %uint_20 = OpConstant %uint 20 +%_ptr_PhysicalStorageBufferEXT_uint = OpTypePointer PhysicalStorageBufferEXT %uint + %main = OpFunction %void None %3 + %5 = OpLabel + %ptr = OpVariable %_ptr_Function__ptr_PhysicalStorageBufferEXT_uint_array Function + %19 = OpAccessChain %_ptr_PushConstant_ulong %registers %int_0 + %20 = OpLoad %ulong %19 + %21 = OpConvertUToPtr %_ptr_PhysicalStorageBufferEXT_uint_array %20 + OpStore %ptr %21 + %22 = OpLoad %_ptr_PhysicalStorageBufferEXT_uint_array %ptr + %26 = OpAccessChain %_ptr_PhysicalStorageBufferEXT_uint %22 %int_10 + OpStore %26 %uint_20 Aligned 4 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/constant-composite-undef.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/constant-composite-undef.asm.comp new file mode 100644 index 00000000000..8997d0aaf92 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/constant-composite-undef.asm.comp @@ -0,0 +1,40 @@ +; SPIR-V +; Version: 1.3 +; Generator: Khronos SPIR-V Tools Assembler; 0 +; Bound: 20 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %Block "Block" + OpMemberName %Block 0 "f" + OpName %block "block" + OpMemberDecorate %Block 0 Offset 0 + OpDecorate %Block BufferBlock + OpDecorate %block DescriptorSet 0 + OpDecorate %block Binding 0 + %void = OpTypeVoid + %6 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %Block = OpTypeStruct %v4float +%_ptr_Uniform_Block = OpTypePointer Uniform %Block + %block = OpVariable %_ptr_Uniform_Block Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%float_0_100000001 = OpConstant %float 0.100000001 +%float_0_200000003 = OpConstant %float 0.200000003 +%float_0_300000012 = OpConstant %float 0.300000012 + %15 = OpUndef %float + %16 = OpConstantComposite %v4float %float_0_100000001 %float_0_200000003 %float_0_300000012 %15 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %main = OpFunction %void None %6 + %18 = OpLabel + %19 = OpAccessChain %_ptr_Uniform_v4float %block %int_0 + OpStore %19 %16 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp new file mode 100644 index 00000000000..7da9f95b9ec --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp @@ -0,0 +1,123 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 26 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "ints" + OpMemberName %SSBO 1 "uints" + OpName %_ "" + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 16 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 + %SSBO = OpTypeStruct %v4int %v4uint +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v4int = OpTypePointer Uniform %v4int + %int_1 = OpConstant %int 1 +%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint + %main = OpFunction %void None %3 + %5 = OpLabel + %ints_ptr = OpAccessChain %_ptr_Uniform_v4int %_ %int_0 + %uints_ptr = OpAccessChain %_ptr_Uniform_v4uint %_ %int_1 + %ints = OpLoad %v4int %ints_ptr + %uints = OpLoad %v4uint %uints_ptr + + %int_to_int_sabs = OpExtInst %v4int %1 SAbs %ints + %int_to_uint_sabs = OpExtInst %v4uint %1 SAbs %ints + %uint_to_int_sabs = OpExtInst %v4int %1 SAbs %uints + %uint_to_uint_sabs = OpExtInst %v4uint %1 SAbs %uints + + %int_to_int_ssign = OpExtInst %v4int %1 SSign %ints + %int_to_uint_ssign = OpExtInst %v4uint %1 SSign %ints + %uint_to_int_ssign = OpExtInst %v4int %1 SSign %uints + %uint_to_uint_ssign = OpExtInst %v4uint %1 SSign %uints + + %int_to_int_smsb = OpExtInst %v4int %1 FindSMsb %uints + %int_to_uint_smsb = OpExtInst %v4uint %1 FindSMsb %uints + %uint_to_int_umsb = OpExtInst %v4int %1 FindUMsb %ints + %uint_to_uint_umsb = OpExtInst %v4uint %1 FindUMsb %ints + + %int_to_int_smin = OpExtInst %v4int %1 SMin %ints %ints + %int_to_uint_smin = OpExtInst %v4uint %1 SMin %ints %uints + %uint_to_int_smin = OpExtInst %v4int %1 SMin %uints %uints + %uint_to_uint_smin = OpExtInst %v4uint %1 SMin %uints %ints + + %int_to_int_umin = OpExtInst %v4int %1 UMin %ints %uints + %int_to_uint_umin = OpExtInst %v4uint %1 UMin %ints %uints + %uint_to_int_umin = OpExtInst %v4int %1 UMin %uints %ints + %uint_to_uint_umin = OpExtInst %v4uint %1 UMin %uints %ints + + %int_to_int_smax = OpExtInst %v4int %1 SMax %ints %ints + %int_to_uint_smax = OpExtInst %v4uint %1 SMax %ints %ints + %uint_to_int_smax = OpExtInst %v4int %1 SMax %uints %ints + %uint_to_uint_smax = OpExtInst %v4uint %1 SMax %uints %ints + + %int_to_int_umax = OpExtInst %v4int %1 UMax %ints %uints + %int_to_uint_umax = OpExtInst %v4uint %1 UMax %ints %ints + %uint_to_int_umax = OpExtInst %v4int %1 UMax %uints %ints + %uint_to_uint_umax = OpExtInst %v4uint %1 UMax %uints %ints + + %int_to_int_sclamp = OpExtInst %v4int %1 SClamp %uints %uints %uints + %int_to_uint_sclamp = OpExtInst %v4uint %1 SClamp %uints %uints %uints + %uint_to_int_uclamp = OpExtInst %v4int %1 UClamp %ints %ints %ints + %uint_to_uint_uclamp = OpExtInst %v4uint %1 UClamp %ints %ints %ints + + OpStore %ints_ptr %int_to_int_sabs + OpStore %uints_ptr %int_to_uint_sabs + OpStore %ints_ptr %uint_to_int_sabs + OpStore %uints_ptr %uint_to_uint_sabs + + OpStore %ints_ptr %int_to_int_ssign + OpStore %uints_ptr %int_to_uint_ssign + OpStore %ints_ptr %uint_to_int_ssign + OpStore %uints_ptr %uint_to_uint_ssign + + OpStore %ints_ptr %int_to_int_smsb + OpStore %uints_ptr %int_to_uint_smsb + OpStore %ints_ptr %uint_to_int_umsb + OpStore %uints_ptr %uint_to_uint_umsb + + OpStore %ints_ptr %int_to_int_smin + OpStore %uints_ptr %int_to_uint_smin + OpStore %ints_ptr %uint_to_int_smin + OpStore %uints_ptr %uint_to_uint_smin + + OpStore %ints_ptr %int_to_int_umin + OpStore %uints_ptr %int_to_uint_umin + OpStore %ints_ptr %uint_to_int_umin + OpStore %uints_ptr %uint_to_uint_umin + + OpStore %ints_ptr %int_to_int_smax + OpStore %uints_ptr %int_to_uint_smax + OpStore %ints_ptr %uint_to_int_smax + OpStore %uints_ptr %uint_to_uint_smax + + OpStore %ints_ptr %int_to_int_umax + OpStore %uints_ptr %int_to_uint_umax + OpStore %ints_ptr %uint_to_int_umax + OpStore %uints_ptr %uint_to_uint_umax + + OpStore %ints_ptr %int_to_int_sclamp + OpStore %uints_ptr %int_to_uint_sclamp + OpStore %ints_ptr %uint_to_int_uclamp + OpStore %uints_ptr %uint_to_uint_uclamp + + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp new file mode 100644 index 00000000000..30db11d45bc --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp @@ -0,0 +1,55 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 45 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 4 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %ResTypeMod = OpTypeStruct %float %float +%_ptr_Function_ResTypeMod = OpTypePointer Function %ResTypeMod + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_20 = OpConstant %float 20 + %int_1 = OpConstant %int 1 +%_ptr_Function_float = OpTypePointer Function %float +%ResTypeFrexp = OpTypeStruct %float %int +%_ptr_Function_ResTypeFrexp = OpTypePointer Function %ResTypeFrexp + %float_40 = OpConstant %float 40 +%_ptr_Function_int = OpTypePointer Function %int + %SSBO = OpTypeStruct %float %int +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_int = OpTypePointer Uniform %int + %main = OpFunction %void None %3 + %5 = OpLabel + %modres = OpExtInst %ResTypeMod %1 ModfStruct %float_20 + %frexpres = OpExtInst %ResTypeFrexp %1 FrexpStruct %float_40 + + %modres_f = OpCompositeExtract %float %modres 0 + %modres_i = OpCompositeExtract %float %modres 1 + %frexpres_f = OpCompositeExtract %float %frexpres 0 + %frexpres_i = OpCompositeExtract %int %frexpres 1 + + %float_ptr = OpAccessChain %_ptr_Uniform_float %_ %int_0 + %int_ptr = OpAccessChain %_ptr_Uniform_int %_ %int_1 + + OpStore %float_ptr %modres_f + OpStore %float_ptr %modres_i + OpStore %float_ptr %frexpres_f + OpStore %int_ptr %frexpres_i + + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp new file mode 100644 index 00000000000..b7ca1143c59 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp @@ -0,0 +1,63 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 30 +; Schema: 0 + OpCapability Shader + OpCapability Int64 + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 1 1 1 + OpSource GLSL 450 + OpSourceExtension "GL_ARB_gpu_shader_int64" + OpName %main "main" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "s64" + OpMemberName %SSBO 1 "u64" + OpName %_ "" + OpName %ConstantInt "ConstantInt" + OpName %ConstantInt64_1 "ConstantInt64_1" + OpName %ConstantUint "ConstantUint" + OpName %ConstantInt64_2 "ConstantInt64_2" + OpName %ConstantUint64_1 "ConstantUint64_1" + OpName %ConstantUint64_2 "ConstantUint64_2" + OpMemberDecorate %SSBO 0 Offset 0 + OpMemberDecorate %SSBO 1 Offset 4 + OpDecorate %SSBO BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + OpDecorate %ConstantInt SpecId 0 + OpDecorate %ConstantUint SpecId 1 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %long = OpTypeInt 64 1 + %ulong = OpTypeInt 64 0 + %SSBO = OpTypeStruct %int %uint +%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO + %_ = OpVariable %_ptr_Uniform_SSBO Uniform + %int_0 = OpConstant %int 0 + %ulong_0 = OpConstant %ulong 0 +%ConstantInt = OpSpecConstant %int 1 +%ConstantUint = OpSpecConstant %uint 2 +%ConstantInt64_1 = OpSpecConstantOp %long SConvert %ConstantInt +%ConstantInt64_2 = OpSpecConstantOp %long SConvert %ConstantUint +%ConstantUint64_1 = OpSpecConstantOp %ulong SConvert %ConstantInt +%ConstantUint64_2 = OpSpecConstantOp %ulong SConvert %ConstantUint + %added_long = OpSpecConstantOp %long IAdd %ConstantInt64_1 %ConstantInt64_2 + %added_ulong = OpSpecConstantOp %ulong IAdd %ConstantUint64_1 %ConstantUint64_2 + %trunc_long = OpSpecConstantOp %int SConvert %added_long + %trunc_ulong = OpSpecConstantOp %uint SConvert %added_ulong +%_ptr_Uniform_int = OpTypePointer Uniform %int + %int_1 = OpConstant %int 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %main = OpFunction %void None %3 + %5 = OpLabel + %22 = OpAccessChain %_ptr_Uniform_int %_ %int_0 + OpStore %22 %trunc_long + %29 = OpAccessChain %_ptr_Uniform_uint %_ %int_1 + OpStore %29 %trunc_ulong + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/combined-image-sampler-dxc-min16float.asm.invalid.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/combined-image-sampler-dxc-min16float.asm.invalid.frag new file mode 100644 index 00000000000..dda2f0279ca --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/combined-image-sampler-dxc-min16float.asm.invalid.frag @@ -0,0 +1,95 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 48 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %PSMain "main" %in_var_COLOR %in_var_TEXCOORD0 %out_var_SV_TARGET + OpExecutionMode %PSMain OriginUpperLeft + ; Not actually ESSL, but makes testing easier. + OpSource ESSL 310 + OpName %type_2d_image "type.2d.image" + OpName %tex "tex" + OpName %type_sampler "type.sampler" + OpName %Samp "Samp" + OpName %in_var_COLOR "in.var.COLOR" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %out_var_SV_TARGET "out.var.SV_TARGET" + OpName %PSMain "PSMain" + OpName %PSInput "PSInput" + OpMemberName %PSInput 0 "color" + OpMemberName %PSInput 1 "uv" + OpName %param_var_input "param.var.input" + OpName %src_PSMain "src.PSMain" + OpName %input "input" + OpName %bb_entry "bb.entry" + OpName %a "a" + OpName %type_sampled_image "type.sampled.image" + OpDecorate %in_var_COLOR Location 0 + OpDecorate %in_var_TEXCOORD0 Location 1 + OpDecorate %out_var_SV_TARGET Location 0 + OpDecorate %tex DescriptorSet 0 + OpDecorate %tex Binding 0 + OpDecorate %Samp DescriptorSet 0 + OpDecorate %Samp Binding 1 + OpDecorate %tex RelaxedPrecision + OpDecorate %a RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float = OpTypeFloat 32 +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler + %v4float = OpTypeVector %float 4 +%_ptr_Input_v4float = OpTypePointer Input %v4float + %v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %21 = OpTypeFunction %void + %PSInput = OpTypeStruct %v4float %v2float +%_ptr_Function_PSInput = OpTypePointer Function %PSInput + %31 = OpTypeFunction %v4float %_ptr_Function_PSInput +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Function_v2float = OpTypePointer Function %v2float +%type_sampled_image = OpTypeSampledImage %type_2d_image + %tex = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant + %Samp = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%in_var_COLOR = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input +%out_var_SV_TARGET = OpVariable %_ptr_Output_v4float Output + %PSMain = OpFunction %void None %21 + %22 = OpLabel +%param_var_input = OpVariable %_ptr_Function_PSInput Function + %26 = OpLoad %v4float %in_var_COLOR + %27 = OpLoad %v2float %in_var_TEXCOORD0 + %28 = OpCompositeConstruct %PSInput %26 %27 + OpStore %param_var_input %28 + %29 = OpFunctionCall %v4float %src_PSMain %param_var_input + OpStore %out_var_SV_TARGET %29 + OpReturn + OpFunctionEnd + %src_PSMain = OpFunction %v4float None %31 + %input = OpFunctionParameter %_ptr_Function_PSInput + %bb_entry = OpLabel + %a = OpVariable %_ptr_Function_v4float Function + %36 = OpAccessChain %_ptr_Function_v4float %input %int_0 + %37 = OpLoad %v4float %36 + %38 = OpLoad %type_2d_image %tex + %39 = OpLoad %type_sampler %Samp + %41 = OpAccessChain %_ptr_Function_v2float %input %int_1 + %42 = OpLoad %v2float %41 + %44 = OpSampledImage %type_sampled_image %38 %39 + %45 = OpImageSampleImplicitLod %v4float %44 %42 None + %46 = OpFMul %v4float %37 %45 + OpStore %a %46 + %47 = OpLoad %v4float %a + OpReturnValue %47 + OpFunctionEnd + diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag new file mode 100644 index 00000000000..9f1a4573ddc --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag @@ -0,0 +1,63 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 33 +; Schema: 0 + OpCapability Shader + OpCapability DemoteToHelperInvocationEXT + OpExtension "SPV_EXT_demote_to_helper_invocation" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %vA %FragColor + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpSourceExtension "GL_EXT_demote_to_helper_invocation" + OpName %main "main" + OpName %foobar_i1_ "foobar(i1;" + OpName %a "a" + OpName %a_0 "a" + OpName %vA "vA" + OpName %param "param" + OpName %FragColor "FragColor" + OpDecorate %vA Flat + OpDecorate %vA Location 0 + OpDecorate %FragColor Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %10 = OpTypeFunction %v4float %_ptr_Function_int + %int_0 = OpConstant %int 0 + %bool = OpTypeBool + %float_10 = OpConstant %float 10 + %21 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Input_int = OpTypePointer Input %int + %vA = OpVariable %_ptr_Input_int Input +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %main = OpFunction %void None %3 + %5 = OpLabel + %a_0 = OpVariable %_ptr_Function_v4float Function + %param = OpVariable %_ptr_Function_int Function + %29 = OpLoad %int %vA + OpStore %param %29 + %30 = OpFunctionCall %v4float %foobar_i1_ %param + OpStore %FragColor %21 + OpReturn + OpFunctionEnd + %foobar_i1_ = OpFunction %v4float None %10 + %a = OpFunctionParameter %_ptr_Function_int + %13 = OpLabel + %14 = OpLoad %int %a + %17 = OpSLessThan %bool %14 %int_0 + OpSelectionMerge %19 None + OpBranchConditional %17 %18 %19 + %18 = OpLabel + OpDemoteToHelperInvocationEXT + OpBranch %19 + %19 = OpLabel + OpReturnValue %21 + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag new file mode 100644 index 00000000000..0f039166b07 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag @@ -0,0 +1,59 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 34 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %vA %FragColor + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %foobar_i1_ "foobar(i1;" + OpName %a "a" + OpName %a_0 "a" + OpName %vA "vA" + OpName %param "param" + OpName %FragColor "FragColor" + OpDecorate %vA Flat + OpDecorate %vA Location 0 + OpDecorate %FragColor Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %10 = OpTypeFunction %v4float %_ptr_Function_int + %int_0 = OpConstant %int 0 + %bool = OpTypeBool + %float_10 = OpConstant %float 10 + %22 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Input_int = OpTypePointer Input %int + %vA = OpVariable %_ptr_Input_int Input +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %main = OpFunction %void None %3 + %5 = OpLabel + %a_0 = OpVariable %_ptr_Function_v4float Function + %param = OpVariable %_ptr_Function_int Function + %30 = OpLoad %int %vA + OpStore %param %30 + %31 = OpFunctionCall %v4float %foobar_i1_ %param + OpStore %FragColor %22 + OpReturn + OpFunctionEnd + %foobar_i1_ = OpFunction %v4float None %10 + %a = OpFunctionParameter %_ptr_Function_int + %13 = OpLabel + %14 = OpLoad %int %a + %17 = OpSLessThan %bool %14 %int_0 + OpSelectionMerge %19 None + OpBranchConditional %17 %18 %19 + %18 = OpLabel + OpKill + %19 = OpLabel + OpReturnValue %22 + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/do-while-continue-phi.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/do-while-continue-phi.asm.frag new file mode 100644 index 00000000000..97400dfb16e --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/do-while-continue-phi.asm.frag @@ -0,0 +1,64 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 42 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color + OpExecutionMode %main OriginUpperLeft + OpSource ESSL 310 + OpName %main "main" + OpName %gl_FragCoord "gl_FragCoord" + OpName %_GLF_color "_GLF_color" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %_GLF_color Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint = OpTypeInt 32 0 + %uint_0 = OpConstant %uint 0 +%_ptr_Input_float = OpTypePointer Input %float + %bool = OpTypeBool + %false = OpConstantFalse %bool +%_ptr_Output_v4float = OpTypePointer Output %v4float + %_GLF_color = OpVariable %_ptr_Output_v4float Output + %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 + %31 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 + %true = OpConstantTrue %bool + %main = OpFunction %void None %3 + %5 = OpLabel + OpBranch %33 + %33 = OpLabel + OpLoopMerge %32 %35 None + OpBranch %6 + %6 = OpLabel + OpLoopMerge %8 %24 None + OpBranch %7 + %7 = OpLabel + %17 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %18 = OpLoad %float %17 + %22 = OpFOrdNotEqual %bool %18 %18 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + OpBranch %8 + %24 = OpLabel + OpBranchConditional %false %6 %8 + %8 = OpLabel + %41 = OpPhi %bool %true %23 %false %24 + OpSelectionMerge %39 None + OpBranchConditional %41 %32 %39 + %39 = OpLabel + OpStore %_GLF_color %31 + OpBranch %32 + %35 = OpLabel + OpBranch %33 + %32 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/do-while-loop-inverted-test.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/do-while-loop-inverted-test.asm.frag new file mode 100644 index 00000000000..93a39cfe12a --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/do-while-loop-inverted-test.asm.frag @@ -0,0 +1,51 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 28 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %i "i" + OpName %j "j" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_20 = OpConstant %int 20 + %bool = OpTypeBool + %main = OpFunction %void None %3 + %5 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %j = OpVariable %_ptr_Function_int Function + OpStore %i %int_0 + OpStore %j %int_0 + OpBranch %11 + %11 = OpLabel + OpLoopMerge %13 %14 None + OpBranch %12 + %12 = OpLabel + %15 = OpLoad %int %j + %16 = OpLoad %int %i + %17 = OpIAdd %int %15 %16 + %19 = OpIAdd %int %17 %int_1 + %20 = OpLoad %int %j + %21 = OpIMul %int %19 %20 + OpStore %j %21 + %22 = OpLoad %int %i + %23 = OpIAdd %int %22 %int_1 + OpStore %i %23 + OpBranch %14 + %14 = OpLabel + %24 = OpLoad %int %i + %27 = OpIEqual %bool %24 %int_20 + OpBranchConditional %27 %13 %11 + %13 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.frag new file mode 100644 index 00000000000..1e67b381e25 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.frag @@ -0,0 +1,37 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_16 = OpConstant %int 16 + %bool = OpTypeBool + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + OpBranch %8 + %8 = OpLabel + %10 = OpPhi %int %12 %7 %int_0 %5 + OpLoopMerge %6 %7 None + OpBranch %11 + %11 = OpLabel + %16 = OpIEqual %bool %10 %int_16 + OpBranchConditional %16 %18 %19 + %18 = OpLabel + OpBranch %6 + %19 = OpLabel + OpBranch %17 + %17 = OpLabel + %21 = OpIAdd %int %10 %int_1 + OpBranch %7 + %7 = OpLabel + %12 = OpPhi %int %21 %17 + OpBranch %8 + %6 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.frag new file mode 100644 index 00000000000..22c6e55c421 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.frag @@ -0,0 +1,37 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_16 = OpConstant %int 16 + %bool = OpTypeBool + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + OpBranch %8 + %8 = OpLabel + %10 = OpPhi %int %12 %7 %int_0 %5 + OpLoopMerge %6 %7 None + OpBranch %11 + %11 = OpLabel + %16 = OpINotEqual %bool %10 %int_16 + OpBranchConditional %16 %19 %18 + %18 = OpLabel + OpBranch %6 + %19 = OpLabel + OpBranch %17 + %17 = OpLabel + %21 = OpIAdd %int %10 %int_1 + OpBranch %7 + %7 = OpLabel + %12 = OpPhi %int %21 %17 + OpBranch %8 + %6 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag new file mode 100644 index 00000000000..a87ceee1820 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag @@ -0,0 +1,35 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_16 = OpConstant %int 16 + %bool = OpTypeBool + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + OpBranch %8 + %8 = OpLabel + %10 = OpPhi %int %12 %7 %int_0 %5 + OpLoopMerge %6 %7 None + OpBranch %11 + %11 = OpLabel + %16 = OpIEqual %bool %10 %int_16 + OpBranchConditional %16 %6 %19 + %19 = OpLabel + OpBranch %17 + %17 = OpLabel + %21 = OpIAdd %int %10 %int_1 + OpBranch %7 + %7 = OpLabel + %12 = OpPhi %int %21 %17 + OpBranch %8 + %6 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/image-fetch-uint-coord.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/image-fetch-uint-coord.asm.frag new file mode 100644 index 00000000000..ca8022d4bb9 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/image-fetch-uint-coord.asm.frag @@ -0,0 +1,44 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 29 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %in_var_TEXCOORD0 %out_var_SV_Target0 + OpExecutionMode %main OriginUpperLeft + OpSource HLSL 600 + OpName %type_2d_image "type.2d.image" + OpName %Tex "Tex" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %main "main" + OpDecorate %in_var_TEXCOORD0 Flat + OpDecorate %in_var_TEXCOORD0 Location 0 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %Tex DescriptorSet 0 + OpDecorate %Tex Binding 0 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %float = OpTypeFloat 32 +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %16 = OpTypeFunction %void + %Tex = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v3uint Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %main = OpFunction %void None %16 + %19 = OpLabel + %20 = OpLoad %v3uint %in_var_TEXCOORD0 + %21 = OpCompositeExtract %uint %20 2 + %27 = OpLoad %type_2d_image %Tex + %28 = OpImageFetch %v4float %27 %20 Lod %21 + OpStore %out_var_SV_Target0 %28 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag new file mode 100644 index 00000000000..8b09e5b68f8 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag @@ -0,0 +1,646 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 3 +; Bound: 1532 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %IN_HPosition %IN_Uv_EdgeDistance1 %IN_UvStuds_EdgeDistance2 %IN_Color %IN_LightPosition_Fog %IN_View_Depth %IN_Normal_SpecPower %IN_Tangent %IN_PosLightSpace_Reflectance %IN_studIndex %_entryPointOutput + OpExecutionMode %main OriginUpperLeft + OpSource HLSL 500 + OpName %main "main" + OpName %VertexOutput "VertexOutput" + OpMemberName %VertexOutput 0 "HPosition" + OpMemberName %VertexOutput 1 "Uv_EdgeDistance1" + OpMemberName %VertexOutput 2 "UvStuds_EdgeDistance2" + OpMemberName %VertexOutput 3 "Color" + OpMemberName %VertexOutput 4 "LightPosition_Fog" + OpMemberName %VertexOutput 5 "View_Depth" + OpMemberName %VertexOutput 6 "Normal_SpecPower" + OpMemberName %VertexOutput 7 "Tangent" + OpMemberName %VertexOutput 8 "PosLightSpace_Reflectance" + OpMemberName %VertexOutput 9 "studIndex" + OpName %Surface "Surface" + OpMemberName %Surface 0 "albedo" + OpMemberName %Surface 1 "normal" + OpMemberName %Surface 2 "specular" + OpMemberName %Surface 3 "gloss" + OpMemberName %Surface 4 "reflectance" + OpMemberName %Surface 5 "opacity" + OpName %SurfaceInput "SurfaceInput" + OpMemberName %SurfaceInput 0 "Color" + OpMemberName %SurfaceInput 1 "Uv" + OpMemberName %SurfaceInput 2 "UvStuds" + OpName %Globals "Globals" + OpMemberName %Globals 0 "ViewProjection" + OpMemberName %Globals 1 "ViewRight" + OpMemberName %Globals 2 "ViewUp" + OpMemberName %Globals 3 "ViewDir" + OpMemberName %Globals 4 "CameraPosition" + OpMemberName %Globals 5 "AmbientColor" + OpMemberName %Globals 6 "Lamp0Color" + OpMemberName %Globals 7 "Lamp0Dir" + OpMemberName %Globals 8 "Lamp1Color" + OpMemberName %Globals 9 "FogParams" + OpMemberName %Globals 10 "FogColor" + OpMemberName %Globals 11 "LightBorder" + OpMemberName %Globals 12 "LightConfig0" + OpMemberName %Globals 13 "LightConfig1" + OpMemberName %Globals 14 "LightConfig2" + OpMemberName %Globals 15 "LightConfig3" + OpMemberName %Globals 16 "RefractionBias_FadeDistance_GlowFactor" + OpMemberName %Globals 17 "OutlineBrightness_ShadowInfo" + OpMemberName %Globals 18 "ShadowMatrix0" + OpMemberName %Globals 19 "ShadowMatrix1" + OpMemberName %Globals 20 "ShadowMatrix2" + OpName %CB0 "CB0" + OpMemberName %CB0 0 "CB0" + OpName %_ "" + OpName %LightMapTexture "LightMapTexture" + OpName %LightMapSampler "LightMapSampler" + OpName %ShadowMapSampler "ShadowMapSampler" + OpName %ShadowMapTexture "ShadowMapTexture" + OpName %EnvironmentMapTexture "EnvironmentMapTexture" + OpName %EnvironmentMapSampler "EnvironmentMapSampler" + OpName %IN_HPosition "IN.HPosition" + OpName %IN_Uv_EdgeDistance1 "IN.Uv_EdgeDistance1" + OpName %IN_UvStuds_EdgeDistance2 "IN.UvStuds_EdgeDistance2" + OpName %IN_Color "IN.Color" + OpName %IN_LightPosition_Fog "IN.LightPosition_Fog" + OpName %IN_View_Depth "IN.View_Depth" + OpName %IN_Normal_SpecPower "IN.Normal_SpecPower" + OpName %IN_Tangent "IN.Tangent" + OpName %IN_PosLightSpace_Reflectance "IN.PosLightSpace_Reflectance" + OpName %IN_studIndex "IN.studIndex" + OpName %_entryPointOutput "@entryPointOutput" + OpName %DiffuseMapSampler "DiffuseMapSampler" + OpName %DiffuseMapTexture "DiffuseMapTexture" + OpName %NormalMapSampler "NormalMapSampler" + OpName %NormalMapTexture "NormalMapTexture" + OpName %NormalDetailMapTexture "NormalDetailMapTexture" + OpName %NormalDetailMapSampler "NormalDetailMapSampler" + OpName %StudsMapTexture "StudsMapTexture" + OpName %StudsMapSampler "StudsMapSampler" + OpName %SpecularMapSampler "SpecularMapSampler" + OpName %SpecularMapTexture "SpecularMapTexture" + OpName %Params "Params" + OpMemberName %Params 0 "LqmatFarTilingFactor" + OpName %CB2 "CB2" + OpMemberName %CB2 0 "CB2" + OpMemberDecorate %Globals 0 ColMajor + OpMemberDecorate %Globals 0 Offset 0 + OpMemberDecorate %Globals 0 MatrixStride 16 + OpMemberDecorate %Globals 1 Offset 64 + OpMemberDecorate %Globals 2 Offset 80 + OpMemberDecorate %Globals 3 Offset 96 + OpMemberDecorate %Globals 4 Offset 112 + OpMemberDecorate %Globals 5 Offset 128 + OpMemberDecorate %Globals 6 Offset 144 + OpMemberDecorate %Globals 7 Offset 160 + OpMemberDecorate %Globals 8 Offset 176 + OpMemberDecorate %Globals 9 Offset 192 + OpMemberDecorate %Globals 10 Offset 208 + OpMemberDecorate %Globals 11 Offset 224 + OpMemberDecorate %Globals 12 Offset 240 + OpMemberDecorate %Globals 13 Offset 256 + OpMemberDecorate %Globals 14 Offset 272 + OpMemberDecorate %Globals 15 Offset 288 + OpMemberDecorate %Globals 16 Offset 304 + OpMemberDecorate %Globals 17 Offset 320 + OpMemberDecorate %Globals 18 Offset 336 + OpMemberDecorate %Globals 19 Offset 352 + OpMemberDecorate %Globals 20 Offset 368 + OpMemberDecorate %CB0 0 Offset 0 + OpDecorate %CB0 Block + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + OpDecorate %LightMapTexture DescriptorSet 1 + OpDecorate %LightMapTexture Binding 6 + OpDecorate %LightMapSampler DescriptorSet 1 + OpDecorate %LightMapSampler Binding 6 + OpDecorate %ShadowMapSampler DescriptorSet 1 + OpDecorate %ShadowMapSampler Binding 1 + OpDecorate %ShadowMapTexture DescriptorSet 1 + OpDecorate %ShadowMapTexture Binding 1 + OpDecorate %EnvironmentMapTexture DescriptorSet 1 + OpDecorate %EnvironmentMapTexture Binding 2 + OpDecorate %EnvironmentMapSampler DescriptorSet 1 + OpDecorate %EnvironmentMapSampler Binding 2 + OpDecorate %IN_HPosition BuiltIn FragCoord + OpDecorate %IN_Uv_EdgeDistance1 Location 0 + OpDecorate %IN_UvStuds_EdgeDistance2 Location 1 + OpDecorate %IN_Color Location 2 + OpDecorate %IN_LightPosition_Fog Location 3 + OpDecorate %IN_View_Depth Location 4 + OpDecorate %IN_Normal_SpecPower Location 5 + OpDecorate %IN_Tangent Location 6 + OpDecorate %IN_PosLightSpace_Reflectance Location 7 + OpDecorate %IN_studIndex Location 8 + OpDecorate %_entryPointOutput Location 0 + OpDecorate %DiffuseMapSampler DescriptorSet 1 + OpDecorate %DiffuseMapSampler Binding 3 + OpDecorate %DiffuseMapTexture DescriptorSet 1 + OpDecorate %DiffuseMapTexture Binding 3 + OpDecorate %NormalMapSampler DescriptorSet 1 + OpDecorate %NormalMapSampler Binding 4 + OpDecorate %NormalMapTexture DescriptorSet 1 + OpDecorate %NormalMapTexture Binding 4 + OpDecorate %NormalDetailMapTexture DescriptorSet 1 + OpDecorate %NormalDetailMapTexture Binding 8 + OpDecorate %NormalDetailMapSampler DescriptorSet 1 + OpDecorate %NormalDetailMapSampler Binding 8 + OpDecorate %StudsMapTexture DescriptorSet 1 + OpDecorate %StudsMapTexture Binding 0 + OpDecorate %StudsMapSampler DescriptorSet 1 + OpDecorate %StudsMapSampler Binding 0 + OpDecorate %SpecularMapSampler DescriptorSet 1 + OpDecorate %SpecularMapSampler Binding 5 + OpDecorate %SpecularMapTexture DescriptorSet 1 + OpDecorate %SpecularMapTexture Binding 5 + OpMemberDecorate %Params 0 Offset 0 + OpMemberDecorate %CB2 0 Offset 0 + OpDecorate %CB2 Block + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float + %8 = OpTypeFunction %float %_ptr_Function_float + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %v3float = OpTypeVector %float 3 + %18 = OpTypeFunction %v3float %_ptr_Function_v4float +%_ptr_Function_v3float = OpTypePointer Function %v3float + %23 = OpTypeFunction %v4float %_ptr_Function_v3float + %27 = OpTypeFunction %float %_ptr_Function_v3float + %31 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float + %36 = OpTypeSampler +%_ptr_Function_36 = OpTypePointer Function %36 + %38 = OpTypeImage %float 2D 0 0 0 1 Unknown +%_ptr_Function_38 = OpTypePointer Function %38 + %40 = OpTypeFunction %float %_ptr_Function_36 %_ptr_Function_38 %_ptr_Function_v3float %_ptr_Function_float +%VertexOutput = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v3float %v4float %float +%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput + %Surface = OpTypeStruct %v3float %v3float %float %float %float %float + %50 = OpTypeFunction %Surface %_ptr_Function_VertexOutput + %54 = OpTypeFunction %v4float %_ptr_Function_VertexOutput + %v2float = OpTypeVector %float 2 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %60 = OpTypeFunction %v4float %_ptr_Function_36 %_ptr_Function_38 %_ptr_Function_v2float %_ptr_Function_float %_ptr_Function_float +%SurfaceInput = OpTypeStruct %v4float %v2float %v2float +%_ptr_Function_SurfaceInput = OpTypePointer Function %SurfaceInput + %70 = OpTypeFunction %Surface %_ptr_Function_SurfaceInput %_ptr_Function_v2float + %float_0 = OpConstant %float 0 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 +%mat4v4float = OpTypeMatrix %v4float 4 + %Globals = OpTypeStruct %mat4v4float %v4float %v4float %v4float %v3float %v3float %v3float %v3float %v3float %v4float %v3float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float + %CB0 = OpTypeStruct %Globals +%_ptr_Uniform_CB0 = OpTypePointer Uniform %CB0 + %_ = OpVariable %_ptr_Uniform_CB0 Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_15 = OpConstant %int 15 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %int_14 = OpConstant %int 14 + %128 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %133 = OpTypeImage %float 3D 0 0 0 1 Unknown +%_ptr_UniformConstant_133 = OpTypePointer UniformConstant %133 +%LightMapTexture = OpVariable %_ptr_UniformConstant_133 UniformConstant +%_ptr_UniformConstant_36 = OpTypePointer UniformConstant %36 +%LightMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant + %140 = OpTypeSampledImage %133 + %int_11 = OpConstant %int 11 + %uint = OpTypeInt 32 0 + %float_9 = OpConstant %float 9 + %float_20 = OpConstant %float 20 + %float_0_5 = OpConstant %float 0.5 + %183 = OpTypeSampledImage %38 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %int_17 = OpConstant %int 17 + %uint_3 = OpConstant %uint 3 +%_ptr_Uniform_float = OpTypePointer Uniform %float + %float_0_25 = OpConstant %float 0.25 + %int_5 = OpConstant %int 5 +%float_0_00333333 = OpConstant %float 0.00333333 + %int_16 = OpConstant %int 16 +%_ptr_Function_Surface = OpTypePointer Function %Surface + %int_6 = OpConstant %int 6 + %int_7 = OpConstant %int 7 +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float + %int_8 = OpConstant %int 8 +%ShadowMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant +%_ptr_UniformConstant_38 = OpTypePointer UniformConstant %38 +%ShadowMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant + %367 = OpTypeImage %float Cube 0 0 0 1 Unknown +%_ptr_UniformConstant_367 = OpTypePointer UniformConstant %367 +%EnvironmentMapTexture = OpVariable %_ptr_UniformConstant_367 UniformConstant +%EnvironmentMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant + %373 = OpTypeSampledImage %367 + %float_1_5 = OpConstant %float 1.5 + %int_10 = OpConstant %int 10 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%IN_HPosition = OpVariable %_ptr_Input_v4float Input +%IN_Uv_EdgeDistance1 = OpVariable %_ptr_Input_v4float Input +%IN_UvStuds_EdgeDistance2 = OpVariable %_ptr_Input_v4float Input + %IN_Color = OpVariable %_ptr_Input_v4float Input +%IN_LightPosition_Fog = OpVariable %_ptr_Input_v4float Input +%IN_View_Depth = OpVariable %_ptr_Input_v4float Input +%IN_Normal_SpecPower = OpVariable %_ptr_Input_v4float Input +%_ptr_Input_v3float = OpTypePointer Input %v3float + %IN_Tangent = OpVariable %_ptr_Input_v3float Input +%IN_PosLightSpace_Reflectance = OpVariable %_ptr_Input_v4float Input +%_ptr_Input_float = OpTypePointer Input %float +%IN_studIndex = OpVariable %_ptr_Input_float Input +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_entryPointOutput = OpVariable %_ptr_Output_v4float Output + %bool = OpTypeBool +%DiffuseMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant +%DiffuseMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant +%NormalMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant +%NormalMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant +%NormalDetailMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant +%NormalDetailMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant + %float_0_3 = OpConstant %float 0.3 +%StudsMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant +%StudsMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant +%SpecularMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant +%SpecularMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant + %float_0_75 = OpConstant %float 0.75 + %float_256 = OpConstant %float 256 + %689 = OpConstantComposite %v2float %float_2 %float_256 + %float_0_01 = OpConstant %float 0.01 + %692 = OpConstantComposite %v2float %float_0 %float_0_01 + %float_0_8 = OpConstant %float 0.8 + %float_120 = OpConstant %float 120 + %697 = OpConstantComposite %v2float %float_0_8 %float_120 + %Params = OpTypeStruct %v4float + %CB2 = OpTypeStruct %Params +%_ptr_Uniform_CB2 = OpTypePointer Uniform %CB2 + %false = OpConstantFalse %bool + %1509 = OpUndef %VertexOutput + %1510 = OpUndef %SurfaceInput + %1511 = OpUndef %v2float + %1512 = OpUndef %v4float + %1531 = OpUndef %Surface + %main = OpFunction %void None %3 + %5 = OpLabel + %501 = OpLoad %v4float %IN_HPosition + %1378 = OpCompositeInsert %VertexOutput %501 %1509 0 + %504 = OpLoad %v4float %IN_Uv_EdgeDistance1 + %1380 = OpCompositeInsert %VertexOutput %504 %1378 1 + %507 = OpLoad %v4float %IN_UvStuds_EdgeDistance2 + %1382 = OpCompositeInsert %VertexOutput %507 %1380 2 + %510 = OpLoad %v4float %IN_Color + %1384 = OpCompositeInsert %VertexOutput %510 %1382 3 + %513 = OpLoad %v4float %IN_LightPosition_Fog + %1386 = OpCompositeInsert %VertexOutput %513 %1384 4 + %516 = OpLoad %v4float %IN_View_Depth + %1388 = OpCompositeInsert %VertexOutput %516 %1386 5 + %519 = OpLoad %v4float %IN_Normal_SpecPower + %1390 = OpCompositeInsert %VertexOutput %519 %1388 6 + %523 = OpLoad %v3float %IN_Tangent + %1392 = OpCompositeInsert %VertexOutput %523 %1390 7 + %526 = OpLoad %v4float %IN_PosLightSpace_Reflectance + %1394 = OpCompositeInsert %VertexOutput %526 %1392 8 + %530 = OpLoad %float %IN_studIndex + %1396 = OpCompositeInsert %VertexOutput %530 %1394 9 + %1400 = OpCompositeInsert %SurfaceInput %510 %1510 0 + %954 = OpVectorShuffle %v2float %504 %504 0 1 + %1404 = OpCompositeInsert %SurfaceInput %954 %1400 1 + %958 = OpVectorShuffle %v2float %507 %507 0 1 + %1408 = OpCompositeInsert %SurfaceInput %958 %1404 2 + %1410 = OpCompositeExtract %float %1408 2 1 + %962 = OpExtInst %float %1 Fract %1410 + %965 = OpFAdd %float %962 %530 + %966 = OpFMul %float %965 %float_0_25 + %1414 = OpCompositeInsert %SurfaceInput %966 %1408 2 1 + %1416 = OpCompositeExtract %float %1396 5 3 + %970 = OpFMul %float %1416 %float_0_00333333 + %971 = OpFSub %float %float_1 %970 + %987 = OpExtInst %float %1 FClamp %971 %float_0 %float_1 + %976 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_16 %uint_1 + %977 = OpLoad %float %976 + %978 = OpFMul %float %1416 %977 + %979 = OpFSub %float %float_1 %978 + %990 = OpExtInst %float %1 FClamp %979 %float_0 %float_1 + %1024 = OpVectorTimesScalar %v2float %954 %float_1 + %1029 = OpLoad %36 %DiffuseMapSampler + %1030 = OpLoad %38 %DiffuseMapTexture + OpBranch %1119 + %1119 = OpLabel + OpLoopMerge %1120 %1121 None + OpBranch %1122 + %1122 = OpLabel + %1124 = OpFOrdEqual %bool %float_0 %float_0 + OpSelectionMerge %1125 None + OpBranchConditional %1124 %1126 %1127 + %1126 = OpLabel + %1130 = OpSampledImage %183 %1030 %1029 + %1132 = OpImageSampleImplicitLod %v4float %1130 %1024 + OpBranch %1120 + %1127 = OpLabel + %1134 = OpFSub %float %float_1 %float_0 + %1135 = OpFDiv %float %float_1 %1134 + %1138 = OpSampledImage %183 %1030 %1029 + %1140 = OpVectorTimesScalar %v2float %1024 %float_0_25 + %1141 = OpImageSampleImplicitLod %v4float %1138 %1140 + %1144 = OpSampledImage %183 %1030 %1029 + %1146 = OpImageSampleImplicitLod %v4float %1144 %1024 + %1149 = OpFMul %float %987 %1135 + %1152 = OpFMul %float %float_0 %1135 + %1153 = OpFSub %float %1149 %1152 + %1161 = OpExtInst %float %1 FClamp %1153 %float_0 %float_1 + %1155 = OpCompositeConstruct %v4float %1161 %1161 %1161 %1161 + %1156 = OpExtInst %v4float %1 FMix %1141 %1146 %1155 + OpBranch %1120 + %1125 = OpLabel + %1157 = OpUndef %v4float + OpBranch %1120 + %1121 = OpLabel + OpBranchConditional %false %1119 %1120 + %1120 = OpLabel + %1517 = OpPhi %v4float %1132 %1126 %1156 %1127 %1157 %1125 %1512 %1121 + %1035 = OpVectorTimesScalar %v4float %1517 %float_1 + %1036 = OpLoad %36 %NormalMapSampler + %1037 = OpLoad %38 %NormalMapTexture + OpBranch %1165 + %1165 = OpLabel + OpLoopMerge %1166 %1167 None + OpBranch %1168 + %1168 = OpLabel + OpSelectionMerge %1171 None + OpBranchConditional %1124 %1172 %1173 + %1172 = OpLabel + %1176 = OpSampledImage %183 %1037 %1036 + %1178 = OpImageSampleImplicitLod %v4float %1176 %1024 + OpBranch %1166 + %1173 = OpLabel + %1180 = OpFSub %float %float_1 %float_0 + %1181 = OpFDiv %float %float_1 %1180 + %1184 = OpSampledImage %183 %1037 %1036 + %1186 = OpVectorTimesScalar %v2float %1024 %float_0_25 + %1187 = OpImageSampleImplicitLod %v4float %1184 %1186 + %1190 = OpSampledImage %183 %1037 %1036 + %1192 = OpImageSampleImplicitLod %v4float %1190 %1024 + %1195 = OpFMul %float %990 %1181 + %1198 = OpFMul %float %float_0 %1181 + %1199 = OpFSub %float %1195 %1198 + %1206 = OpExtInst %float %1 FClamp %1199 %float_0 %float_1 + %1201 = OpCompositeConstruct %v4float %1206 %1206 %1206 %1206 + %1202 = OpExtInst %v4float %1 FMix %1187 %1192 %1201 + OpBranch %1166 + %1171 = OpLabel + %1203 = OpUndef %v4float + OpBranch %1166 + %1167 = OpLabel + OpBranchConditional %false %1165 %1166 + %1166 = OpLabel + %1523 = OpPhi %v4float %1178 %1172 %1202 %1173 %1203 %1171 %1512 %1167 + %1210 = OpVectorShuffle %v2float %1523 %1523 3 1 + %1211 = OpVectorTimesScalar %v2float %1210 %float_2 + %1212 = OpCompositeConstruct %v2float %float_1 %float_1 + %1213 = OpFSub %v2float %1211 %1212 + %1216 = OpFNegate %v2float %1213 + %1218 = OpDot %float %1216 %1213 + %1219 = OpFAdd %float %float_1 %1218 + %1220 = OpExtInst %float %1 FClamp %1219 %float_0 %float_1 + %1221 = OpExtInst %float %1 Sqrt %1220 + %1222 = OpCompositeExtract %float %1213 0 + %1223 = OpCompositeExtract %float %1213 1 + %1224 = OpCompositeConstruct %v3float %1222 %1223 %1221 + %1042 = OpLoad %38 %NormalDetailMapTexture + %1043 = OpLoad %36 %NormalDetailMapSampler + %1044 = OpSampledImage %183 %1042 %1043 + %1046 = OpVectorTimesScalar %v2float %1024 %float_0 + %1047 = OpImageSampleImplicitLod %v4float %1044 %1046 + %1228 = OpVectorShuffle %v2float %1047 %1047 3 1 + %1229 = OpVectorTimesScalar %v2float %1228 %float_2 + %1231 = OpFSub %v2float %1229 %1212 + %1234 = OpFNegate %v2float %1231 + %1236 = OpDot %float %1234 %1231 + %1237 = OpFAdd %float %float_1 %1236 + %1238 = OpExtInst %float %1 FClamp %1237 %float_0 %float_1 + %1239 = OpExtInst %float %1 Sqrt %1238 + %1240 = OpCompositeExtract %float %1231 0 + %1241 = OpCompositeExtract %float %1231 1 + %1242 = OpCompositeConstruct %v3float %1240 %1241 %1239 + %1050 = OpVectorShuffle %v2float %1242 %1242 0 1 + %1051 = OpVectorTimesScalar %v2float %1050 %float_0 + %1053 = OpVectorShuffle %v2float %1224 %1224 0 1 + %1054 = OpFAdd %v2float %1053 %1051 + %1056 = OpVectorShuffle %v3float %1224 %1054 3 4 2 + %1059 = OpVectorShuffle %v2float %1056 %1056 0 1 + %1060 = OpVectorTimesScalar %v2float %1059 %990 + %1062 = OpVectorShuffle %v3float %1056 %1060 3 4 2 + %1430 = OpCompositeExtract %float %1062 0 + %1065 = OpFMul %float %1430 %float_0_3 + %1066 = OpFAdd %float %float_1 %1065 + %1069 = OpVectorShuffle %v3float %510 %510 0 1 2 + %1071 = OpVectorShuffle %v3float %1035 %1035 0 1 2 + %1072 = OpFMul %v3float %1069 %1071 + %1074 = OpVectorTimesScalar %v3float %1072 %1066 + %1075 = OpLoad %38 %StudsMapTexture + %1076 = OpLoad %36 %StudsMapSampler + %1077 = OpSampledImage %183 %1075 %1076 + %1434 = OpCompositeExtract %v2float %1414 2 + %1080 = OpImageSampleImplicitLod %v4float %1077 %1434 + %1436 = OpCompositeExtract %float %1080 0 + %1083 = OpFMul %float %1436 %float_2 + %1085 = OpVectorTimesScalar %v3float %1074 %1083 + %1086 = OpLoad %36 %SpecularMapSampler + %1087 = OpLoad %38 %SpecularMapTexture + OpBranch %1246 + %1246 = OpLabel + OpLoopMerge %1247 %1248 None + OpBranch %1249 + %1249 = OpLabel + %1251 = OpFOrdEqual %bool %float_0_75 %float_0 + OpSelectionMerge %1252 None + OpBranchConditional %1251 %1253 %1254 + %1253 = OpLabel + %1257 = OpSampledImage %183 %1087 %1086 + %1259 = OpImageSampleImplicitLod %v4float %1257 %1024 + OpBranch %1247 + %1254 = OpLabel + %1261 = OpFSub %float %float_1 %float_0_75 + %1262 = OpFDiv %float %float_1 %1261 + %1265 = OpSampledImage %183 %1087 %1086 + %1267 = OpVectorTimesScalar %v2float %1024 %float_0_25 + %1268 = OpImageSampleImplicitLod %v4float %1265 %1267 + %1271 = OpSampledImage %183 %1087 %1086 + %1273 = OpImageSampleImplicitLod %v4float %1271 %1024 + %1276 = OpFMul %float %990 %1262 + %1279 = OpFMul %float %float_0_75 %1262 + %1280 = OpFSub %float %1276 %1279 + %1287 = OpExtInst %float %1 FClamp %1280 %float_0 %float_1 + %1282 = OpCompositeConstruct %v4float %1287 %1287 %1287 %1287 + %1283 = OpExtInst %v4float %1 FMix %1268 %1273 %1282 + OpBranch %1247 + %1252 = OpLabel + %1284 = OpUndef %v4float + OpBranch %1247 + %1248 = OpLabel + OpBranchConditional %false %1246 %1247 + %1247 = OpLabel + %1530 = OpPhi %v4float %1259 %1253 %1283 %1254 %1284 %1252 %1512 %1248 + %1091 = OpVectorShuffle %v2float %1530 %1530 0 1 + %1093 = OpFMul %v2float %1091 %689 + %1094 = OpFAdd %v2float %1093 %692 + %1097 = OpCompositeConstruct %v2float %990 %990 + %1098 = OpExtInst %v2float %1 FMix %697 %1094 %1097 + %1438 = OpCompositeInsert %Surface %1085 %1531 0 + %1440 = OpCompositeInsert %Surface %1062 %1438 1 + %1442 = OpCompositeExtract %float %1098 0 + %1444 = OpCompositeInsert %Surface %1442 %1440 2 + %1446 = OpCompositeExtract %float %1098 1 + %1448 = OpCompositeInsert %Surface %1446 %1444 3 + %1450 = OpCompositeExtract %float %1091 1 + %1112 = OpFMul %float %1450 %990 + %1113 = OpFMul %float %1112 %float_0 + %1452 = OpCompositeInsert %Surface %1113 %1448 4 + %1456 = OpCompositeExtract %float %1396 3 3 + %764 = OpCompositeExtract %float %1085 0 + %765 = OpCompositeExtract %float %1085 1 + %766 = OpCompositeExtract %float %1085 2 + %767 = OpCompositeConstruct %v4float %764 %765 %766 %1456 + %770 = OpVectorShuffle %v3float %519 %519 0 1 2 + %773 = OpExtInst %v3float %1 Cross %770 %523 + %1462 = OpCompositeExtract %float %1452 1 0 + %778 = OpVectorTimesScalar %v3float %523 %1462 + %1466 = OpCompositeExtract %float %1452 1 1 + %782 = OpVectorTimesScalar %v3float %773 %1466 + %783 = OpFAdd %v3float %778 %782 + %1468 = OpCompositeExtract %float %1452 1 2 + %789 = OpVectorTimesScalar %v3float %770 %1468 + %790 = OpFAdd %v3float %783 %789 + %791 = OpExtInst %v3float %1 Normalize %790 + %793 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_7 + %794 = OpLoad %v3float %793 + %795 = OpFNegate %v3float %794 + %796 = OpDot %float %791 %795 + %1290 = OpExtInst %float %1 FClamp %796 %float_0 %float_1 + %799 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_6 + %800 = OpLoad %v3float %799 + %801 = OpVectorTimesScalar %v3float %800 %1290 + %803 = OpFNegate %float %796 + %804 = OpExtInst %float %1 FMax %803 %float_0 + %805 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_8 + %806 = OpLoad %v3float %805 + %807 = OpVectorTimesScalar %v3float %806 %804 + %808 = OpFAdd %v3float %801 %807 + %810 = OpExtInst %float %1 Step %float_0 %796 + %813 = OpFMul %float %810 %1442 + %820 = OpVectorShuffle %v3float %513 %513 0 1 2 + %1296 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_15 + %1297 = OpLoad %v4float %1296 + %1298 = OpVectorShuffle %v3float %1297 %1297 0 1 2 + %1300 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_14 + %1301 = OpLoad %v4float %1300 + %1302 = OpVectorShuffle %v3float %1301 %1301 0 1 2 + %1303 = OpFSub %v3float %820 %1302 + %1304 = OpExtInst %v3float %1 FAbs %1303 + %1305 = OpExtInst %v3float %1 Step %1298 %1304 + %1307 = OpDot %float %1305 %128 + %1328 = OpExtInst %float %1 FClamp %1307 %float_0 %float_1 + %1309 = OpLoad %133 %LightMapTexture + %1310 = OpLoad %36 %LightMapSampler + %1311 = OpSampledImage %140 %1309 %1310 + %1313 = OpVectorShuffle %v3float %820 %820 1 2 0 + %1317 = OpVectorTimesScalar %v3float %1313 %1328 + %1318 = OpFSub %v3float %1313 %1317 + %1319 = OpImageSampleImplicitLod %v4float %1311 %1318 + %1321 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_11 + %1322 = OpLoad %v4float %1321 + %1324 = OpCompositeConstruct %v4float %1328 %1328 %1328 %1328 + %1325 = OpExtInst %v4float %1 FMix %1319 %1322 %1324 + %822 = OpLoad %36 %ShadowMapSampler + %823 = OpLoad %38 %ShadowMapTexture + %826 = OpVectorShuffle %v3float %526 %526 0 1 2 + %1482 = OpCompositeExtract %float %1325 3 + %1337 = OpSampledImage %183 %823 %822 + %1339 = OpVectorShuffle %v2float %826 %826 0 1 + %1340 = OpImageSampleImplicitLod %v4float %1337 %1339 + %1341 = OpVectorShuffle %v2float %1340 %1340 0 1 + %1484 = OpCompositeExtract %float %826 2 + %1486 = OpCompositeExtract %float %1341 0 + %1363 = OpExtInst %float %1 Step %1486 %1484 + %1365 = OpFSub %float %1484 %float_0_5 + %1366 = OpExtInst %float %1 FAbs %1365 + %1367 = OpFMul %float %float_20 %1366 + %1368 = OpFSub %float %float_9 %1367 + %1369 = OpExtInst %float %1 FClamp %1368 %float_0 %float_1 + %1370 = OpFMul %float %1363 %1369 + %1488 = OpCompositeExtract %float %1341 1 + %1350 = OpFMul %float %1370 %1488 + %1351 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17 %uint_3 + %1352 = OpLoad %float %1351 + %1353 = OpFMul %float %1350 %1352 + %1354 = OpFSub %float %float_1 %1353 + %1356 = OpFMul %float %1354 %1482 + %830 = OpLoad %367 %EnvironmentMapTexture + %831 = OpLoad %36 %EnvironmentMapSampler + %832 = OpSampledImage %373 %830 %831 + %835 = OpVectorShuffle %v3float %516 %516 0 1 2 + %836 = OpFNegate %v3float %835 + %838 = OpExtInst %v3float %1 Reflect %836 %791 + %839 = OpImageSampleImplicitLod %v4float %832 %838 + %840 = OpVectorShuffle %v3float %839 %839 0 1 2 + %842 = OpVectorShuffle %v3float %767 %767 0 1 2 + %845 = OpCompositeConstruct %v3float %1113 %1113 %1113 + %846 = OpExtInst %v3float %1 FMix %842 %840 %845 + %848 = OpVectorShuffle %v4float %767 %846 4 5 6 3 + %849 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_5 + %850 = OpLoad %v3float %849 + %853 = OpVectorTimesScalar %v3float %808 %1356 + %854 = OpFAdd %v3float %850 %853 + %856 = OpVectorShuffle %v3float %1325 %1325 0 1 2 + %857 = OpFAdd %v3float %854 %856 + %859 = OpVectorShuffle %v3float %848 %848 0 1 2 + %860 = OpFMul %v3float %857 %859 + %865 = OpFMul %float %813 %1356 + %873 = OpExtInst %v3float %1 Normalize %835 + %874 = OpFAdd %v3float %795 %873 + %875 = OpExtInst %v3float %1 Normalize %874 + %876 = OpDot %float %791 %875 + %877 = OpExtInst %float %1 FClamp %876 %float_0 %float_1 + %879 = OpExtInst %float %1 Pow %877 %1446 + %880 = OpFMul %float %865 %879 + %881 = OpVectorTimesScalar %v3float %800 %880 + %884 = OpFAdd %v3float %860 %881 + %886 = OpVectorShuffle %v4float %1512 %884 4 5 6 3 + %1494 = OpCompositeExtract %float %848 3 + %1496 = OpCompositeInsert %v4float %1494 %886 3 + %896 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17 %uint_0 + %897 = OpLoad %float %896 + %898 = OpFMul %float %978 %897 + %899 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17 %uint_1 + %900 = OpLoad %float %899 + %901 = OpFAdd %float %898 %900 + %1373 = OpExtInst %float %1 FClamp %901 %float_0 %float_1 + %905 = OpVectorShuffle %v2float %504 %504 3 2 + %908 = OpVectorShuffle %v2float %507 %507 3 2 + %909 = OpExtInst %v2float %1 FMin %905 %908 + %1504 = OpCompositeExtract %float %909 0 + %1506 = OpCompositeExtract %float %909 1 + %914 = OpExtInst %float %1 FMin %1504 %1506 + %916 = OpFDiv %float %914 %978 + %919 = OpFSub %float %float_1_5 %916 + %920 = OpFMul %float %1373 %919 + %922 = OpFAdd %float %920 %916 + %1376 = OpExtInst %float %1 FClamp %922 %float_0 %float_1 + %925 = OpVectorShuffle %v3float %1496 %1496 0 1 2 + %926 = OpVectorTimesScalar %v3float %925 %1376 + %928 = OpVectorShuffle %v4float %1496 %926 4 5 6 3 + %1508 = OpCompositeExtract %float %1396 4 3 + %931 = OpExtInst %float %1 FClamp %1508 %float_0 %float_1 + %932 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_10 + %933 = OpLoad %v3float %932 + %935 = OpVectorShuffle %v3float %928 %928 0 1 2 + %937 = OpCompositeConstruct %v3float %931 %931 %931 + %938 = OpExtInst %v3float %1 FMix %933 %935 %937 + %940 = OpVectorShuffle %v4float %928 %938 4 5 6 3 + OpStore %_entryPointOutput %940 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag new file mode 100644 index 00000000000..9baebc20f40 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag @@ -0,0 +1,36 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 20 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %_GLF_color + OpExecutionMode %main OriginUpperLeft + OpSource ESSL 310 + OpName %main "main" + OpName %_GLF_color "_GLF_color" + OpDecorate %_GLF_color Location 0 + OpDecorate %18 RelaxedPrecision + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %_GLF_color = OpVariable %_ptr_Output_v4float Output + %float_1 = OpConstant %float 1 + %11 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 + %uint_1 = OpConstant %uint 1 + %15 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 + %main = OpFunction %void None %3 + %5 = OpLabel + %18 = OpBitCount %v4uint %15 + %19 = OpExtInst %v4float %1 Ldexp %11 %18 + OpStore %_GLF_color %19 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag new file mode 100644 index 00000000000..e2d4562a8aa --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag @@ -0,0 +1,159 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 93 +; Schema: 0 + OpCapability Shader + OpCapability ShaderNonUniformEXT + OpCapability RuntimeDescriptorArrayEXT + OpCapability UniformBufferArrayNonUniformIndexingEXT + OpCapability SampledImageArrayNonUniformIndexingEXT + OpCapability StorageBufferArrayNonUniformIndexingEXT + OpExtension "SPV_EXT_descriptor_indexing" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %vIndex %FragColor %vUV + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpSourceExtension "GL_EXT_nonuniform_qualifier" + OpName %main "main" + OpName %i "i" + OpName %vIndex "vIndex" + OpName %FragColor "FragColor" + OpName %uSamplers "uSamplers" + OpName %uSamps "uSamps" + OpName %vUV "vUV" + OpName %uCombinedSamplers "uCombinedSamplers" + OpName %UBO "UBO" + OpMemberName %UBO 0 "v" + OpName %ubos "ubos" + OpName %SSBO "SSBO" + OpMemberName %SSBO 0 "v" + OpName %ssbos "ssbos" + OpDecorate %vIndex Flat + OpDecorate %vIndex Location 0 + OpDecorate %FragColor Location 0 + OpDecorate %uSamplers DescriptorSet 0 + OpDecorate %uSamplers Binding 0 + + OpDecorate %sampled_image NonUniformEXT + OpDecorate %combined_sampler NonUniformEXT + OpDecorate %ubo_ptr_copy NonUniformEXT + OpDecorate %ssbo_ptr_copy NonUniformEXT + + OpDecorate %uSamps DescriptorSet 0 + OpDecorate %uSamps Binding 1 + OpDecorate %vUV Location 1 + OpDecorate %uCombinedSamplers DescriptorSet 0 + OpDecorate %uCombinedSamplers Binding 4 + OpDecorate %_arr_v4float_uint_64 ArrayStride 16 + OpMemberDecorate %UBO 0 Offset 0 + OpDecorate %UBO Block + OpDecorate %ubos DescriptorSet 0 + OpDecorate %ubos Binding 2 + OpDecorate %_runtimearr_v4float ArrayStride 16 + OpMemberDecorate %SSBO 0 NonWritable + OpMemberDecorate %SSBO 0 Offset 0 + OpDecorate %SSBO BufferBlock + OpDecorate %ssbos DescriptorSet 0 + OpDecorate %ssbos Binding 3 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int +%_ptr_Input_int = OpTypePointer Input %int + %vIndex = OpVariable %_ptr_Input_int Input + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %16 = OpTypeImage %float 2D 0 0 0 1 Unknown +%_runtimearr_16 = OpTypeRuntimeArray %16 +%_ptr_UniformConstant__runtimearr_16 = OpTypePointer UniformConstant %_runtimearr_16 + %uSamplers = OpVariable %_ptr_UniformConstant__runtimearr_16 UniformConstant + %int_10 = OpConstant %int 10 +%_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16 + %27 = OpTypeSampler +%_runtimearr_27 = OpTypeRuntimeArray %27 +%_ptr_UniformConstant__runtimearr_27 = OpTypePointer UniformConstant %_runtimearr_27 + %uSamps = OpVariable %_ptr_UniformConstant__runtimearr_27 UniformConstant + %int_40 = OpConstant %int 40 +%_ptr_UniformConstant_27 = OpTypePointer UniformConstant %27 + %38 = OpTypeSampledImage %16 + %v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float + %vUV = OpVariable %_ptr_Input_v2float Input +%_runtimearr_38 = OpTypeRuntimeArray %38 +%_ptr_UniformConstant__runtimearr_38 = OpTypePointer UniformConstant %_runtimearr_38 +%uCombinedSamplers = OpVariable %_ptr_UniformConstant__runtimearr_38 UniformConstant +%_ptr_UniformConstant_38 = OpTypePointer UniformConstant %38 + %uint = OpTypeInt 32 0 + %uint_64 = OpConstant %uint 64 +%_arr_v4float_uint_64 = OpTypeArray %v4float %uint_64 + %UBO = OpTypeStruct %_arr_v4float_uint_64 +%_runtimearr_UBO = OpTypeRuntimeArray %UBO +%_ptr_Uniform__runtimearr_UBO = OpTypePointer Uniform %_runtimearr_UBO + %ubos = OpVariable %_ptr_Uniform__runtimearr_UBO Uniform + %int_20 = OpConstant %int 20 + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_runtimearr_v4float = OpTypeRuntimeArray %v4float + %SSBO = OpTypeStruct %_runtimearr_v4float +%_runtimearr_SSBO = OpTypeRuntimeArray %SSBO +%_ptr_Uniform__runtimearr_SSBO = OpTypePointer Uniform %_runtimearr_SSBO + %ssbos = OpVariable %_ptr_Uniform__runtimearr_SSBO Uniform + %int_50 = OpConstant %int 50 + %int_60 = OpConstant %int 60 + %main = OpFunction %void None %3 + %5 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %11 = OpLoad %int %vIndex + OpStore %i %11 + %20 = OpLoad %int %i + %22 = OpIAdd %int %20 %int_10 + %23 = OpCopyObject %int %22 + %25 = OpAccessChain %_ptr_UniformConstant_16 %uSamplers %23 + %26 = OpLoad %16 %25 + %31 = OpLoad %int %i + %33 = OpIAdd %int %31 %int_40 + %34 = OpCopyObject %int %33 + %36 = OpAccessChain %_ptr_UniformConstant_27 %uSamps %34 + %37 = OpLoad %27 %36 + %sampled_image = OpSampledImage %38 %26 %37 + %43 = OpLoad %v2float %vUV + %44 = OpImageSampleImplicitLod %v4float %sampled_image %43 + OpStore %FragColor %44 + %48 = OpLoad %int %i + %49 = OpIAdd %int %48 %int_10 + %50 = OpCopyObject %int %49 + %52 = OpAccessChain %_ptr_UniformConstant_38 %uCombinedSamplers %50 + %combined_sampler = OpLoad %38 %52 + %54 = OpLoad %v2float %vUV + %55 = OpImageSampleImplicitLod %v4float %combined_sampler %54 + OpStore %FragColor %55 + %63 = OpLoad %int %i + %65 = OpIAdd %int %63 %int_20 + %66 = OpCopyObject %int %65 + %68 = OpLoad %int %i + %69 = OpIAdd %int %68 %int_40 + %70 = OpCopyObject %int %69 + %ubo_ptr = OpAccessChain %_ptr_Uniform_v4float %ubos %66 %int_0 %70 + %ubo_ptr_copy = OpCopyObject %_ptr_Uniform_v4float %ubo_ptr + %73 = OpLoad %v4float %ubo_ptr_copy + %74 = OpLoad %v4float %FragColor + %75 = OpFAdd %v4float %74 %73 + OpStore %FragColor %75 + %81 = OpLoad %int %i + %83 = OpIAdd %int %81 %int_50 + %84 = OpCopyObject %int %83 + %85 = OpLoad %int %i + %87 = OpIAdd %int %85 %int_60 + %88 = OpCopyObject %int %87 + %ssbo_ptr = OpAccessChain %_ptr_Uniform_v4float %ssbos %84 %int_0 %88 + %ssbo_ptr_copy = OpCopyObject %_ptr_Uniform_v4float %ssbo_ptr + %90 = OpLoad %v4float %ssbo_ptr_copy + %91 = OpLoad %v4float %FragColor + %92 = OpFAdd %v4float %91 %90 + OpStore %FragColor %92 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/opaque-id-literal-alias.preserve.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/opaque-id-literal-alias.preserve.asm.frag new file mode 100644 index 00000000000..c77c9a17c87 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/opaque-id-literal-alias.preserve.asm.frag @@ -0,0 +1,78 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 50 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %FragColor %gl_FragCoord %vUV + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %FragColor "FragColor" + OpName %gl_FragCoord "gl_FragCoord" + OpName %uSampled "uSampled" + OpName %vUV "vUV" + OpDecorate %FragColor Location 0 + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %uSampled DescriptorSet 0 + OpDecorate %uSampled Binding 0 + OpDecorate %vUV Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %float_0 = OpConstant %float 0 + %11 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint = OpTypeInt 32 0 + %uint_0 = OpConstant %uint 0 +%_ptr_Input_float = OpTypePointer Input %float + %float_10 = OpConstant %float 10 + %bool = OpTypeBool + %24 = OpTypeImage %float 2D 0 0 1 1 Unknown + %25 = OpTypeSampledImage %24 +%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25 + %uSampled = OpVariable %_ptr_UniformConstant_25 UniformConstant + %v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float + %vUV = OpVariable %_ptr_Input_v2float Input + %int = OpTypeInt 32 1 + %v2int = OpTypeVector %int 2 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + OpStore %FragColor %11 + %17 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %18 = OpLoad %float %17 + %21 = OpFOrdLessThan %bool %18 %float_10 + OpSelectionMerge %23 None + OpBranchConditional %21 %22 %41 + %22 = OpLabel + %28 = OpLoad %25 %uSampled + %32 = OpLoad %v2float %vUV + %35 = OpConvertFToS %v2int %32 + %64 = OpImage %24 %28 + %38 = OpImageFetch %v4float %64 %35 Sample %int_0 + %39 = OpLoad %v4float %FragColor + %40 = OpFAdd %v4float %39 %38 + OpStore %FragColor %40 + OpBranch %23 + %41 = OpLabel + %42 = OpLoad %25 %uSampled + %43 = OpLoad %v2float %vUV + %44 = OpConvertFToS %v2int %43 + %46 = OpImage %24 %42 + %47 = OpImageFetch %v4float %46 %44 Sample %int_1 + %48 = OpLoad %v4float %FragColor + %49 = OpFAdd %v4float %48 %47 + OpStore %FragColor %49 + OpBranch %23 + %23 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/out-of-order-struct-id.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/out-of-order-struct-id.asm.frag new file mode 100644 index 00000000000..4a7885e5dcc --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/out-of-order-struct-id.asm.frag @@ -0,0 +1,54 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 24 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %FragColor + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %FragColor "FragColor" + OpName %80 "Foo" + OpMemberName %80 0 "a" + OpName %79 "Bar" + OpMemberName %79 0 "foo" + OpMemberName %79 1 "foo2" + OpName %UBO "UBO" + OpMemberName %UBO 0 "bar" + OpName %_ "" + OpDecorate %FragColor Location 0 + OpMemberDecorate %80 0 Offset 0 + OpMemberDecorate %79 0 Offset 0 + OpMemberDecorate %79 1 Offset 16 + OpMemberDecorate %UBO 0 Offset 0 + OpDecorate %UBO Block + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output + %80 = OpTypeStruct %v4float + %79 = OpTypeStruct %80 %80 + %UBO = OpTypeStruct %79 +%_ptr_Uniform_UBO = OpTypePointer Uniform %UBO + %_ = OpVariable %_ptr_Uniform_UBO Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + %18 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_0 %int_0 + %19 = OpLoad %v4float %18 + %21 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_1 %int_0 + %22 = OpLoad %v4float %21 + %23 = OpFAdd %v4float %19 %22 + OpStore %FragColor %23 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag new file mode 100644 index 00000000000..ebd8d6bab75 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag @@ -0,0 +1,89 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 45 +; Schema: 0 + OpCapability Shader + OpCapability FragmentShaderPixelInterlockEXT + OpExtension "SPV_EXT_fragment_shader_interlock" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %gl_FragCoord + OpExecutionMode %main OriginUpperLeft + OpExecutionMode %main PixelInterlockOrderedEXT + OpSource GLSL 450 + OpSourceExtension "GL_ARB_fragment_shader_interlock" + OpName %main "main" + OpName %callee2_ "callee2(" + OpName %callee_ "callee(" + OpName %SSBO1 "SSBO1" + OpMemberName %SSBO1 0 "values1" + OpName %_ "" + OpName %gl_FragCoord "gl_FragCoord" + OpName %SSBO0 "SSBO0" + OpMemberName %SSBO0 0 "values0" + OpName %__0 "" + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SSBO1 0 Offset 0 + OpDecorate %SSBO1 BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 1 + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %_runtimearr_uint_0 ArrayStride 4 + OpMemberDecorate %SSBO0 0 Offset 0 + OpDecorate %SSBO0 BufferBlock + OpDecorate %__0 DescriptorSet 0 + OpDecorate %__0 Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %uint = OpTypeInt 32 0 +%_runtimearr_uint = OpTypeRuntimeArray %uint + %SSBO1 = OpTypeStruct %_runtimearr_uint +%_ptr_Uniform_SSBO1 = OpTypePointer Uniform %SSBO1 + %_ = OpVariable %_ptr_Uniform_SSBO1 Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint_0 = OpConstant %uint 0 +%_ptr_Input_float = OpTypePointer Input %float + %uint_1 = OpConstant %uint 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint +%_runtimearr_uint_0 = OpTypeRuntimeArray %uint + %SSBO0 = OpTypeStruct %_runtimearr_uint_0 +%_ptr_Uniform_SSBO0 = OpTypePointer Uniform %SSBO0 + %__0 = OpVariable %_ptr_Uniform_SSBO0 Uniform + %main = OpFunction %void None %3 + %5 = OpLabel + %44 = OpFunctionCall %void %callee_ + OpReturn + OpFunctionEnd + %callee2_ = OpFunction %void None %3 + %7 = OpLabel + %23 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %24 = OpLoad %float %23 + %25 = OpConvertFToS %int %24 + %28 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %25 + %29 = OpLoad %uint %28 + %30 = OpIAdd %uint %29 %uint_1 + %31 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %25 + OpStore %31 %30 + OpReturn + OpFunctionEnd + %callee_ = OpFunction %void None %3 + %9 = OpLabel + %36 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %37 = OpLoad %float %36 + %38 = OpConvertFToS %int %37 + %39 = OpAccessChain %_ptr_Uniform_uint %__0 %int_0 %38 + %40 = OpLoad %uint %39 + %41 = OpIAdd %uint %40 %uint_1 + %42 = OpAccessChain %_ptr_Uniform_uint %__0 %int_0 %38 + OpStore %42 %41 + OpBeginInvocationInterlockEXT + %43 = OpFunctionCall %void %callee2_ + OpEndInvocationInterlockEXT + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag new file mode 100644 index 00000000000..69b8f911204 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag @@ -0,0 +1,121 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 45 +; Schema: 0 + OpCapability Shader + OpCapability FragmentShaderPixelInterlockEXT + OpExtension "SPV_EXT_fragment_shader_interlock" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %gl_FragCoord + OpExecutionMode %main OriginUpperLeft + OpExecutionMode %main PixelInterlockOrderedEXT + OpSource GLSL 450 + OpSourceExtension "GL_ARB_fragment_shader_interlock" + OpName %main "main" + OpName %callee2_ "callee2(" + OpName %callee_ "callee(" + OpName %SSBO1 "SSBO1" + OpMemberName %SSBO1 0 "values1" + OpName %_ "" + OpName %gl_FragCoord "gl_FragCoord" + OpName %SSBO0 "SSBO0" + OpMemberName %SSBO0 0 "values0" + OpName %__0 "" + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SSBO1 0 Offset 0 + OpDecorate %SSBO1 BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 1 + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %_runtimearr_uint_0 ArrayStride 4 + OpMemberDecorate %SSBO0 0 Offset 0 + OpDecorate %SSBO0 BufferBlock + OpDecorate %__0 DescriptorSet 0 + OpDecorate %__0 Binding 0 + + OpMemberDecorate %SSBO2 0 Offset 0 + OpDecorate %SSBO2 BufferBlock + OpDecorate %ssbo2 DescriptorSet 0 + OpDecorate %ssbo2 Binding 2 + + %void = OpTypeVoid + %3 = OpTypeFunction %void + %uint = OpTypeInt 32 0 +%_runtimearr_uint = OpTypeRuntimeArray %uint + %SSBO1 = OpTypeStruct %_runtimearr_uint + %SSBO2 = OpTypeStruct %_runtimearr_uint +%_ptr_Uniform_SSBO1 = OpTypePointer Uniform %SSBO1 +%_ptr_Uniform_SSBO2 = OpTypePointer Uniform %SSBO2 + %_ = OpVariable %_ptr_Uniform_SSBO1 Uniform + %ssbo2 = OpVariable %_ptr_Uniform_SSBO2 Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %uint_4 = OpConstant %uint 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %bool = OpTypeBool + %true = OpConstantTrue %bool +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint_0 = OpConstant %uint 0 +%_ptr_Input_float = OpTypePointer Input %float + %uint_1 = OpConstant %uint 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint +%_runtimearr_uint_0 = OpTypeRuntimeArray %uint + %SSBO0 = OpTypeStruct %_runtimearr_uint_0 +%_ptr_Uniform_SSBO0 = OpTypePointer Uniform %SSBO0 + %__0 = OpVariable %_ptr_Uniform_SSBO0 Uniform + %main = OpFunction %void None %3 + %5 = OpLabel + %44 = OpFunctionCall %void %callee_ + %callee3_res = OpFunctionCall %void %callee3_ + OpReturn + OpFunctionEnd + + %callee3_ = OpFunction %void None %3 + %calle3_block = OpLabel + %frag_coord_x_ptr = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %frag_coord_x = OpLoad %float %frag_coord_x_ptr + %frag_coord_int = OpConvertFToS %int %frag_coord_x + %ssbo_ptr = OpAccessChain %_ptr_Uniform_uint %ssbo2 %int_0 %frag_coord_int + OpStore %ssbo_ptr %uint_4 + OpReturn + OpFunctionEnd + + %callee2_ = OpFunction %void None %3 + %7 = OpLabel + %23 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %24 = OpLoad %float %23 + %25 = OpConvertFToS %int %24 + %28 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %25 + %29 = OpLoad %uint %28 + %30 = OpIAdd %uint %29 %uint_1 + %31 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %25 + OpStore %31 %30 + OpReturn + OpFunctionEnd + %callee_ = OpFunction %void None %3 + %9 = OpLabel + %36 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %37 = OpLoad %float %36 + %38 = OpConvertFToS %int %37 + %39 = OpAccessChain %_ptr_Uniform_uint %__0 %int_0 %38 + %40 = OpLoad %uint %39 + %41 = OpIAdd %uint %40 %uint_1 + %42 = OpAccessChain %_ptr_Uniform_uint %__0 %int_0 %38 + OpStore %42 %41 + %43 = OpFunctionCall %void %callee2_ + + OpSelectionMerge %merged_block None + OpBranchConditional %true %dummy_block %merged_block + %dummy_block = OpLabel + OpBeginInvocationInterlockEXT + OpEndInvocationInterlockEXT + OpBranch %merged_block + + %merged_block = OpLabel + OpReturn + + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag new file mode 100644 index 00000000000..7c0fe9a2b24 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag @@ -0,0 +1,102 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 45 +; Schema: 0 + OpCapability Shader + OpCapability FragmentShaderPixelInterlockEXT + OpExtension "SPV_EXT_fragment_shader_interlock" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %gl_FragCoord + OpExecutionMode %main OriginUpperLeft + OpExecutionMode %main PixelInterlockOrderedEXT + OpSource GLSL 450 + OpSourceExtension "GL_ARB_fragment_shader_interlock" + OpName %main "main" + OpName %callee2_ "callee2(" + OpName %callee_ "callee(" + OpName %SSBO1 "SSBO1" + OpMemberName %SSBO1 0 "values1" + OpName %_ "" + OpName %gl_FragCoord "gl_FragCoord" + OpName %SSBO0 "SSBO0" + OpMemberName %SSBO0 0 "values0" + OpName %__0 "" + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SSBO1 0 Offset 0 + OpDecorate %SSBO1 BufferBlock + OpDecorate %_ DescriptorSet 0 + OpDecorate %_ Binding 1 + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %_runtimearr_uint_0 ArrayStride 4 + OpMemberDecorate %SSBO0 0 Offset 0 + OpDecorate %SSBO0 BufferBlock + OpDecorate %__0 DescriptorSet 0 + OpDecorate %__0 Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %uint = OpTypeInt 32 0 +%_runtimearr_uint = OpTypeRuntimeArray %uint + %SSBO1 = OpTypeStruct %_runtimearr_uint +%_ptr_Uniform_SSBO1 = OpTypePointer Uniform %SSBO1 + %_ = OpVariable %_ptr_Uniform_SSBO1 Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint_0 = OpConstant %uint 0 +%_ptr_Input_float = OpTypePointer Input %float + %uint_1 = OpConstant %uint 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint +%_runtimearr_uint_0 = OpTypeRuntimeArray %uint + %SSBO0 = OpTypeStruct %_runtimearr_uint_0 +%_ptr_Uniform_SSBO0 = OpTypePointer Uniform %SSBO0 + %__0 = OpVariable %_ptr_Uniform_SSBO0 Uniform + %main = OpFunction %void None %3 + %5 = OpLabel + %44 = OpFunctionCall %void %callee_ + %call3res = OpFunctionCall %void %callee3_ + %call4res = OpFunctionCall %void %callee4_ + OpReturn + OpFunctionEnd + + %callee3_ = OpFunction %void None %3 + %begin3 = OpLabel + OpBeginInvocationInterlockEXT + OpReturn + OpFunctionEnd + + %callee4_ = OpFunction %void None %3 + %begin4 = OpLabel + OpEndInvocationInterlockEXT + OpReturn + OpFunctionEnd + + %callee2_ = OpFunction %void None %3 + %7 = OpLabel + %23 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %24 = OpLoad %float %23 + %25 = OpConvertFToS %int %24 + %28 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %25 + %29 = OpLoad %uint %28 + %30 = OpIAdd %uint %29 %uint_1 + %31 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %25 + OpStore %31 %30 + OpReturn + OpFunctionEnd + %callee_ = OpFunction %void None %3 + %9 = OpLabel + %36 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %37 = OpLoad %float %36 + %38 = OpConvertFToS %int %37 + %39 = OpAccessChain %_ptr_Uniform_uint %__0 %int_0 %38 + %40 = OpLoad %uint %39 + %41 = OpIAdd %uint %40 %uint_1 + %42 = OpAccessChain %_ptr_Uniform_uint %__0 %int_0 %38 + OpStore %42 %41 + %43 = OpFunctionCall %void %callee2_ + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag new file mode 100644 index 00000000000..b1546795102 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag @@ -0,0 +1,80 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 29 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %vIndex %FragColor + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %vIndex "vIndex" + OpName %FragColor "FragColor" + OpName %i "i" + OpName %j "j" + OpDecorate %vIndex Flat + OpDecorate %vIndex Location 0 + OpDecorate %FragColor Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %bool = OpTypeBool + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 +%_ptr_Input_int = OpTypePointer Input %int + %vIndex = OpVariable %_ptr_Input_int Input + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output +%_ptr_Function_int = OpTypePointer Function %int + %main = OpFunction %void None %3 + %header = OpLabel + %i = OpVariable %_ptr_Function_int Function + %j = OpVariable %_ptr_Function_int Function + %9 = OpLoad %int %vIndex + OpSelectionMerge %switch_merge None + OpSwitch %9 %default_case 100 %default_case 0 %case_0 1 %case_1 11 %case_1 2 %case_2 3 %case_3 4 %case_4 5 %case_5 + + %case_0 = OpLabel + OpBranch %default_case + + %default_case = OpLabel + %default_case_phi = OpPhi %int %int_2 %header %int_3 %case_0 + ; Test what happens when a case block dominates access to a variable. + OpStore %j %default_case_phi + OpBranch %case_1 + + %case_1 = OpLabel + ; Test phi nodes between case labels. + %case_1_phi = OpPhi %int %int_0 %default_case %int_1 %header + OpStore %j %case_1_phi + OpBranch %case_2 + + %case_2 = OpLabel + OpBranch %switch_merge + + %case_3 = OpLabel + ; Conditionally branch to another case block. This is really dumb, but it is apparently legal. + %case_3_cond = OpSGreaterThan %bool %9 %int_3 + OpBranchConditional %case_3_cond %case_4 %switch_merge + + %case_4 = OpLabel + ; When emitted from case 3, we should *not* see fallthrough behavior. + OpBranch %case_5 + + %case_5 = OpLabel + OpStore %i %int_0 + OpBranch %switch_merge + + %switch_merge = OpLabel + %26 = OpLoad %int %i + %27 = OpConvertSToF %float %26 + %28 = OpCompositeConstruct %v4float %27 %27 %27 %27 + OpStore %FragColor %28 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag new file mode 100644 index 00000000000..d2bd15a9785 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag @@ -0,0 +1,57 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 54 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color + OpExecutionMode %main OriginUpperLeft + OpSource ESSL 310 + OpName %main "main" + OpName %gl_FragCoord "gl_FragCoord" + OpName %_GLF_color "_GLF_color" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorate %_GLF_color Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %uint = OpTypeInt 32 0 + %uint_0 = OpConstant %uint 0 +%_ptr_Input_float = OpTypePointer Input %float + %bool = OpTypeBool + %v2float = OpTypeVector %float 2 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %_GLF_color = OpVariable %_ptr_Output_v4float Output + %float_1 = OpConstant %float 1 + %52 = OpUndef %v2float + %main = OpFunction %void None %3 + %5 = OpLabel + OpSelectionMerge %9 None + OpSwitch %int_0 %8 + %8 = OpLabel + %17 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 + %18 = OpLoad %float %17 + %22 = OpFOrdNotEqual %bool %18 %18 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + OpBranch %9 + %24 = OpLabel + %33 = OpCompositeExtract %float %52 1 + %51 = OpCompositeInsert %v2float %33 %52 1 + OpBranch %9 + %9 = OpLabel + %53 = OpPhi %v2float %52 %23 %51 %24 + %42 = OpCompositeExtract %float %53 0 + %43 = OpCompositeExtract %float %53 1 + %48 = OpCompositeConstruct %v4float %42 %43 %float_1 %float_1 + OpStore %_GLF_color %48 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/vector-shuffle-undef-index.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/vector-shuffle-undef-index.asm.frag new file mode 100644 index 00000000000..22c4efca93c --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/vector-shuffle-undef-index.asm.frag @@ -0,0 +1,42 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 29 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %FragColor %vFloat + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %FragColor "FragColor" + OpName %vFloat "vFloat" + OpName %undef "undef" + OpDecorate %FragColor Location 0 + OpDecorate %vFloat Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %FragColor = OpVariable %_ptr_Output_v4float Output +%_ptr_Input_v4float = OpTypePointer Input %v4float + %vFloat = OpVariable %_ptr_Input_v4float Input + %v2float = OpTypeVector %float 2 +%_ptr_Private_v4float = OpTypePointer Private %v4float + %undef = OpUndef %v4float + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 +%_ptr_Private_float = OpTypePointer Private %float + %uint_3 = OpConstant %uint 3 +%_ptr_Input_float = OpTypePointer Input %float + %main = OpFunction %void None %3 + %5 = OpLabel + %13 = OpLoad %v4float %vFloat + %26 = OpVectorShuffle %v4float %13 %undef 4 1 0xffffffff 3 + %27 = OpVectorShuffle %v4float %13 %13 2 1 0xffffffff 3 + %28 = OpFAdd %v4float %26 %27 + OpStore %FragColor %28 + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/while-loop-inverted-test.asm.frag b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/while-loop-inverted-test.asm.frag new file mode 100644 index 00000000000..d4ae9229098 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/frag/while-loop-inverted-test.asm.frag @@ -0,0 +1,53 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 7 +; Bound: 29 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %i "i" + OpName %j "j" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int + %int_0 = OpConstant %int 0 + %int_20 = OpConstant %int 20 + %bool = OpTypeBool + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %3 + %5 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %j = OpVariable %_ptr_Function_int Function + OpStore %i %int_0 + OpStore %j %int_0 + OpBranch %11 + %11 = OpLabel + OpLoopMerge %13 %14 None + OpBranch %15 + %15 = OpLabel + %16 = OpLoad %int %i + %19 = OpIEqual %bool %16 %int_20 + OpBranchConditional %19 %13 %12 + %12 = OpLabel + %20 = OpLoad %int %j + %21 = OpLoad %int %i + %22 = OpIAdd %int %20 %21 + %24 = OpIAdd %int %22 %int_1 + %25 = OpLoad %int %j + %26 = OpIMul %int %24 %25 + OpStore %j %26 + %27 = OpLoad %int %i + %28 = OpIAdd %int %27 %int_1 + OpStore %i %28 + OpBranch %14 + %14 = OpLabel + OpBranch %11 + %13 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert new file mode 100644 index 00000000000..038ecaa6e3c --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert @@ -0,0 +1,36 @@ +; SPIR-V +; Version: 1.1 +; Generator: Google rspirv; 0 +; Bound: 17 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %2 "main" + OpName %Test "Test" + OpName %t "t" + OpName %retvar "retvar" + OpName %main "main" + OpName %retvar_0 "retvar" + %void = OpTypeVoid + %6 = OpTypeFunction %void + %Test = OpTypeStruct +%_ptr_Function_Test = OpTypePointer Function %Test +%_ptr_Function_void = OpTypePointer Function %void + %2 = OpFunction %void None %6 + %7 = OpLabel + %t = OpVariable %_ptr_Function_Test Function + %retvar = OpVariable %_ptr_Function_void Function + OpBranch %4 + %4 = OpLabel + %13 = OpCompositeConstruct %Test + OpStore %t %13 + OpReturn + OpFunctionEnd + %main = OpFunction %void None %6 + %15 = OpLabel + %retvar_0 = OpVariable %_ptr_Function_void Function + OpBranch %14 + %14 = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/vert/semantic-decoration.asm.vert b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/vert/semantic-decoration.asm.vert new file mode 100644 index 00000000000..76007c30a34 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/spirv-cross/shaders-no-opt/asm/vert/semantic-decoration.asm.vert @@ -0,0 +1,68 @@ +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 6 +; Bound: 36 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_decorate_string" + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %_entryPointOutput_p %_entryPointOutput_c + OpSource HLSL 500 + OpName %main "main" + OpName %VOut "VOut" + OpMemberName %VOut 0 "p" + OpMemberName %VOut 1 "c" + OpName %_main_ "@main(" + OpName %v "v" + OpName %flattenTemp "flattenTemp" + OpName %_entryPointOutput_p "@entryPointOutput.p" + OpName %_entryPointOutput_c "@entryPointOutput.c" + OpMemberDecorateStringGOOGLE %VOut 0 HlslSemanticGOOGLE "SV_POSITION" + OpMemberDecorateStringGOOGLE %VOut 1 HlslSemanticGOOGLE "COLOR" + OpDecorate %_entryPointOutput_p BuiltIn Position + OpDecorateStringGOOGLE %_entryPointOutput_p HlslSemanticGOOGLE "SV_POSITION" + OpDecorate %_entryPointOutput_c Location 0 + OpDecorateStringGOOGLE %_entryPointOutput_c HlslSemanticGOOGLE "COLOR" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %VOut = OpTypeStruct %v4float %v4float + %9 = OpTypeFunction %VOut +%_ptr_Function_VOut = OpTypePointer Function %VOut + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %int_1 = OpConstant %int 1 + %float_2 = OpConstant %float 2 + %22 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_entryPointOutput_p = OpVariable %_ptr_Output_v4float Output +%_entryPointOutput_c = OpVariable %_ptr_Output_v4float Output + %main = OpFunction %void None %3 + %5 = OpLabel +%flattenTemp = OpVariable %_ptr_Function_VOut Function + %28 = OpFunctionCall %VOut %_main_ + OpStore %flattenTemp %28 + %31 = OpAccessChain %_ptr_Function_v4float %flattenTemp %int_0 + %32 = OpLoad %v4float %31 + OpStore %_entryPointOutput_p %32 + %34 = OpAccessChain %_ptr_Function_v4float %flattenTemp %int_1 + %35 = OpLoad %v4float %34 + OpStore %_entryPointOutput_c %35 + OpReturn + OpFunctionEnd + %_main_ = OpFunction %VOut None %9 + %11 = OpLabel + %v = OpVariable %_ptr_Function_VOut Function + %19 = OpAccessChain %_ptr_Function_v4float %v %int_0 + OpStore %19 %17 + %23 = OpAccessChain %_ptr_Function_v4float %v %int_1 + OpStore %23 %22 + %24 = OpLoad %VOut %v + OpReturnValue %24 + OpFunctionEnd |