1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-02 15:42:03 +00:00

Fix dimensions check for scale eligibility (#2301)

This commit is contained in:
riperiperi 2021-05-21 00:09:18 +01:00 committed by GitHub
parent 12533e5c9d
commit 5271cfe70b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View file

@ -36,7 +36,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
/// <summary>
/// Version of the codegen (to be changed when codegen or guest format change).
/// </summary>
private const ulong ShaderCodeGenVersion = 2300;
private const ulong ShaderCodeGenVersion = 2301;
// Progress reporting helpers
private volatile int _shaderCount;

View file

@ -257,7 +257,6 @@ namespace Ryujinx.Graphics.Shader.Translation
bool accurateType)
{
var dimensions = type.GetDimensions();
var isArray = type.HasFlag(SamplerType.Array);
var isIndexed = type.HasFlag(SamplerType.Indexed);
var usageFlags = TextureUsageFlags.None;
@ -266,9 +265,7 @@ namespace Ryujinx.Graphics.Shader.Translation
{
usageFlags |= TextureUsageFlags.NeedsScaleValue;
var canScale = (Stage == ShaderStage.Fragment || Stage == ShaderStage.Compute) && !isIndexed && !write &&
((dimensions == 2 && !isArray) ||
(dimensions == 3 && isArray));
var canScale = (Stage == ShaderStage.Fragment || Stage == ShaderStage.Compute) && !isIndexed && !write && dimensions == 2;
if (!canScale)
{