1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 22:24:15 +01:00

[d3d11] Get rid of duplicate code in ResolveSubresource

This commit is contained in:
Philip Rebohle 2018-01-30 02:20:28 +01:00
parent 6c6b108cdd
commit 08436ad1e1
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -713,17 +713,17 @@ namespace dxvk {
GetSubresourceFromIndex(srcFormatInfo.aspect,
srcTextureInfo->image->info().mipLevels, SrcSubresource);
const VkImageSubresourceLayers dstSubresourceLayers = {
dstSubresource.aspectMask,
dstSubresource.mipLevel,
dstSubresource.arrayLayer, 1 };
const VkImageSubresourceLayers srcSubresourceLayers = {
srcSubresource.aspectMask,
srcSubresource.mipLevel,
srcSubresource.arrayLayer, 1 };
if (srcDesc.SampleDesc.Count == 1) {
const VkImageSubresourceLayers dstSubresourceLayers = {
dstSubresource.aspectMask,
dstSubresource.mipLevel,
dstSubresource.arrayLayer, 1 };
const VkImageSubresourceLayers srcSubresourceLayers = {
srcSubresource.aspectMask,
srcSubresource.mipLevel,
srcSubresource.arrayLayer, 1 };
EmitCs([
cDstImage = dstTextureInfo->image,
cSrcImage = srcTextureInfo->image,
@ -736,22 +736,12 @@ namespace dxvk {
cDstImage->mipLevelExtent(cDstLayers.mipLevel));
});
} else if (!srcFormatInfo.flags.test(DxgiFormatFlag::Typeless)
&& !srcFormatInfo.flags.test(DxgiFormatFlag::Typeless)) {
&& !srcFormatInfo.flags.test(DxgiFormatFlag::Typeless)) {
if (dstDesc.Format != srcDesc.Format) {
Logger::err("D3D11: ResolveSubresource: Incompatible formats");
return;
}
const VkImageSubresourceLayers dstSubresourceLayers = {
dstSubresource.aspectMask,
dstSubresource.mipLevel,
dstSubresource.arrayLayer, 1 };
const VkImageSubresourceLayers srcSubresourceLayers = {
srcSubresource.aspectMask,
srcSubresource.mipLevel,
srcSubresource.arrayLayer, 1 };
EmitCs([
cDstImage = dstTextureInfo->image,
cSrcImage = srcTextureInfo->image,