mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 07:48:19 +02: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> (cherry picked from commit2df7ee528c)
This commit is contained in:
parent
0c447913c0
commit
baba0ca1f6
2 changed files with 2 additions and 2 deletions
|
|
@ -139,7 +139,7 @@
|
|||
"description": "zink: adjust bindless texel buffer handle before indexing",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "99ba529feed6f9917a44458a38acaf0b3d6d261d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1775,7 +1775,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