zink: fix format in zink_make_{image,texture}_handle_resident()

`ds->db.format` is a `pipe_format`, while `buffer_infos[handle].format` is
a `VkFormat`; the conversion from one to the other was missing.

Fixes: 99ba529fee ("zink: implement descriptor buffer handling of bindless texture")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24790>
This commit is contained in:
Eric Engestrom
2023-08-19 03:14:49 +01:00
committed by Marge Bot
parent af28356de0
commit ab0f0d1563

View File

@@ -2288,7 +2288,7 @@ zink_make_texture_handle_resident(struct pipe_context *pctx, uint64_t handle, bo
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
ctx->di.bindless[0].db.buffer_infos[handle].address = res->obj->bda + ds->db.offset;
ctx->di.bindless[0].db.buffer_infos[handle].range = ds->db.size;
ctx->di.bindless[0].db.buffer_infos[handle].format = ds->db.format;
ctx->di.bindless[0].db.buffer_infos[handle].format = zink_get_format(zink_screen(ctx->base.screen), ds->db.format);
} else {
if (ds->bufferview->bvci.buffer != res->obj->buffer)
rebind_bindless_bufferview(ctx, res, ds);
@@ -2430,7 +2430,7 @@ zink_make_image_handle_resident(struct pipe_context *pctx, uint64_t handle, unsi
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
ctx->di.bindless[0].db.buffer_infos[handle].address = res->obj->bda + ds->db.offset;
ctx->di.bindless[0].db.buffer_infos[handle].range = ds->db.size;
ctx->di.bindless[0].db.buffer_infos[handle].format = ds->db.format;
ctx->di.bindless[0].db.buffer_infos[handle].format = zink_get_format(zink_screen(ctx->base.screen), ds->db.format);
} else {
if (ds->bufferview->bvci.buffer != res->obj->buffer)
rebind_bindless_bufferview(ctx, res, ds);