panfrost: Preset evaluate_per_sample
Even though this isn't totally known at compile-time, at least one case is, so let's handle that one ahead-of-time. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10869>
This commit is contained in:
committed by
Marge Bot
parent
04f2cb8ec5
commit
aee43b8cb0
@@ -589,7 +589,6 @@ panfrost_prepare_fs_state(struct panfrost_context *ctx,
|
||||
struct MALI_RENDERER_STATE *state)
|
||||
{
|
||||
const struct panfrost_device *dev = pan_device(ctx->base.screen);
|
||||
struct panfrost_shader_state *fs = panfrost_get_shader_state(ctx, PIPE_SHADER_FRAGMENT);
|
||||
struct pipe_rasterizer_state *rast = &ctx->rasterizer->base;
|
||||
const struct panfrost_zsa_state *zsa = ctx->depth_stencil;
|
||||
bool alpha_to_coverage = ctx->blend->base.alpha_to_coverage;
|
||||
@@ -604,7 +603,7 @@ panfrost_prepare_fs_state(struct panfrost_context *ctx,
|
||||
state->multisample_misc.sample_mask = (msaa ? ctx->sample_mask : ~0) & 0xFFFF;
|
||||
|
||||
state->multisample_misc.evaluate_per_sample =
|
||||
msaa && (ctx->min_samples > 1 || fs->info.fs.sample_shading);
|
||||
msaa && (ctx->min_samples > 1);
|
||||
|
||||
state->multisample_misc.fixed_function_near_discard = rast->depth_clip_near;
|
||||
state->multisample_misc.fixed_function_far_discard = rast->depth_clip_far;
|
||||
|
||||
@@ -185,6 +185,11 @@ pan_shader_prepare_rsd(const struct panfrost_device *dev,
|
||||
shader_info->fs.writes_depth ?
|
||||
MALI_DEPTH_SOURCE_SHADER :
|
||||
MALI_DEPTH_SOURCE_FIXED_FUNCTION;
|
||||
|
||||
/* This also needs to be set if the API forces per-sample
|
||||
* shading, but that'll just got ORed in */
|
||||
rsd->multisample_misc.evaluate_per_sample =
|
||||
shader_info->fs.sample_shading;
|
||||
} else {
|
||||
rsd->properties.depth_source =
|
||||
MALI_DEPTH_SOURCE_FIXED_FUNCTION;
|
||||
|
||||
Reference in New Issue
Block a user