mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[d3d11] Use new packImageData for initializing mapped image buffers
This commit is contained in:
parent
7184b75f8f
commit
ee30acf120
@ -146,8 +146,7 @@ namespace dxvk {
|
||||
VkExtent3D mipLevelExtent = image->mipLevelExtent(level);
|
||||
|
||||
m_transferCommands += 1;
|
||||
m_transferMemory += util::computeImageDataSize(
|
||||
image->info().format, mipLevelExtent);
|
||||
m_transferMemory += pTexture->GetSubresourceLayout(formatInfo->aspectMask, id).Size;
|
||||
|
||||
if (formatInfo->aspectMask != (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
||||
m_context->uploadImage(
|
||||
@ -167,9 +166,9 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
if (pTexture->GetMapMode() == D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER) {
|
||||
util::packImageData(pTexture->GetMappedBuffer(id)->mapPtr(0), pInitialData[id].pSysMem,
|
||||
util::computeBlockCount(image->mipLevelExtent(level), formatInfo->blockSize),
|
||||
formatInfo->elementSize, pInitialData[id].SysMemPitch, pInitialData[id].SysMemSlicePitch);
|
||||
util::packImageData(pTexture->GetMappedBuffer(id)->mapPtr(0),
|
||||
pInitialData[id].pSysMem, pInitialData[id].SysMemPitch, pInitialData[id].SysMemSlicePitch,
|
||||
image->info().type, mipLevelExtent, 1, formatInfo, formatInfo->aspectMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user