mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 01:24:12 +01:00
[d3d11] support textures in CopyResource
fixes green textures and log spam with TrackMania
This commit is contained in:
parent
fc43b83623
commit
482147d929
@ -488,7 +488,26 @@ namespace dxvk {
|
||||
srcBuffer.offset(),
|
||||
srcBuffer.length());
|
||||
} else {
|
||||
Logger::err("D3D11DeviceContext::CopyResource: Images not supported");
|
||||
const D3D11TextureInfo* dstTextureInfo = GetCommonTextureInfo(pDstResource);
|
||||
const D3D11TextureInfo* srcTextureInfo = GetCommonTextureInfo(pSrcResource);
|
||||
|
||||
VkExtent3D extent = srcTextureInfo->image->mipLevelExtent(
|
||||
dstTextureInfo->mappedSubresource.mipLevel);
|
||||
|
||||
const VkImageSubresourceLayers dstLayers = {
|
||||
dstTextureInfo->mappedSubresource.aspectMask,
|
||||
dstTextureInfo->mappedSubresource.mipLevel,
|
||||
dstTextureInfo->mappedSubresource.arrayLayer, 1 };
|
||||
|
||||
const VkImageSubresourceLayers srcLayers = {
|
||||
srcTextureInfo->mappedSubresource.aspectMask,
|
||||
srcTextureInfo->mappedSubresource.mipLevel,
|
||||
srcTextureInfo->mappedSubresource.arrayLayer, 1 };
|
||||
|
||||
m_context->copyImage(
|
||||
dstTextureInfo->image, dstLayers, VkOffset3D { 0, 0, 0 },
|
||||
srcTextureInfo->image, srcLayers, VkOffset3D { 0, 0, 0 },
|
||||
extent);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user