mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 23:52:10 +01:00
[d3d11] Use GetMapPtr when initializing mapped image buffer
This commit is contained in:
parent
1832332d6d
commit
f5241d187c
@ -177,7 +177,7 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mapMode != D3D11_COMMON_TEXTURE_MAP_MODE_NONE) {
|
if (mapMode != D3D11_COMMON_TEXTURE_MAP_MODE_NONE) {
|
||||||
util::packImageData(pTexture->GetMappedBuffer(index)->mapPtr(0),
|
util::packImageData(pTexture->GetMapPtr(index, 0),
|
||||||
pInitialData[index].pSysMem, pInitialData[index].SysMemPitch, pInitialData[index].SysMemSlicePitch,
|
pInitialData[index].pSysMem, pInitialData[index].SysMemPitch, pInitialData[index].SysMemSlicePitch,
|
||||||
0, 0, pTexture->GetVkImageType(), mipLevelExtent, 1, formatInfo, formatInfo->aspectMask);
|
0, 0, pTexture->GetVkImageType(), mipLevelExtent, 1, formatInfo, formatInfo->aspectMask);
|
||||||
}
|
}
|
||||||
@ -215,8 +215,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (mapMode != D3D11_COMMON_TEXTURE_MAP_MODE_NONE) {
|
if (mapMode != D3D11_COMMON_TEXTURE_MAP_MODE_NONE) {
|
||||||
for (uint32_t i = 0; i < pTexture->CountSubresources(); i++) {
|
for (uint32_t i = 0; i < pTexture->CountSubresources(); i++) {
|
||||||
auto buffer = pTexture->GetMappedBuffer(i);
|
auto layout = pTexture->GetSubresourceLayout(formatInfo->aspectMask, i);
|
||||||
std::memset(buffer->mapPtr(0), 0, buffer->info().size);
|
std::memset(pTexture->GetMapPtr(i, layout.Offset), 0, layout.Size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user