mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 09:03:36 +00:00
Multisampling: Use resolve if src samples count > dst samples count
This commit is contained in:
parent
6810796638
commit
5efe0167ea
2 changed files with 13 additions and 3 deletions
|
@ -316,9 +316,18 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
var extent = new Extent3D((uint)copyWidth, (uint)copyHeight, (uint)srcDepth);
|
||||
|
||||
if (srcInfo.Samples > 1 && srcInfo.Samples != dstInfo.Samples)
|
||||
{
|
||||
var region = new ImageResolve(srcSl, new Offset3D(0, 0, srcZ), dstSl, new Offset3D(0, 0, dstZ), extent);
|
||||
|
||||
api.CmdResolveImage(commandBuffer, srcImage, ImageLayout.General, dstImage, ImageLayout.General, 1, region);
|
||||
}
|
||||
else
|
||||
{
|
||||
var region = new ImageCopy(srcSl, new Offset3D(0, 0, srcZ), dstSl, new Offset3D(0, 0, dstZ), extent);
|
||||
|
||||
api.CmdCopyImage(commandBuffer, srcImage, ImageLayout.General, dstImage, ImageLayout.General, 1, region);
|
||||
}
|
||||
|
||||
width = Math.Max(1, width >> 1);
|
||||
height = Math.Max(1, height >> 1);
|
||||
|
|
|
@ -266,7 +266,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
dstRegion.Y2 == dst.Height &&
|
||||
src.Width == dst.Width &&
|
||||
src.Height == dst.Height &&
|
||||
src.VkFormat == dst.VkFormat)
|
||||
src.VkFormat == dst.VkFormat &&
|
||||
src.Info.Samples == 1)
|
||||
{
|
||||
TextureCopy.Copy(
|
||||
_gd.Api,
|
||||
|
|
Loading…
Reference in a new issue