[vk] NullDescriptor guard

This commit is contained in:
CamilleLaVey 2025-11-29 12:30:25 -04:00 committed by Caio Oliveira
parent 91e134ee17
commit 5ca605fb8a
No known key found for this signature in database
GPG Key ID: AAAE6C7FD4186B0C
1 changed files with 6 additions and 0 deletions

View File

@ -594,6 +594,12 @@ void BufferCacheRuntime::BindVertexBuffer(u32 index, VkBuffer buffer, u32 offset
if (index >= device.GetMaxVertexInputBindings()) {
return;
}
if (!device.HasNullDescriptor() && buffer == VK_NULL_HANDLE) {
ReserveNullBuffer();
buffer = *null_buffer;
offset = 0;
size = VK_WHOLE_SIZE;
}
// Use BindVertexBuffers2EXT only if EDS1 is supported AND VIDS is not active
// When VIDS is active, the pipeline doesn't declare VERTEX_INPUT_BINDING_STRIDE as dynamic
if (device.IsExtExtendedDynamicStateSupported() && !device.IsExtVertexInputDynamicStateSupported()) {