Move shader resource descriptor creation out of the backend (#2290)

* Move shader resource descriptor creation out of the backend

* Remove now unused code, and other nits

* Shader cache version bump

* Nits

* Set format for bindless image load/store

* Fix buffer write flag
This commit is contained in:
gdkchan 2021-05-19 18:15:26 -03:00 committed by GitHub
parent b5c72b44de
commit 49745cfa37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 565 additions and 516 deletions

View file

@ -95,7 +95,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
Operand rd = Register(rdIndex++, RegisterType.Gpr);
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.ImageLoad,
type,
flags,
@ -132,17 +132,15 @@ namespace Ryujinx.Graphics.Shader.Instructions
Operand rd = Register(rdIndex++, RegisterType.Gpr);
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.ImageLoad,
type,
GetTextureFormat(op.Size),
flags,
handle,
compIndex,
rd,
sources)
{
Format = GetTextureFormat(op.Size)
};
sources);
context.Add(operation);
@ -266,17 +264,15 @@ namespace Ryujinx.Graphics.Shader.Instructions
TextureFlags flags = op.IsBindless ? TextureFlags.Bindless : TextureFlags.None;
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.ImageStore,
type,
format,
flags,
handle,
0,
null,
sources)
{
Format = format
};
sources);
context.Add(operation);
}
@ -615,7 +611,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand dest = GetDest();
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.TextureSample,
type,
flags,
@ -764,7 +760,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand dest = GetDest();
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.TextureSample,
type,
flags,
@ -888,7 +884,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand tempDest = Local();
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.Lod,
type,
flags,
@ -1027,7 +1023,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand dest = GetDest();
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.TextureSample,
type,
flags,
@ -1112,7 +1108,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand dest = GetDest();
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
inst,
type,
flags,
@ -1277,7 +1273,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand dest = GetDest();
TextureOperation operation = new TextureOperation(
TextureOperation operation = context.CreateTextureOperation(
Instruction.TextureSample,
type,
flags,