RetroArch/deps/SPIRV-Cross/shaders-hlsl/asm/comp/control-flow-hints.asm.comp

147 lines
5.4 KiB
Plaintext
Raw Normal View History

Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 20:50:02 +00:00
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 6
; Bound: 85
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpSource HLSL 500
OpName %main "main"
OpName %_main_ "@main("
OpName %i "i"
OpName %bar "bar"
OpMemberName %bar 0 "@data"
OpName %bar_0 "bar"
OpName %foo "foo"
OpName %i_0 "i"
OpName %v "v"
OpName %w "w"
OpName %value "value"
OpDecorate %_runtimearr_v4float ArrayStride 16
OpMemberDecorate %bar 0 Offset 0
OpDecorate %bar BufferBlock
OpDecorate %bar_0 DescriptorSet 0
OpDecorate %bar_0 Binding 0
OpDecorate %foo DescriptorSet 0
OpDecorate %foo Binding 1
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%int_0 = OpConstant %int 0
%int_16 = OpConstant %int 16
%bool = OpTypeBool
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_runtimearr_v4float = OpTypeRuntimeArray %v4float
%bar = OpTypeStruct %_runtimearr_v4float
%_ptr_Uniform_bar = OpTypePointer Uniform %bar
%bar_0 = OpVariable %_ptr_Uniform_bar Uniform
%foo = OpVariable %_ptr_Uniform_bar Uniform
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%int_1 = OpConstant %int 1
%int_15 = OpConstant %int 15
%_ptr_Function_float = OpTypePointer Function %float
%int_10 = OpConstant %int 10
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_10 = OpConstant %float 10
%int_20 = OpConstant %int 20
%float_5 = OpConstant %float 5
%72 = OpConstantComposite %v4float %float_5 %float_5 %float_5 %float_5
%float_20 = OpConstant %float 20
%float_40 = OpConstant %float 40
%main = OpFunction %void None %3
%5 = OpLabel
%84 = OpFunctionCall %void %_main_
OpReturn
OpFunctionEnd
%_main_ = OpFunction %void None %3
%7 = OpLabel
%i = OpVariable %_ptr_Function_int Function
%i_0 = OpVariable %_ptr_Function_int Function
%v = OpVariable %_ptr_Function_float Function
%w = OpVariable %_ptr_Function_float Function
%value = OpVariable %_ptr_Function_float Function
OpStore %i %int_0
OpBranch %12
%12 = OpLabel
OpLoopMerge %14 %15 Unroll
OpBranch %16
%16 = OpLabel
%17 = OpLoad %int %i
%20 = OpSLessThan %bool %17 %int_16
OpBranchConditional %20 %13 %14
%13 = OpLabel
%27 = OpLoad %int %i
%29 = OpLoad %int %i
%31 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %29
%32 = OpLoad %v4float %31
%33 = OpAccessChain %_ptr_Uniform_v4float %bar_0 %int_0 %27
OpStore %33 %32
OpBranch %15
%15 = OpLabel
%34 = OpLoad %int %i
%36 = OpIAdd %int %34 %int_1
OpStore %i %36
OpBranch %12
%14 = OpLabel
OpStore %i_0 %int_0
OpBranch %38
%38 = OpLabel
OpLoopMerge %40 %41 DontUnroll
OpBranch %42
%42 = OpLabel
%43 = OpLoad %int %i_0
%44 = OpSLessThan %bool %43 %int_16
OpBranchConditional %44 %39 %40
%39 = OpLabel
%46 = OpLoad %int %i_0
%47 = OpISub %int %int_15 %46
%48 = OpLoad %int %i_0
%49 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %48
%50 = OpLoad %v4float %49
%51 = OpAccessChain %_ptr_Uniform_v4float %bar_0 %int_0 %47
OpStore %51 %50
OpBranch %41
%41 = OpLabel
%52 = OpLoad %int %i_0
%53 = OpIAdd %int %52 %int_1
OpStore %i_0 %53
OpBranch %38
%40 = OpLabel
%60 = OpAccessChain %_ptr_Uniform_float %bar_0 %int_0 %int_10 %uint_0
%61 = OpLoad %float %60
OpStore %v %61
%63 = OpAccessChain %_ptr_Uniform_float %foo %int_0 %int_10 %uint_0
%64 = OpLoad %float %63
OpStore %w %64
%65 = OpLoad %float %v
%67 = OpFOrdGreaterThan %bool %65 %float_10
OpSelectionMerge %69 DontFlatten
OpBranchConditional %67 %68 %69
%68 = OpLabel
%73 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %int_20
OpStore %73 %72
OpBranch %69
%69 = OpLabel
OpStore %value %float_20
%76 = OpLoad %float %w
%78 = OpFOrdGreaterThan %bool %76 %float_40
OpSelectionMerge %80 Flatten
OpBranchConditional %78 %79 %80
%79 = OpLabel
OpStore %value %float_20
OpBranch %80
%80 = OpLabel
%81 = OpLoad %float %value
%82 = OpCompositeConstruct %v4float %81 %81 %81 %81
%83 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %int_20
OpStore %83 %82
OpReturn
OpFunctionEnd