mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
d3d12: Fix for size calculation
This commit is contained in:
parent
a751a06d01
commit
d886fd55d3
1 changed files with 4 additions and 4 deletions
|
@ -251,10 +251,10 @@ size_t D3D12GSRender::UploadTextures()
|
|||
Texture->Unmap(0, nullptr);
|
||||
|
||||
size_t powerOf2Height = log2(heightInBlocks) + 1;
|
||||
textureSize = rowPitch * powerOf2Height;
|
||||
textureSize = rowPitch * (1 << powerOf2Height);
|
||||
|
||||
assert(m_textureData.canAlloc(textureSize * 2));
|
||||
size_t heapOffset2 = m_textureData.alloc(textureSize * 2);
|
||||
assert(m_textureData.canAlloc(textureSize));
|
||||
size_t heapOffset2 = m_textureData.alloc(textureSize);
|
||||
|
||||
check(m_device->CreatePlacedResource(
|
||||
m_textureData.m_heap,
|
||||
|
@ -264,7 +264,7 @@ size_t D3D12GSRender::UploadTextures()
|
|||
nullptr,
|
||||
IID_PPV_ARGS(&vramTexture)
|
||||
));
|
||||
m_textureData.m_resourceStoredSinceLastSync.push_back(std::make_tuple(heapOffset2, textureSize * 2, vramTexture));
|
||||
m_textureData.m_resourceStoredSinceLastSync.push_back(std::make_tuple(heapOffset2, textureSize, vramTexture));
|
||||
|
||||
D3D12_TEXTURE_COPY_LOCATION dst = {}, src = {};
|
||||
dst.pResource = vramTexture;
|
||||
|
|
Loading…
Add table
Reference in a new issue