Support safe blit on non-2D textures (#4374)
* Support safe blit on non-2D textures (except multisample) * Change safe blit with different levels and layers to match CmdBlitImage path * Remove now unused variables * Multisample safe blit support
This commit is contained in:
parent
cb250162cb
commit
f8beeeb7d3
7 changed files with 436 additions and 74 deletions
|
@ -368,20 +368,16 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
bool isDepthOrStencil = dst.Info.Format.IsDepthOrStencil();
|
||||
|
||||
if (VulkanConfiguration.UseSlowSafeBlitOnAmd &&
|
||||
(_gd.Vendor == Vendor.Amd || _gd.IsMoltenVk) &&
|
||||
src.Info.Target == Target.Texture2D &&
|
||||
dst.Info.Target == Target.Texture2D)
|
||||
if (VulkanConfiguration.UseSlowSafeBlitOnAmd && (_gd.Vendor == Vendor.Amd || _gd.IsMoltenVk))
|
||||
{
|
||||
_gd.HelperShader.Blit(
|
||||
_gd,
|
||||
src,
|
||||
dst.GetIdentityImageView(),
|
||||
dst.Width,
|
||||
dst.Height,
|
||||
dst.VkFormat,
|
||||
dst,
|
||||
srcRegion,
|
||||
dstRegion,
|
||||
layers,
|
||||
levels,
|
||||
isDepthOrStencil,
|
||||
linearFilter);
|
||||
|
||||
|
@ -501,7 +497,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return CreateViewImpl(info, firstLayer, firstLevel);
|
||||
}
|
||||
|
||||
private TextureView CreateViewImpl(TextureCreateInfo info, int firstLayer, int firstLevel)
|
||||
public TextureView CreateViewImpl(TextureCreateInfo info, int firstLayer, int firstLevel)
|
||||
{
|
||||
return new TextureView(_gd, _device, info, Storage, FirstLayer + firstLayer, FirstLevel + firstLevel);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue