mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-30 14:27:09 +02:00
Size hints for copy regions and viewport dimensions to avoid data loss (#1686)
* Size hints for copy regions and viewport dimensions to avoid data loss * Reword comment. * Use info for the rule rather than calculating aligned size. * Reorder min/max, remove spaces
This commit is contained in:
parent
bb5b61e59c
commit
f9b1d5a724
5 changed files with 111 additions and 45 deletions
|
@ -50,6 +50,12 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
/// </summary>
|
||||
public bool IsModified { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set when a texture has been changed size. This indicates that it may need to be
|
||||
/// changed again when obtained as a sampler.
|
||||
/// </summary>
|
||||
public bool ChangedSize { get; internal set; }
|
||||
|
||||
private int _depth;
|
||||
private int _layers;
|
||||
private int _firstLayer;
|
||||
|
@ -353,6 +359,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
/// <param name="depthOrLayers">The new texture depth (for 3D textures) or layers (for layered textures)</param>
|
||||
private void RecreateStorageOrView(int width, int height, int depthOrLayers)
|
||||
{
|
||||
ChangedSize = true;
|
||||
|
||||
SetInfo(new TextureInfo(
|
||||
Info.Address,
|
||||
width,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue