| <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: 69 | |
| ; 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 %tint_loop_idx "tint_loop_idx" | |
| OpName %tint_low_inc "tint_low_inc" | |
| OpName %tint_carry "tint_carry" | |
| 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 | |
| %uint = OpTypeInt 32 0 | |
| %v2uint = OpTypeVector %uint 2 | |
| %_ptr_Function_v2uint = OpTypePointer Function %v2uint | |
| %uint_4294967295 = OpConstant %uint 4294967295 | |
| %28 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 | |
| %32 = OpConstantNull %v2uint | |
| %bool = OpTypeBool | |
| %v2bool = OpTypeVector %bool 2 | |
| %_ptr_Function_float = OpTypePointer Function %float | |
| %uint_0 = OpConstant %uint 0 | |
| %48 = OpTypeSampledImage %3 | |
| %v2float = OpTypeVector %float 2 | |
| %50 = OpConstantNull %v2float | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %uint_1 = OpConstant %uint 1 | |
| %65 = OpTypeFunction %void | |
| %main_inner = OpFunction %void None %13 | |
| %x = OpFunctionParameter %float | |
| %14 = OpLabel | |
| %v = OpVariable %_ptr_Function_v4float Function | |
| %tint_loop_idx = OpVariable %_ptr_Function_v2uint Function | |
| OpStore %v %18 | |
| OpBranch %19 | |
| %19 = OpLabel | |
| OpStore %tint_loop_idx %28 | |
| OpBranch %22 | |
| %22 = OpLabel | |
| OpLoopMerge %23 %21 None | |
| OpBranch %20 | |
| %20 = OpLabel | |
| %30 = OpLoad %v2uint %tint_loop_idx None | |
| %31 = OpIEqual %v2bool %30 %32 | |
| %35 = OpAll %bool %31 | |
| OpSelectionMerge %36 None | |
| OpBranchConditional %35 %37 %36 | |
| %37 = OpLabel | |
| OpBranch %23 | |
| %36 = OpLabel | |
| %38 = OpAccessChain %_ptr_Function_float %v %uint_0 | |
| %41 = OpLoad %float %38 None | |
| %42 = OpFOrdGreaterThan %bool %x %41 | |
| OpSelectionMerge %43 None | |
| OpBranchConditional %42 %43 %44 | |
| %44 = OpLabel | |
| OpBranch %23 | |
| %43 = OpLabel | |
| %45 = OpLoad %3 %t None | |
| %46 = OpLoad %7 %s None | |
| %47 = OpSampledImage %48 %45 %46 | |
| %49 = OpImageSampleImplicitLod %v4float %47 %50 None | |
| OpStore %v %49 None | |
| OpBranch %21 | |
| %21 = OpLabel | |
| %52 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| %54 = OpLoad %uint %52 None | |
| %tint_low_inc = OpISub %uint %54 %uint_1 | |
| %57 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| OpStore %57 %tint_low_inc None | |
| %58 = OpIEqual %bool %tint_low_inc %uint_4294967295 | |
| %tint_carry = OpSelect %uint %58 %uint_1 %uint_0 | |
| %60 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| %61 = OpLoad %uint %60 None | |
| %62 = OpISub %uint %61 %tint_carry | |
| %63 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| OpStore %63 %62 None | |
| OpBranch %22 | |
| %23 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %65 | |
| %66 = OpLabel | |
| %67 = OpLoad %float %main_loc0_Input None | |
| %68 = OpFunctionCall %void %main_inner %67 | |
| OpReturn | |
| OpFunctionEnd |