blob: 229ee64c55b9d264b26759d0a7d78af3a437bfab [file] [log] [blame]
<dawn>/test/tint/diagnostic_filtering/default_case_body_attribute.wgsl:8:11 warning: 'textureSample' must only be called from uniform control flow
_ = textureSample(t, s, vec2(0, 0));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<dawn>/test/tint/diagnostic_filtering/default_case_body_attribute.wgsl:6:3 note: control flow depends on possibly non-uniform value
switch (i32(x)) {
^^^^^^
<dawn>/test/tint/diagnostic_filtering/default_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: 46
; 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
%v4float = OpTypeVector %float 4
%37 = OpTypeSampledImage %6
%v2float = OpTypeVector %float 2
%40 = OpConstantNull %v2float
%41 = 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
%32 = OpLabel
%35 = OpLoad %9 %s
%36 = OpLoad %6 %t
%38 = OpSampledImage %37 %36 %35
%33 = OpImageSampleImplicitLod %v4float %38 %40
OpBranch %30
%30 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %41
%43 = OpLabel
%45 = OpLoad %float %x_1
%44 = OpFunctionCall %void %main_inner %45
OpReturn
OpFunctionEnd