rtx: fix scratch buffer validation error, #69

New Vulkan SDK (1.2.189.2) has a new validation check that verifies that AS build scratch buffer has been created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT.
This commit is contained in:
Ivan 'provod' Avdeev 2021-09-16 09:19:21 -07:00 committed by Ivan Avdeev
parent a7288eba69
commit 4ff669c023

View File

@ -985,7 +985,7 @@ qboolean VK_RayInit( void )
g_rtx.accels_buffer_alloc.size = g_rtx.accels_buffer.size;
if (!createBuffer("ray scratch_buffer", &g_rtx.scratch_buffer, MAX_SCRATCH_BUFFER,
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
)) {
return false;