Implement SULD shader instruction (#1117)
* Implement SULD shader instruction * Some nits
This commit is contained in:
parent
4738113f29
commit
03711dd7b5
15 changed files with 620 additions and 109 deletions
|
@ -4,8 +4,9 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
{
|
||||
class AstTextureOperation : AstOperation
|
||||
{
|
||||
public SamplerType Type { get; }
|
||||
public TextureFlags Flags { get; }
|
||||
public SamplerType Type { get; }
|
||||
public TextureFormat Format { get; }
|
||||
public TextureFlags Flags { get; }
|
||||
|
||||
public int Handle { get; }
|
||||
public int ArraySize { get; }
|
||||
|
@ -13,6 +14,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
public AstTextureOperation(
|
||||
Instruction inst,
|
||||
SamplerType type,
|
||||
TextureFormat format,
|
||||
TextureFlags flags,
|
||||
int handle,
|
||||
int arraySize,
|
||||
|
@ -20,6 +22,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
params IAstNode[] sources) : base(inst, index, sources)
|
||||
{
|
||||
Type = type;
|
||||
Format = format;
|
||||
Flags = flags;
|
||||
Handle = handle;
|
||||
ArraySize = arraySize;
|
||||
|
|
|
@ -57,6 +57,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
return new AstTextureOperation(
|
||||
inst,
|
||||
texOp.Type,
|
||||
texOp.Format,
|
||||
texOp.Flags,
|
||||
texOp.Handle,
|
||||
4, // TODO: Non-hardcoded array size.
|
||||
|
@ -118,6 +119,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
|
||||
if (operation is TextureOperation texOp)
|
||||
{
|
||||
if (texOp.Inst == Instruction.ImageLoad || texOp.Inst == Instruction.ImageStore)
|
||||
{
|
||||
dest.VarType = texOp.Format.GetComponentType();
|
||||
}
|
||||
|
||||
AstTextureOperation astTexOp = GetAstTextureOperation(texOp);
|
||||
|
||||
if (texOp.Inst == Instruction.ImageLoad)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue