From 0124a3d66135069d1ddd89de815df6dd375cdc4c Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 16 May 2024 10:50:01 +0100 Subject: [PATCH] Fix D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS serialisation --- renderdoc/driver/d3d12/d3d12_serialise.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d12/d3d12_serialise.cpp b/renderdoc/driver/d3d12/d3d12_serialise.cpp index 9f14bcb31..f08a01fcc 100644 --- a/renderdoc/driver/d3d12/d3d12_serialise.cpp +++ b/renderdoc/driver/d3d12/d3d12_serialise.cpp @@ -1920,7 +1920,9 @@ void DoSerialise(SerialiserType &ser, D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCT } } - SERIALISE_ELEMENT_ARRAY(tempDescs, el.NumDescs).Named("ppGeometryDescs"); + // not using SERIALISE_ELEMENT_ARRAY so we can deliberately avoid allocation and so that the + // array isn't immediately freed + ser.Serialise("ppGeometryDescs"_lit, tempDescs, el.NumDescs, SerialiserFlags::NoFlags); if(ser.IsReading()) {