mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 05:50:25 +01:00
radeonsi: ignore pipe_rasterizer_state::force_persample_interp
It just indicates that sample shading is enabled, which we were checking already. The state is redundant. Just check shader_info::fs::uses_sample_shading. ARB_sample_shading (GL3.3) doesn't set fs.uses_sample_shading in shader_info (which is for GL4.0), and that's why we have this codepath that forces per-sample interpolation. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
This commit is contained in:
parent
1ff790a4f8
commit
65398d571b
3 changed files with 4 additions and 4 deletions
|
|
@ -979,7 +979,6 @@ static void *si_create_rs_state(struct pipe_context *ctx, const struct pipe_rast
|
|||
rs->clip_halfz = state->clip_halfz;
|
||||
rs->two_side = state->light_twoside;
|
||||
rs->multisample_enable = state->multisample;
|
||||
rs->force_persample_interp = state->force_persample_interp;
|
||||
rs->clip_plane_enable = state->clip_plane_enable;
|
||||
rs->half_pixel_center = state->half_pixel_center;
|
||||
rs->line_stipple_enable = state->line_stipple_enable;
|
||||
|
|
@ -1352,7 +1351,6 @@ static void si_bind_rs_state(struct pipe_context *ctx, void *state)
|
|||
si_ps_key_update_rasterizer(sctx);
|
||||
|
||||
if (old_rs->flatshade != rs->flatshade ||
|
||||
old_rs->force_persample_interp != rs->force_persample_interp ||
|
||||
old_rs->multisample_enable != rs->multisample_enable)
|
||||
si_ps_key_update_framebuffer_rasterizer_sample_shading(sctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ struct si_state_rasterizer {
|
|||
unsigned flatshade_first : 1;
|
||||
unsigned two_side : 1;
|
||||
unsigned multisample_enable : 1;
|
||||
unsigned force_persample_interp : 1;
|
||||
unsigned line_stipple_enable : 1;
|
||||
unsigned poly_stipple_enable : 1;
|
||||
unsigned line_smooth : 1;
|
||||
|
|
|
|||
|
|
@ -2852,7 +2852,7 @@ void si_ps_key_update_framebuffer_rasterizer_sample_shading(struct si_context *s
|
|||
bool uses_persp_sample = sel->info.uses_persp_sample ||
|
||||
(!rs->flatshade && sel->info.uses_persp_sample_color);
|
||||
|
||||
if (rs->force_persample_interp && rs->multisample_enable &&
|
||||
if (!sel->info.base.fs.uses_sample_shading && rs->multisample_enable &&
|
||||
sctx->framebuffer.nr_samples > 1 && sctx->ps_iter_samples > 1) {
|
||||
key->ps.part.prolog.force_persp_sample_interp =
|
||||
uses_persp_center || uses_persp_centroid;
|
||||
|
|
@ -2867,6 +2867,9 @@ void si_ps_key_update_framebuffer_rasterizer_sample_shading(struct si_context *s
|
|||
key->ps.part.prolog.force_samplemask_to_helper_invocation = 0;
|
||||
key->ps.mono.interpolate_at_sample_force_center = 0;
|
||||
} else if (rs->multisample_enable && sctx->framebuffer.nr_samples > 1) {
|
||||
/* Note that sample shading is possible here. If it's enabled, all barycentrics are
|
||||
* already set to "sample" except at_offset/at_sample.
|
||||
*/
|
||||
key->ps.part.prolog.force_persp_sample_interp = 0;
|
||||
key->ps.part.prolog.force_linear_sample_interp = 0;
|
||||
key->ps.part.prolog.force_persp_center_interp = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue