| diagnostic_filtering/case_body_attribute.wgsl:8:11 warning: 'textureSample' must only be called from uniform control flow |
| _ = textureSample(t, s, vec2(0, 0)); |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| diagnostic_filtering/case_body_attribute.wgsl:6:3 note: control flow depends on possibly non-uniform value |
| switch (i32(x)) { |
| ^^^^^^ |
| |
| diagnostic_filtering/case_body_attribute.wgsl:6:15 note: user-defined input 'x' of 'main' may be non-uniform |
| switch (i32(x)) { |
| ^ |
| |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 39 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %x_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %x_1 "x_1" |
| OpName %t "t" |
| OpName %s "s" |
| OpName %tint_ftoi "tint_ftoi" |
| OpName %v "v" |
| OpName %main_inner "main_inner" |
| OpName %x "x" |
| OpName %main "main" |
| OpDecorate %x_1 Location 0 |
| OpDecorate %t DescriptorSet 0 |
| OpDecorate %t Binding 1 |
| OpDecorate %s DescriptorSet 0 |
| OpDecorate %s Binding 2 |
| %float = OpTypeFloat 32 |
| %_ptr_Input_float = OpTypePointer Input %float |
| %x_1 = OpVariable %_ptr_Input_float Input |
| %6 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_6 = OpTypePointer UniformConstant %6 |
| %t = OpVariable %_ptr_UniformConstant_6 UniformConstant |
| %9 = OpTypeSampler |
| %_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 |
| %s = OpVariable %_ptr_UniformConstant_9 UniformConstant |
| %int = OpTypeInt 32 1 |
| %10 = OpTypeFunction %int %float |
| %float_2_14748352e_09 = OpConstant %float 2.14748352e+09 |
| %bool = OpTypeBool |
| %float_n2_14748365e_09 = OpConstant %float -2.14748365e+09 |
| %int_n2147483648 = OpConstant %int -2147483648 |
| %int_2147483647 = OpConstant %int 2147483647 |
| %void = OpTypeVoid |
| %25 = OpTypeFunction %void %float |
| %34 = OpTypeFunction %void |
| %tint_ftoi = OpFunction %int None %10 |
| %v = OpFunctionParameter %float |
| %14 = OpLabel |
| %17 = OpFOrdLessThan %bool %v %float_2_14748352e_09 |
| %21 = OpFOrdLessThan %bool %v %float_n2_14748365e_09 |
| %23 = OpConvertFToS %int %v |
| %19 = OpSelect %int %21 %int_n2147483648 %23 |
| %15 = OpSelect %int %17 %19 %int_2147483647 |
| OpReturnValue %15 |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %25 |
| %x = OpFunctionParameter %float |
| %29 = OpLabel |
| %31 = OpFunctionCall %int %tint_ftoi %x |
| OpSelectionMerge %30 None |
| OpSwitch %31 %32 0 %33 |
| %33 = OpLabel |
| OpBranch %30 |
| %32 = OpLabel |
| OpBranch %30 |
| %30 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %34 |
| %36 = OpLabel |
| %38 = OpLoad %float %x_1 |
| %37 = OpFunctionCall %void %main_inner %38 |
| OpReturn |
| OpFunctionEnd |