| <dawn>/test/tint/diagnostic_filtering/while_loop_body_attribute.wgsl:8:9 warning: 'textureSample' must only be called from uniform control flow |
| v = textureSample(t, s, vec2(0, 0)); |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/while_loop_body_attribute.wgsl:7:3 note: control flow depends on possibly non-uniform value |
| while (x > v.x) @diagnostic(warning, derivative_uniformity) { |
| ^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/while_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; 1 |
| ; Bound: 44 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %main_loc0_Input |
| OpExecutionMode %main OriginUpperLeft |
| OpName %t "t" |
| OpName %s "s" |
| OpName %main_loc0_Input "main_loc0_Input" |
| OpName %main_inner "main_inner" |
| OpName %x "x" |
| OpName %v "v" |
| OpName %main "main" |
| OpDecorate %t DescriptorSet 0 |
| OpDecorate %t Binding 1 |
| OpDecorate %s DescriptorSet 0 |
| OpDecorate %s Binding 2 |
| OpDecorate %main_loc0_Input Location 0 |
| %float = OpTypeFloat 32 |
| %3 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3 |
| %t = OpVariable %_ptr_UniformConstant_3 UniformConstant |
| %7 = OpTypeSampler |
| %_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7 |
| %s = OpVariable %_ptr_UniformConstant_7 UniformConstant |
| %_ptr_Input_float = OpTypePointer Input %float |
| %main_loc0_Input = OpVariable %_ptr_Input_float Input |
| %void = OpTypeVoid |
| %13 = OpTypeFunction %void %float |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %18 = OpConstantNull %v4float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %bool = OpTypeBool |
| %35 = OpTypeSampledImage %3 |
| %v2float = OpTypeVector %float 2 |
| %37 = OpConstantNull %v2float |
| %40 = OpTypeFunction %void |
| %main_inner = OpFunction %void None %13 |
| %x = OpFunctionParameter %float |
| %14 = OpLabel |
| %v = OpVariable %_ptr_Function_v4float Function |
| OpStore %v %18 |
| OpBranch %21 |
| %21 = OpLabel |
| OpLoopMerge %22 %20 None |
| OpBranch %19 |
| %19 = OpLabel |
| %23 = OpAccessChain %_ptr_Function_float %v %uint_0 |
| %27 = OpLoad %float %23 |
| %28 = OpFOrdGreaterThan %bool %x %27 |
| OpSelectionMerge %30 None |
| OpBranchConditional %28 %30 %31 |
| %31 = OpLabel |
| OpBranch %22 |
| %30 = OpLabel |
| %32 = OpLoad %3 %t |
| %33 = OpLoad %7 %s |
| %34 = OpSampledImage %35 %32 %33 |
| %36 = OpImageSampleImplicitLod %v4float %34 %37 None |
| OpStore %v %36 |
| OpBranch %20 |
| %20 = OpLabel |
| OpBranch %21 |
| %22 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %40 |
| %41 = OpLabel |
| %42 = OpLoad %float %main_loc0_Input |
| %43 = OpFunctionCall %void %main_inner %42 |
| OpReturn |
| OpFunctionEnd |