From: Alyssa Rosenzweig Date: Fri, 14 May 2021 22:28:10 +0000 (-0400) Subject: panfrost: Correct the type of sample_mask X-Git-Tag: upstream/21.2.3~3251 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88b9e5e471670b3eafffccb3d0d945ea599715ee;p=platform%2Fupstream%2Fmesa.git panfrost: Correct the type of sample_mask Let's not encode impossible masks. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 406471e..4c08026 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -600,7 +600,7 @@ panfrost_prepare_fs_state(struct panfrost_context *ctx, bool msaa = rast->multisample; state->multisample_misc.multisample_enable = msaa; - state->multisample_misc.sample_mask = (msaa ? ctx->sample_mask : ~0) & 0xFFFF; + state->multisample_misc.sample_mask = msaa ? ctx->sample_mask : 0xFFFF; state->multisample_misc.evaluate_per_sample = msaa && (ctx->min_samples > 1); diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index e7105f0..7401841 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -187,7 +187,7 @@ struct panfrost_context { struct pipe_blend_color blend_color; struct panfrost_zsa_state *depth_stencil; struct pipe_stencil_ref stencil_ref; - unsigned sample_mask; + uint16_t sample_mask; unsigned min_samples; struct panfrost_query *cond_query;