struct zink_context *ctx = zink_context(pctx);
struct zink_screen *screen = zink_screen(pctx->screen);
- VkSampleCountFlagBits rast_samples = VK_SAMPLE_COUNT_1_BIT;
- for (int i = 0; i < state->nr_cbufs; i++)
- rast_samples = MAX2(rast_samples, state->cbufs[i]->texture->nr_samples);
- if (state->zsbuf && state->zsbuf->texture->nr_samples)
- rast_samples = MAX2(rast_samples, state->zsbuf->texture->nr_samples);
-
util_copy_framebuffer_state(&ctx->fb_state, state);
struct zink_framebuffer *fb = ctx->framebuffer;
zink_framebuffer_reference(screen, &ctx->framebuffer, fb);
zink_render_pass_reference(screen, &ctx->gfx_pipeline_state.render_pass, fb->rp);
- ctx->gfx_pipeline_state.rast_samples = rast_samples;
+ ctx->gfx_pipeline_state.rast_samples = MAX2(state->samples, 1);
ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs;
struct zink_batch *batch = zink_batch_no_rp(ctx);