mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-10 13:43:17 +02:00
Fix dimensions check for scale eligibility (#2301)
This commit is contained in:
parent
12533e5c9d
commit
5271cfe70b
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user