You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
float a;
varying float iters;
for (int i = 0; i < int(iters); i++) {
a = (some computation that can't be hoisted);
}
gl_FragColor = vec4(a);
a is an SSA def from the perspective of a shader invocation (and thus NIR's SSA), so vc4_program.c doesn't mask it per SIMD channel. However, when one of our channels broke out early because iters is non-uniform, gl_FragColor should have that channel's version of a, not the final execution's one. We don't want to do the masking for simple SSA defs and use within a block, because it's expensive.
Figure out what is the minimal amount of masking we can generate for correct code. Jason's pass is probably relevant.
The text was updated successfully, but these errors were encountered:
For some pseudocode:
a is an SSA def from the perspective of a shader invocation (and thus NIR's SSA), so vc4_program.c doesn't mask it per SIMD channel. However, when one of our channels broke out early because
iters
is non-uniform, gl_FragColor should have that channel's version ofa
, not the final execution's one. We don't want to do the masking for simple SSA defs and use within a block, because it's expensive.Figure out what is the minimal amount of masking we can generate for correct code. Jason's pass is probably relevant.
The text was updated successfully, but these errors were encountered: