ac,radv,radeonsi: add has_db_force_stencil_valid_bug
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40303>
This commit is contained in:
parent
cb5f2a0521
commit
0da3714bd3
4 changed files with 10 additions and 4 deletions
|
|
@ -1112,6 +1112,11 @@ ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
|||
*/
|
||||
info->has_pops_missed_overlap_bug = info->family == CHIP_VEGA10 || info->family == CHIP_RAVEN;
|
||||
|
||||
/* Whether FORCE_STENCIL_VALID must be forced to 1 when a MSAA
|
||||
* depth/stencil image is bound and that ZPASS/ZFAIL differs.
|
||||
*/
|
||||
info->has_db_force_stencil_valid_bug = info->gfx_level == GFX12;
|
||||
|
||||
/* GFX6 hw bug when the IBO addr is 0 which causes invalid clamping (underflow).
|
||||
* Setting the IB addr to 2 or higher solves this issue.
|
||||
* See waMiscNullIb in PAL.
|
||||
|
|
|
|||
|
|
@ -262,6 +262,7 @@ struct radeon_info {
|
|||
bool has_small_prim_filter_sample_loc_bug;
|
||||
bool has_pops_missed_overlap_bug;
|
||||
bool has_zero_index_buffer_bug;
|
||||
bool has_db_force_stencil_valid_bug;
|
||||
bool has_two_planes_iterate256_bug;
|
||||
bool has_vgt_flush_ngg_legacy_bug;
|
||||
bool has_prim_restart_sync_bug;
|
||||
|
|
|
|||
|
|
@ -11953,9 +11953,9 @@ radv_emit_depth_stencil_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
|
||||
radeon_begin(cmd_buffer->cs);
|
||||
if (pdev->info.gfx_level >= GFX12) {
|
||||
const bool force_s_valid =
|
||||
ds.stencil.test_enable && ((ds.stencil.front.op.pass != ds.stencil.front.op.depth_fail) ||
|
||||
(ds.stencil.back.op.pass != ds.stencil.back.op.depth_fail));
|
||||
const bool force_s_valid = pdev->info.has_db_force_stencil_valid_bug && ds.stencil.test_enable &&
|
||||
((ds.stencil.front.op.pass != ds.stencil.front.op.depth_fail) ||
|
||||
(ds.stencil.back.op.pass != ds.stencil.back.op.depth_fail));
|
||||
|
||||
gfx12_begin_context_regs();
|
||||
gfx12_opt_set_context_reg(R_02800C_DB_RENDER_OVERRIDE, AC_TRACKED_DB_RENDER_OVERRIDE,
|
||||
|
|
|
|||
|
|
@ -1465,7 +1465,7 @@ static void *si_create_dsa_state(struct pipe_context *ctx,
|
|||
dsa->db_stencil_write_mask = S_028094_WRITEMASK(state->stencil[0].writemask) |
|
||||
S_028094_WRITEMASK_BF(state->stencil[1].writemask);
|
||||
|
||||
if (sctx->gfx_level == GFX12) {
|
||||
if (sctx->screen->info.has_db_force_stencil_valid_bug) {
|
||||
dsa->gfx12_force_stencil_valid = state->stencil[0].zpass_op != state->stencil[0].zfail_op ||
|
||||
(state->stencil[1].enabled &&
|
||||
state->stencil[1].zpass_op != state->stencil[1].zfail_op);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue