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:
parent
6c6b108cdd
commit
08436ad1e1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user