From 4ff669c0236caad9001123045aeac4da9e53cbe0 Mon Sep 17 00:00:00 2001 From: Ivan 'provod' Avdeev Date: Thu, 16 Sep 2021 09:19:21 -0700 Subject: [PATCH] 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. --- ref_vk/vk_rtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ref_vk/vk_rtx.c b/ref_vk/vk_rtx.c index 6c5a4706..109b4db2 100644 --- a/ref_vk/vk_rtx.c +++ b/ref_vk/vk_rtx.c @@ -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;