From: Erik Faye-Lund Date: Wed, 20 May 2020 12:48:02 +0000 (+0200) Subject: zink: do not dig into resource for nr_samples X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43c691b5b0f1cfba9292b316f846ad932646f0e4;p=mesa.git zink: do not dig into resource for nr_samples The pipe_surface also know this, so no point in digging so deep. Reviewed-by: Mike Blumenkrantz Part-of: --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index c5137b1dec8..a30f1fa6946 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -487,10 +487,10 @@ get_render_pass(struct zink_context *ctx) struct zink_render_pass_state state = { 0 }; for (int i = 0; i < fb->nr_cbufs; i++) { - struct pipe_resource *res = fb->cbufs[i]->texture; - state.rts[i].format = zink_get_format(screen, fb->cbufs[i]->format); - state.rts[i].samples = res->nr_samples > 0 ? res->nr_samples : - VK_SAMPLE_COUNT_1_BIT; + struct pipe_surface *surf = fb->cbufs[i]; + state.rts[i].format = zink_get_format(screen, surf->format); + state.rts[i].samples = surf->nr_samples > 0 ? surf->nr_samples : + VK_SAMPLE_COUNT_1_BIT; } state.num_cbufs = fb->nr_cbufs;