mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-13 06:36:39 +00:00
Remove indexed path.
We determined that it had negligible impact.
This commit is contained in:
parent
0663d29795
commit
25ec4eddfa
1 changed files with 4 additions and 12 deletions
|
@ -116,20 +116,12 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||||
|
|
||||||
private static string GetVec4Indexed(string vectorName, string indexExpr)
|
private static string GetVec4Indexed(string vectorName, string indexExpr)
|
||||||
{
|
{
|
||||||
bool canIndexVec4 = false;
|
string result = $"{vectorName}.x";
|
||||||
if (canIndexVec4)
|
for (int i = 1; i < 4; i++)
|
||||||
{
|
{
|
||||||
return $"{vectorName}[{indexExpr}]";
|
result = $"(({indexExpr}) == {i}) ? ({vectorName}.{GetSwizzleMask(i)}) : ({result})";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string result = $"{vectorName}.x";
|
|
||||||
for (int i = 1; i < 4; i++)
|
|
||||||
{
|
|
||||||
result = $"(({indexExpr}) == {i}) ? ({vectorName}.{GetSwizzleMask(i)}) : ({result})";
|
|
||||||
}
|
|
||||||
return $"({result})";
|
|
||||||
}
|
}
|
||||||
|
return $"({result})";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetConstantBufferName(IAstNode slot, string offsetExpr, ShaderStage stage)
|
public static string GetConstantBufferName(IAstNode slot, string offsetExpr, ShaderStage stage)
|
||||||
|
|
Loading…
Reference in a new issue