aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-02-08 04:48:09 -0300
committerGitHub <noreply@github.com>2023-02-08 08:48:09 +0100
commit96cf242bcf168b9f9e6a1e27200529466217f396 (patch)
tree01cb6f4aff69aa4019ff613af83e88e8cd124813 /Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs
parent59755818ef79f494d87c4e9d2b8372b54b38cb9d (diff)
Handle mismatching texture size with copy dependencies (#4364)1.1.605
* Handle mismatching texture size with copy dependencies * Create copy and render textures with the minimum possible size * Only align width for comparisons, assume that height is always exact * Fix IsExactMatch size check * Allow sampler and copy textures to match textures with larger width * Delete texture ChangeSize related code * Move AdjustSize to TextureInfo and give it a better name, adjust usages * Fix GetMinimumWidthInGob when minimumWidth > width * Only update render targets that are actually cleared for clear Avoids creating textures with incorrect sizes * Delete UpdateRenderTargetState method that is not needed anymore Clears now only ever sets the render targets that will be cleared rather than all of them
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs
new file mode 100644
index 00000000..cf2e818c
--- /dev/null
+++ b/Ryujinx.Graphics.Gpu/Engine/Threed/RenderTargetUpdateFlags.cs
@@ -0,0 +1,41 @@
+using System;
+
+namespace Ryujinx.Graphics.Gpu.Engine.Threed
+{
+ /// <summary>
+ /// Flags indicating how the render targets should be updated.
+ /// </summary>
+ [Flags]
+ enum RenderTargetUpdateFlags
+ {
+ /// <summary>
+ /// No flags.
+ /// </summary>
+ None = 0,
+
+ /// <summary>
+ /// Get render target index from the control register.
+ /// </summary>
+ UseControl = 1 << 0,
+
+ /// <summary>
+ /// Indicates that all render targets are 2D array textures.
+ /// </summary>
+ Layered = 1 << 1,
+
+ /// <summary>
+ /// Indicates that only a single color target will be used.
+ /// </summary>
+ SingleColor = 1 << 2,
+
+ /// <summary>
+ /// Indicates that the depth-stencil target will be used.
+ /// </summary>
+ UpdateDepthStencil = 1 << 3,
+
+ /// <summary>
+ /// Default update flags for draw.
+ /// </summary>
+ UpdateAll = UseControl | UpdateDepthStencil
+ }
+}