zink: add to multisample field to zink_gfx_pipeline_state

This field will store whether multisample is enabled, this is needed to
manage the case where a multisampling buffer is used with multisampling
disabled.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22626>
This commit is contained in:
antonino 2023-04-21 15:11:28 +02:00 committed by Marge Bot
parent 420f2c0878
commit 14d5892609
2 changed files with 5 additions and 2 deletions

View file

@ -659,6 +659,7 @@ zink_bind_rasterizer_state(struct pipe_context *pctx, void *cso)
bool half_pixel_center = ctx->rast_state ? ctx->rast_state->base.half_pixel_center : true;
float line_width = ctx->rast_state ? ctx->rast_state->base.line_width : 1.0;
ctx->rast_state = cso;
ctx->gfx_pipeline_state.multisample = !ctx->rast_state || ctx->rast_state->base.multisample;
if (ctx->rast_state) {
if (screen->info.have_EXT_provoking_vertex &&

View file

@ -812,7 +812,8 @@ struct zink_gfx_pipeline_state {
/* order matches zink_gfx_output_key */
unsigned force_persample_interp:1;
uint32_t rast_samples:6;
uint32_t min_samples:6;
uint32_t multisample: 1;
uint32_t min_samples:5;
uint32_t feedback_loop : 1;
uint32_t feedback_loop_zs : 1;
uint32_t rast_attachment_order : 1;
@ -986,7 +987,8 @@ struct zink_gfx_output_key {
struct {
unsigned force_persample_interp:1;
uint32_t rast_samples:6;
uint32_t min_samples:6;
uint32_t multisample: 1;
uint32_t min_samples:5;
uint32_t feedback_loop : 1;
uint32_t feedback_loop_zs : 1;
uint32_t rast_attachment_order : 1;