mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-28 09:34:04 +00:00
Fix dimensions check for scale eligibility (#2301)
This commit is contained in:
parent
12533e5c9d
commit
5271cfe70b
2 changed files with 2 additions and 5 deletions
|
@ -36,7 +36,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the codegen (to be changed when codegen or guest format change).
|
/// Version of the codegen (to be changed when codegen or guest format change).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const ulong ShaderCodeGenVersion = 2300;
|
private const ulong ShaderCodeGenVersion = 2301;
|
||||||
|
|
||||||
// Progress reporting helpers
|
// Progress reporting helpers
|
||||||
private volatile int _shaderCount;
|
private volatile int _shaderCount;
|
||||||
|
|
|
@ -257,7 +257,6 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||||
bool accurateType)
|
bool accurateType)
|
||||||
{
|
{
|
||||||
var dimensions = type.GetDimensions();
|
var dimensions = type.GetDimensions();
|
||||||
var isArray = type.HasFlag(SamplerType.Array);
|
|
||||||
var isIndexed = type.HasFlag(SamplerType.Indexed);
|
var isIndexed = type.HasFlag(SamplerType.Indexed);
|
||||||
|
|
||||||
var usageFlags = TextureUsageFlags.None;
|
var usageFlags = TextureUsageFlags.None;
|
||||||
|
@ -266,9 +265,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||||
{
|
{
|
||||||
usageFlags |= TextureUsageFlags.NeedsScaleValue;
|
usageFlags |= TextureUsageFlags.NeedsScaleValue;
|
||||||
|
|
||||||
var canScale = (Stage == ShaderStage.Fragment || Stage == ShaderStage.Compute) && !isIndexed && !write &&
|
var canScale = (Stage == ShaderStage.Fragment || Stage == ShaderStage.Compute) && !isIndexed && !write && dimensions == 2;
|
||||||
((dimensions == 2 && !isArray) ||
|
|
||||||
(dimensions == 3 && isArray));
|
|
||||||
|
|
||||||
if (!canScale)
|
if (!canScale)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue