mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 19:24:11 +01:00
[d3d11] copy all layers and mipmaps in CopyResource
avoid using potentially undefined mappedSubresource
This commit is contained in:
parent
482147d929
commit
340438954d
@ -491,18 +491,19 @@ namespace dxvk {
|
|||||||
const D3D11TextureInfo* dstTextureInfo = GetCommonTextureInfo(pDstResource);
|
const D3D11TextureInfo* dstTextureInfo = GetCommonTextureInfo(pDstResource);
|
||||||
const D3D11TextureInfo* srcTextureInfo = GetCommonTextureInfo(pSrcResource);
|
const D3D11TextureInfo* srcTextureInfo = GetCommonTextureInfo(pSrcResource);
|
||||||
|
|
||||||
VkExtent3D extent = srcTextureInfo->image->mipLevelExtent(
|
const DxvkFormatInfo* dstFormatInfo = imageFormatInfo(dstTextureInfo->image->info().format);
|
||||||
dstTextureInfo->mappedSubresource.mipLevel);
|
const DxvkFormatInfo* srcFormatInfo = imageFormatInfo(srcTextureInfo->image->info().format);
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < srcTextureInfo->image->info().mipLevels; i++) {
|
||||||
|
VkExtent3D extent = srcTextureInfo->image->mipLevelExtent(i);
|
||||||
|
|
||||||
const VkImageSubresourceLayers dstLayers = {
|
const VkImageSubresourceLayers dstLayers = {
|
||||||
dstTextureInfo->mappedSubresource.aspectMask,
|
dstFormatInfo->aspectMask & srcFormatInfo->aspectMask,
|
||||||
dstTextureInfo->mappedSubresource.mipLevel,
|
i, 0, dstTextureInfo->image->info().numLayers };
|
||||||
dstTextureInfo->mappedSubresource.arrayLayer, 1 };
|
|
||||||
|
|
||||||
const VkImageSubresourceLayers srcLayers = {
|
const VkImageSubresourceLayers srcLayers = {
|
||||||
srcTextureInfo->mappedSubresource.aspectMask,
|
dstFormatInfo->aspectMask & srcFormatInfo->aspectMask,
|
||||||
srcTextureInfo->mappedSubresource.mipLevel,
|
i, 0, srcTextureInfo->image->info().numLayers };
|
||||||
srcTextureInfo->mappedSubresource.arrayLayer, 1 };
|
|
||||||
|
|
||||||
m_context->copyImage(
|
m_context->copyImage(
|
||||||
dstTextureInfo->image, dstLayers, VkOffset3D { 0, 0, 0 },
|
dstTextureInfo->image, dstLayers, VkOffset3D { 0, 0, 0 },
|
||||||
@ -510,6 +511,7 @@ namespace dxvk {
|
|||||||
extent);
|
extent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void STDMETHODCALLTYPE D3D11DeviceContext::CopyStructureCount(
|
void STDMETHODCALLTYPE D3D11DeviceContext::CopyStructureCount(
|
||||||
|
Loading…
Reference in New Issue
Block a user