Skip to content

Commit

Permalink
Fix race usage of command buffer used for texture uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
Duttenheim committed Nov 23, 2024
1 parent a1735d9 commit 332b97a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/render/coregraphics/textureloader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ TextureLoader::StreamResource(const ResourceLoadJob& job)
CoreGraphics::CmdEndMarker(uploadCommands);
CoreGraphics::CmdEndRecord(uploadCommands);
CoreGraphics::CmdBufferIdRelease(uploadCommands);
CoreGraphics::DeferredDestroyCmdBuffer(uploadCommands);
CoreGraphics::DestroyCmdBuffer(uploadCommands);
}
}
if (job.loadState.pendingBits != 0x0)
Expand All @@ -380,8 +380,8 @@ TextureLoader::StreamResource(const ResourceLoadJob& job)
{
// First, delete the initial buffer
CoreGraphics::FreeUploads(handover.rangesToFree);
CoreGraphics::DeferredDestroyCmdBuffer(handover.uploadBuffer);
CoreGraphics::DeferredDestroyCmdBuffer(handover.receiveBuffer);
CoreGraphics::DestroyCmdBuffer(handover.uploadBuffer);
CoreGraphics::DestroyCmdBuffer(handover.receiveBuffer);

loadedBits |= handover.bits;
pendingBits &= ~handover.bits;
Expand Down

0 comments on commit 332b97a

Please sign in to comment.