Skip to content

Commit

Permalink
GS:MTL: Fix command buffer UAF
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Feb 11, 2022
1 parent c297035 commit d9b7f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ static void setFnConstantI(MTLFunctionConstantValues* fc, unsigned int value, GS
m_texture_download_buf = MRCTransfer([m_dev.dev newBufferWithLength:size options:MTLResourceStorageModeShared]);
pxAssertRel(m_texture_download_buf, "Failed to allocate download buffer (out of memory?)");

id<MTLCommandBuffer> cmdbuf = GetRenderCmdBuf();
MRCOwned<id<MTLCommandBuffer>> cmdbuf = MRCRetain(GetRenderCmdBuf());
[cmdbuf pushDebugGroup:@"DownloadTexture"];
id<MTLBlitCommandEncoder> encoder = [cmdbuf blitCommandEncoder];
[encoder copyFromTexture:msrc->GetTexture()
Expand Down

0 comments on commit d9b7f06

Please sign in to comment.