mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Workaround AMD driver bug
* This may be present on other drivers - the vulkan spec allows a NULL pointer (or really garbage)
This commit is contained in:
@@ -742,6 +742,10 @@ void VulkanAccelerationStructureManager::Apply(ResourceId id, VkInitialContents
|
||||
for(VkAccelerationStructureBuildRangeInfoKHR numPrims : buildRangeInfos)
|
||||
counts.push_back(numPrims.primitiveCount);
|
||||
|
||||
// ensure counts is non-empty even if there are no geometries, to work around AMD (at least)
|
||||
// driver bug reading from NULL otherwise
|
||||
counts.resize_for_index(0);
|
||||
|
||||
ObjDisp(d)->GetAccelerationStructureBuildSizesKHR(
|
||||
Unwrap(d), VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR, &sizeInfo, counts.data(),
|
||||
&sizeResult);
|
||||
|
||||
Reference in New Issue
Block a user