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>
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) {
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)
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);