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>
(cherry picked from commit ab0f0d1563)
This commit is contained in:
Eric Engestrom 2023-08-19 03:14:49 +01:00 committed by Dylan Baker
parent 3ea69bf0fe
commit dba163b599
2 changed files with 3 additions and 3 deletions

View file

@ -5624,7 +5624,7 @@
"description": "zink: fix format in zink_make_{image,texture}_handle_resident()",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "99ba529feed6f9917a44458a38acaf0b3d6d261d",
"notes": null

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);