d3d12: Try not to overcommit texture memory

This commit is contained in:
vlj 2015-06-04 01:26:25 +02:00 committed by Vincent Lejeune
parent a5fb8c95f4
commit a751a06d01

View file

@ -250,6 +250,9 @@ size_t D3D12GSRender::UploadTextures()
}
Texture->Unmap(0, nullptr);
size_t powerOf2Height = log2(heightInBlocks) + 1;
textureSize = rowPitch * powerOf2Height;
assert(m_textureData.canAlloc(textureSize * 2));
size_t heapOffset2 = m_textureData.alloc(textureSize * 2);