skia2/tests/sksl/shared/StaticIf.asm.frag

73 lines
2.5 KiB
GLSL
Raw Normal View History

OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %_entrypoint "_entrypoint" %sk_FragColor %sk_Clockwise
OpExecutionMode %_entrypoint OriginUpperLeft
OpName %sk_FragColor "sk_FragColor"
OpName %sk_Clockwise "sk_Clockwise"
OpName %_UniformBuffer "_UniformBuffer"
OpMemberName %_UniformBuffer 0 "colorRed"
OpMemberName %_UniformBuffer 1 "colorGreen"
OpName %_entrypoint "_entrypoint"
OpName %main "main"
OpName %result "result"
# Enter a description of the change. Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit 7e685f0377b161637f5e091e3f7320197f000a70. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commit e4da7b672f4012cbbad92c32a2810df8ab28af9e. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 21:13:45 +00:00
OpName %x "x"
OpName %y "y"
OpDecorate %sk_FragColor RelaxedPrecision
OpDecorate %sk_FragColor Location 0
OpDecorate %sk_FragColor Index 0
OpDecorate %sk_Clockwise BuiltIn FrontFacing
OpMemberDecorate %_UniformBuffer 0 Offset 0
OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
OpMemberDecorate %_UniformBuffer 1 Offset 16
OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
OpDecorate %_UniformBuffer Block
OpDecorate %10 Binding 0
OpDecorate %10 DescriptorSet 0
OpDecorate %26 RelaxedPrecision
# Enter a description of the change. Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit 7e685f0377b161637f5e091e3f7320197f000a70. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commit e4da7b672f4012cbbad92c32a2810df8ab28af9e. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 21:13:45 +00:00
OpDecorate %34 RelaxedPrecision
OpDecorate %35 RelaxedPrecision
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%sk_FragColor = OpVariable %_ptr_Output_v4float Output
%bool = OpTypeBool
%_ptr_Input_bool = OpTypePointer Input %bool
%sk_Clockwise = OpVariable %_ptr_Input_bool Input
%_UniformBuffer = OpTypeStruct %v4float %v4float
%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
%void = OpTypeVoid
%15 = OpTypeFunction %void
%18 = OpTypeFunction %v4float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
# Enter a description of the change. Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit 7e685f0377b161637f5e091e3f7320197f000a70. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commit e4da7b672f4012cbbad92c32a2810df8ab28af9e. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 21:13:45 +00:00
%_ptr_Function_float = OpTypePointer Function %float
%float_5 = OpConstant %float 5
%float_10 = OpConstant %float 10
%int_1 = OpConstant %int 1
%_entrypoint = OpFunction %void None %15
%16 = OpLabel
%17 = OpFunctionCall %v4float %main
OpStore %sk_FragColor %17
OpReturn
OpFunctionEnd
%main = OpFunction %v4float None %18
%19 = OpLabel
%result = OpVariable %_ptr_Function_v4float Function
# Enter a description of the change. Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit 7e685f0377b161637f5e091e3f7320197f000a70. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commit e4da7b672f4012cbbad92c32a2810df8ab28af9e. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 21:13:45 +00:00
%x = OpVariable %_ptr_Function_float Function
%y = OpVariable %_ptr_Function_float Function
%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
%26 = OpLoad %v4float %22
OpStore %result %26
# Enter a description of the change. Reland "Migrate if-statement simplifyStatement logic to IfStatement::Make." This reverts commit 7e685f0377b161637f5e091e3f7320197f000a70. Reason for revert: fixed SkSLBench perf test Original change's description: > Revert "Migrate if-statement simplifyStatement logic to IfStatement::Make." > > This reverts commit e4da7b672f4012cbbad92c32a2810df8ab28af9e. > > Reason for revert: breaks SkSLBench perf test > > Original change's description: > > Migrate if-statement simplifyStatement logic to IfStatement::Make. > > > > This performs essentially the same simplifications as before, just at > > a different phase of compilation. > > > > Change-Id: Ia88df6857d4089962505cd1281798fda74fd0b02 > > Bug: skia:11343, skia:11319 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376177 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I0051188ffe69426904066eb60a932435efdc2af8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:11343 > Bug: skia:11319 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379062 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> Bug: skia:11343 Bug: skia:11319 Change-Id: I74cc3295004133e9fdcf16e388106eb83603f526 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379063 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 21:13:45 +00:00
OpStore %x %float_5
OpStore %y %float_10
%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
%34 = OpLoad %v4float %32
OpStore %result %34
%35 = OpLoad %v4float %result
OpReturnValue %35
OpFunctionEnd