blob: 41dd99e1e22700467e2a0e634befb705895964d3 [file] [log] [blame] [edit]
diagnostic_filtering/for_loop_body_attribute.wgsl:8:9 warning: 'textureSample' must only be called from uniform control flow
v = textureSample(t, s, vec2(0, 0));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diagnostic_filtering/for_loop_body_attribute.wgsl:7:3 note: control flow depends on possibly non-uniform value
for (; x > v.x; ) @diagnostic(warning, derivative_uniformity) {
^^^
diagnostic_filtering/for_loop_body_attribute.wgsl:8:9 note: return value of 'textureSample' may be non-uniform
v = textureSample(t, s, vec2(0, 0));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; 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 %v "v"
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
%v4float = OpTypeVector %float 4
%16 = OpConstantNull %v4float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%bool = OpTypeBool
%36 = OpTypeSampledImage %6
%v2float = OpTypeVector %float 2
%39 = OpConstantNull %v2float
%40 = OpTypeFunction %void
%main_inner = OpFunction %void None %10
%x = OpFunctionParameter %float
%14 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %16
OpStore %v %16
OpBranch %19
%19 = OpLabel
OpLoopMerge %20 %21 None
OpBranch %22
%22 = OpLabel
%27 = OpAccessChain %_ptr_Function_float %v %uint_0
%28 = OpLoad %float %27
%29 = OpFOrdGreaterThan %bool %x %28
%23 = OpLogicalNot %bool %29
OpSelectionMerge %31 None
OpBranchConditional %23 %32 %31
%32 = OpLabel
OpBranch %20
%31 = OpLabel
%34 = OpLoad %9 %s
%35 = OpLoad %6 %t
%37 = OpSampledImage %36 %35 %34
%33 = OpImageSampleImplicitLod %v4float %37 %39
OpStore %v %33
OpBranch %21
%21 = OpLabel
OpBranch %19
%20 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %40
%42 = OpLabel
%44 = OpLoad %float %x_1
%43 = OpFunctionCall %void %main_inner %44
OpReturn
OpFunctionEnd