Scale texture resolution before sending to backend (#1646)

* Work

* Propagate scale factor to copy temp. Not really needed, just here for consistency

* PR feedback
This commit is contained in:
gdkchan 2020-10-29 18:57:34 -03:00 committed by GitHub
parent 780c7530d6
commit 423da5cc91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 47 additions and 52 deletions

View file

@ -1,6 +1,5 @@
using OpenTK.Graphics.OpenGL;
using Ryujinx.Graphics.GAL;
using System;
namespace Ryujinx.Graphics.OpenGL.Image
{
@ -10,8 +9,8 @@ namespace Ryujinx.Graphics.OpenGL.Image
public TextureCreateInfo Info { get; }
public int Width { get; }
public int Height { get; }
public int Width => Info.Width;
public int Height => Info.Height;
public float ScaleFactor { get; }
public Target Target => Info.Target;
@ -20,8 +19,6 @@ namespace Ryujinx.Graphics.OpenGL.Image
public TextureBase(TextureCreateInfo info, float scaleFactor = 1f)
{
Info = info;
Width = (int)Math.Ceiling(Info.Width * scaleFactor);
Height = (int)Math.Ceiling(Info.Height * scaleFactor);
ScaleFactor = scaleFactor;
Handle = GL.GenTexture();