mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
radeonsi: move a few DB_SHADER_CONTROL states into si_shader_ps
They can be set si_shader_ps. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
This commit is contained in:
parent
ee83ba5771
commit
3e9863f496
3 changed files with 10 additions and 11 deletions
|
|
@ -1593,19 +1593,10 @@ static void si_emit_db_render_state(struct si_context *sctx)
|
|||
|
||||
db_shader_control = sctx->ps_db_shader_control;
|
||||
|
||||
/* Bug workaround for smoothing (overrasterization) on GFX6. */
|
||||
if (sctx->gfx_level == GFX6 && sctx->smoothing_enabled) {
|
||||
db_shader_control &= C_02880C_Z_ORDER;
|
||||
db_shader_control |= S_02880C_Z_ORDER(V_02880C_LATE_Z);
|
||||
}
|
||||
|
||||
/* Disable the gl_SampleMask fragment shader output if MSAA is disabled. */
|
||||
if (!rs->multisample_enable)
|
||||
db_shader_control &= C_02880C_MASK_EXPORT_ENABLE;
|
||||
|
||||
if (sctx->screen->info.has_rbplus && !sctx->screen->info.rbplus_allowed)
|
||||
db_shader_control |= S_02880C_DUAL_QUAD_DISABLE(1);
|
||||
|
||||
if (sctx->screen->info.has_export_conflict_bug &&
|
||||
sctx->queued.named.blend->blend_enable_4bit &&
|
||||
si_get_num_coverage_samples(sctx) == 1) {
|
||||
|
|
|
|||
|
|
@ -296,8 +296,7 @@ static bool si_update_shaders(struct si_context *sctx)
|
|||
if (GFX_VERSION >= GFX10 && sctx->screen->use_ngg_culling)
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.ngg_cull_state);
|
||||
|
||||
if (GFX_VERSION == GFX6 ||
|
||||
(GFX_VERSION == GFX11 && sctx->screen->info.has_export_conflict_bug))
|
||||
if (GFX_VERSION == GFX11 && sctx->screen->info.has_export_conflict_bug)
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.db_render_state);
|
||||
|
||||
if (sctx->framebuffer.nr_samples <= 1)
|
||||
|
|
|
|||
|
|
@ -1919,6 +1919,15 @@ static void si_shader_ps(struct si_screen *sscreen, struct si_shader *shader)
|
|||
if (info->base.fs.post_depth_coverage)
|
||||
db_shader_control |= S_02880C_PRE_SHADER_DEPTH_COVERAGE_ENABLE(1);
|
||||
|
||||
/* Bug workaround for smoothing (overrasterization) on GFX6. */
|
||||
if (sscreen->info.gfx_level == GFX6 && shader->key.ps.mono.poly_line_smoothing) {
|
||||
db_shader_control &= C_02880C_Z_ORDER;
|
||||
db_shader_control |= S_02880C_Z_ORDER(V_02880C_LATE_Z);
|
||||
}
|
||||
|
||||
if (sscreen->info.has_rbplus && !sscreen->info.rbplus_allowed)
|
||||
db_shader_control |= S_02880C_DUAL_QUAD_DISABLE(1);
|
||||
|
||||
shader->ctx_reg.ps.db_shader_control = db_shader_control;
|
||||
|
||||
pm4 = si_get_shader_pm4_state(shader);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue