vc4: Optimize branching
anholt opened this issue · 0 comments
anholt commented
Right now we handle SIMD per-invocation masking by keeping a c->execute
value that is 0 when a channel is executing, or the block index of what block that invocation should start executing on again. This is used for per-channel SIMD masking, deciding when to continue a loop (because any invocation is still looping), and where to jump when some invocations have broken out of a loop and some have continued.
However, the code generated for this is really noisy and we could probably do better. Particularly for simple things like a top-level if
statement in a shader (though those usually get turned into conditional selects).