mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 10:24:10 +01:00
[d3d11] Use new packImageData for initializing mapped image buffers
This commit is contained in:
parent
7184b75f8f
commit
ee30acf120
@ -141,13 +141,12 @@ namespace dxvk {
|
||||
|
||||
const uint32_t id = D3D11CalcSubresource(
|
||||
level, layer, image->info().mipLevels);
|
||||
|
||||
|
||||
VkOffset3D mipLevelOffset = { 0, 0, 0 };
|
||||
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