etnaviv: fix late Z with MSAA active
On RA_WRITE_DEPTH GPUs the RA stage needs to be told that MSAA is active when the PE Z/S stage is needed. Not sure what it does exactly, but this fixes broken late Z on those GPUs when performing MSAA rendering. Cc: 22.3 mesa-stable Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19571>
This commit is contained in:
@@ -777,6 +777,13 @@ etna_update_zsa(struct etna_context *ctx)
|
||||
*/
|
||||
if (late_z_test || (early_z_test && late_z_write))
|
||||
new_ra_depth |= VIVS_RA_EARLY_DEPTH_HDEPTH_DISABLE;
|
||||
|
||||
if (ctx->framebuffer_s.nr_cbufs > 0) {
|
||||
struct pipe_resource *res = ctx->framebuffer_s.cbufs[0]->texture;
|
||||
|
||||
if ((late_z_test || late_z_write) && res->nr_samples > 1)
|
||||
new_ra_depth |= VIVS_RA_EARLY_DEPTH_LATE_DEPTH_MSAA;
|
||||
}
|
||||
}
|
||||
|
||||
if (new_pe_depth != zsa->PE_DEPTH_CONFIG ||
|
||||
|
||||
Reference in New Issue
Block a user