mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 05:20:37 +02:00
agx: Call nir_lower_discard_if
We still need to implement discard itself, but this means we don't need to worry about discard_if. This compiles down to the same idiom as the vendor compiler (Metal) generates Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14217>
This commit is contained in:
parent
aaf00a1b4d
commit
f8feaee0dd
1 changed files with 3 additions and 0 deletions
|
|
@ -1481,6 +1481,9 @@ agx_compile_shader_nir(nir_shader *nir,
|
|||
|
||||
agx_optimize_nir(nir);
|
||||
|
||||
/* Implement conditional discard with real control flow like Metal */
|
||||
NIR_PASS_V(nir, nir_lower_discard_if);
|
||||
|
||||
/* Must be last since NIR passes can remap driver_location freely */
|
||||
if (ctx->stage == MESA_SHADER_VERTEX) {
|
||||
agx_remap_varyings_vs(nir, &out->varyings, ctx->varyings);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue