Fix InvocationInfo on geometry shader and bindless default integer const (#2822)

* Fix InvocationInfo on geometry shader and bindless default integer const

* Shader cache version bump

* Consistency for the default value
This commit is contained in:
gdkchan 2021-11-08 11:39:30 -03:00 committed by GitHub
parent 81e9b86cdb
commit b7a1544e8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 8 deletions

View file

@ -18,12 +18,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
// TODO: Bindless texture support. For now we just return 0/do nothing.
if (isBindless)
{
return texOp.Inst switch
switch (texOp.Inst)
{
Instruction.ImageStore => "// imageStore(bindless)",
Instruction.ImageLoad => NumberFormatter.FormatFloat(0),
_ => NumberFormatter.FormatInt(0)
};
case Instruction.ImageStore:
return "// imageStore(bindless)";
case Instruction.ImageLoad:
NumberFormatter.TryFormat(0, texOp.Format.GetComponentType(), out string imageConst);
return imageConst;
default:
return NumberFormatter.FormatInt(0);
}
}
bool isArray = (texOp.Type & SamplerType.Array) != 0;