mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 13:20:10 +01:00
zink: adjust bindless texel buffer handle before indexing
buffer handle ids are offset by ZINK_MAX_BINDLESS_HANDLES, but the actual
index is zero-based
Fixes: 99ba529fee ("zink: implement descriptor buffer handling of bindless texture")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22931>
This commit is contained in:
parent
8ef098a600
commit
2df7ee528c
1 changed files with 1 additions and 1 deletions
|
|
@ -1781,7 +1781,7 @@ zink_descriptors_update_bindless(struct zink_context *ctx)
|
|||
if (is_buffer) {
|
||||
size_t size = i ? screen->info.db_props.robustStorageTexelBufferDescriptorSize : screen->info.db_props.robustUniformTexelBufferDescriptorSize;
|
||||
info.type = i ? VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER : VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER;
|
||||
info.data.pSampler = (void*)&ctx->di.bindless[i].db.buffer_infos[handle];
|
||||
info.data.pSampler = (void*)&ctx->di.bindless[i].db.buffer_infos[handle - ZINK_MAX_BINDLESS_HANDLES];
|
||||
VKSCR(GetDescriptorEXT)(screen->dev, &info, size, ctx->dd.db.bindless_db_map + ctx->dd.db.bindless_db_offsets[binding] + handle * size);
|
||||
} else {
|
||||
info.type = i ? VK_DESCRIPTOR_TYPE_STORAGE_IMAGE : VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue