nvk: Look at the right pointer in GetDescriptorInfo for SSBOs

It doesn't actually matter but we shouldn't poke at the wrong union
field.

Fixes: 77db71db7d ("nvk: Implement GetDescriptorEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38040>
This commit is contained in:
Faith Ekstrand 2025-10-23 21:24:22 -04:00 committed by Marge Bot
parent d39221cef3
commit a13474939d

View file

@ -1193,11 +1193,11 @@ nvk_GetDescriptorEXT(VkDevice _device,
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: {
struct nvk_addr_range addr_range = { };
if (pDescriptorInfo->data.pUniformBuffer != NULL &&
pDescriptorInfo->data.pUniformBuffer->address != 0) {
if (pDescriptorInfo->data.pStorageBuffer != NULL &&
pDescriptorInfo->data.pStorageBuffer->address != 0) {
addr_range = (const struct nvk_addr_range) {
.addr = pDescriptorInfo->data.pUniformBuffer->address,
.range = pDescriptorInfo->data.pUniformBuffer->range,
.addr = pDescriptorInfo->data.pStorageBuffer->address,
.range = pDescriptorInfo->data.pStorageBuffer->range,
};
}
union nvk_buffer_descriptor desc = ssbo_desc(addr_range);