blob: ba7c3d357d78668af26b519b539efff6e31d4474 [file] [log] [blame]
<dawn>/test/tint/diagnostic_filtering/if_body_attribute.wgsl:7:9 warning: 'textureSample' must only be called from uniform control flow
_ = textureSample(t, s, vec2(0, 0));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<dawn>/test/tint/diagnostic_filtering/if_body_attribute.wgsl:6:3 note: control flow depends on possibly non-uniform value
if (x > 0) @diagnostic(warning, derivative_uniformity) {
^^
<dawn>/test/tint/diagnostic_filtering/if_body_attribute.wgsl:6:7 note: user-defined input 'x' of 'main' may be non-uniform
if (x > 0) @diagnostic(warning, derivative_uniformity) {
^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; 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 %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
%void = OpTypeVoid
%10 = OpTypeFunction %void %float
%15 = OpConstantNull %float
%bool = OpTypeBool
%v4float = OpTypeVector %float 4
%24 = OpTypeSampledImage %6
%v2float = OpTypeVector %float 2
%27 = OpConstantNull %v2float
%28 = OpTypeFunction %void
%main_inner = OpFunction %void None %10
%x = OpFunctionParameter %float
%14 = OpLabel
%16 = OpFOrdGreaterThan %bool %x %15
OpSelectionMerge %18 None
OpBranchConditional %16 %19 %18
%19 = OpLabel
%22 = OpLoad %9 %s
%23 = OpLoad %6 %t
%25 = OpSampledImage %24 %23 %22
%20 = OpImageSampleImplicitLod %v4float %25 %27
OpBranch %18
%18 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %28
%30 = OpLabel
%32 = OpLoad %float %x_1
%31 = OpFunctionCall %void %main_inner %32
OpReturn
OpFunctionEnd