zink: use scanout obj when returning resource param info

embarrassing typo since the base obj has no modifier data available

cc: mesa-stable

fixes #5980

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14875>
This commit is contained in:
Mike Blumenkrantz 2022-02-04 08:29:28 -05:00 committed by Marge Bot
parent a8fbfcfbd3
commit 960e72417f
1 changed files with 2 additions and 2 deletions

View File

@ -1042,7 +1042,7 @@ zink_resource_get_param(struct pipe_screen *pscreen, struct pipe_context *pctx,
switch (param) { switch (param) {
case PIPE_RESOURCE_PARAM_NPLANES: case PIPE_RESOURCE_PARAM_NPLANES:
if (screen->info.have_EXT_image_drm_format_modifier) if (screen->info.have_EXT_image_drm_format_modifier)
*value = pscreen->get_dmabuf_modifier_planes(pscreen, res->obj->modifier, pres->format); *value = pscreen->get_dmabuf_modifier_planes(pscreen, obj->modifier, pres->format);
else else
*value = 1; *value = 1;
break; break;
@ -1072,7 +1072,7 @@ zink_resource_get_param(struct pipe_screen *pscreen, struct pipe_context *pctx,
} }
case PIPE_RESOURCE_PARAM_MODIFIER: { case PIPE_RESOURCE_PARAM_MODIFIER: {
*value = res->obj->modifier; *value = obj->modifier;
break; break;
} }