mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Fix buffers getting copied with a closed command list.
This commit is contained in:
parent
659f3700ee
commit
b054e16461
1 changed files with 9 additions and 1 deletions
|
|
@ -563,6 +563,14 @@ static void DestructTempResources()
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::thread::id g_mainThreadId;
|
static std::thread::id g_mainThreadId;
|
||||||
|
static std::thread::id g_presentThreadId = std::this_thread::get_id();
|
||||||
|
|
||||||
|
PPC_FUNC_IMPL(__imp__sub_824ECA00);
|
||||||
|
PPC_FUNC(sub_824ECA00)
|
||||||
|
{
|
||||||
|
g_presentThreadId = std::this_thread::get_id();
|
||||||
|
__imp__sub_824ECA00(ctx, base);
|
||||||
|
}
|
||||||
|
|
||||||
static ankerl::unordered_dense::map<RenderTexture*, RenderTextureLayout> g_barrierMap;
|
static ankerl::unordered_dense::map<RenderTexture*, RenderTextureLayout> g_barrierMap;
|
||||||
|
|
||||||
|
|
@ -1814,7 +1822,7 @@ static void UnlockBuffer(GuestBuffer* buffer)
|
||||||
{
|
{
|
||||||
if (!buffer->lockedReadOnly)
|
if (!buffer->lockedReadOnly)
|
||||||
{
|
{
|
||||||
if (std::this_thread::get_id() == g_mainThreadId)
|
if (std::this_thread::get_id() == g_presentThreadId)
|
||||||
{
|
{
|
||||||
RenderCommand cmd;
|
RenderCommand cmd;
|
||||||
cmd.type = (sizeof(T) == 2) ? RenderCommandType::UnlockBuffer16 : RenderCommandType::UnlockBuffer32;
|
cmd.type = (sizeof(T) == 2) ? RenderCommandType::UnlockBuffer16 : RenderCommandType::UnlockBuffer32;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue