radeonsi: set DECOMPRESS_Z_ON_FLUSH if nr_samples >= 4
authorMarek Olšák <marek.olsak@amd.com>
Tue, 3 May 2016 10:29:16 +0000 (12:29 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 6 May 2016 10:56:47 +0000 (12:56 +0200)
Vulkan always sets this. It only affects in-place Z decompression.
This is recommended for performance, but what app uses MSAA depth
texturing?

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 81a43410ec6a4d81356ea560f63a6839f20bfda0..c6e10b76f70df65a84ef4ffa0352ace1b0b6aa2f 100644 (file)
@@ -1104,7 +1104,8 @@ static void si_emit_db_render_state(struct si_context *sctx, struct r600_atom *s
        /* DB_RENDER_OVERRIDE2 */
        radeon_set_context_reg(cs, R_028010_DB_RENDER_OVERRIDE2,
                S_028010_DISABLE_ZMASK_EXPCLEAR_OPTIMIZATION(sctx->db_depth_disable_expclear) |
-               S_028010_DISABLE_SMEM_EXPCLEAR_OPTIMIZATION(sctx->db_stencil_disable_expclear));
+               S_028010_DISABLE_SMEM_EXPCLEAR_OPTIMIZATION(sctx->db_stencil_disable_expclear) |
+               S_028010_DECOMPRESS_Z_ON_FLUSH(sctx->framebuffer.nr_samples >= 4));
 
        db_shader_control = S_02880C_ALPHA_TO_MASK_DISABLE(sctx->framebuffer.cb0_is_integer) |
                            sctx->ps_db_shader_control;