asahi,agx: Call lower_discard_zs_emit in the driver
The driver needs to lower MSAA (because only it knows the sample count). MSAA lowering depends on discards getting lowered (in order to get sample masks on the discards for sample shading to work properly). Discard lowering depends on all discards emitted. But the driver needs to lower clip planes which generates discards. To break the circular dependency, we have the driver call the discard lowering pass itself (in between lowering clip planes and lowering MSAA). Technically, this is probably a layering violation but it's the least gross solution I see. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23480>
This commit is contained in:

committed by
Marge Bot

parent
398851ca53
commit
b9b71bcae6
@@ -793,7 +793,6 @@ void agx_emit_parallel_copies(agx_builder *b, struct agx_copy *copies,
|
||||
void agx_compute_liveness(agx_context *ctx);
|
||||
void agx_liveness_ins_update(BITSET_WORD *live, agx_instr *I);
|
||||
|
||||
bool agx_nir_lower_discard_zs_emit(nir_shader *s);
|
||||
bool agx_nir_lower_sample_mask(nir_shader *s, unsigned nr_samples);
|
||||
bool agx_nir_lower_texture(nir_shader *s, bool support_lod_bias);
|
||||
bool agx_nir_opt_preamble(nir_shader *s, unsigned *preamble_size);
|
||||
|
Reference in New Issue
Block a user