Browse Source

GPU D3D12: Fix indirect buffers not being refcounted

cosmonaut 9 months ago
parent
commit
ff14a1781f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/gpu/d3d12/SDL_gpu_d3d12.c

+ 6 - 0
src/gpu/d3d12/SDL_gpu_d3d12.c

@@ -4827,6 +4827,8 @@ static void D3D12_DrawPrimitivesIndirect(
         offset,
         offset,
         NULL,
         NULL,
         0);
         0);
+
+    D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, d3d12Buffer);
 }
 }
 
 
 static void D3D12_DrawIndexedPrimitivesIndirect(
 static void D3D12_DrawIndexedPrimitivesIndirect(
@@ -4848,6 +4850,8 @@ static void D3D12_DrawIndexedPrimitivesIndirect(
         offset,
         offset,
         NULL,
         NULL,
         0);
         0);
+
+    D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, d3d12Buffer);
 }
 }
 
 
 static void D3D12_EndRenderPass(
 static void D3D12_EndRenderPass(
@@ -5303,6 +5307,8 @@ static void D3D12_DispatchComputeIndirect(
         offset,
         offset,
         NULL,
         NULL,
         0);
         0);
+
+    D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, d3d12Buffer);
 }
 }
 
 
 static void D3D12_EndComputePass(
 static void D3D12_EndComputePass(