Skip to content

Commit

Permalink
Transform shader LDC into constant buffer access if offset is constant (
Browse files Browse the repository at this point in the history
#3672)

* Transform shader LDC into constant buffer access if offset is constant

* Shader cache version bump
  • Loading branch information
gdkchan committed Sep 7, 2022
1 parent df99257 commit 408bd63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DiskCacheHostStorage
private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 2;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
private const uint CodeGenVersion = 3525;
private const uint CodeGenVersion = 3672;

private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ public static void RunPass(Operation operation)
EvaluateFPUnary(operation, (x) => float.IsNaN(x));
break;

case Instruction.LoadConstant:
operation.TurnIntoCopy(Cbuf(operation.GetSource(0).Value, operation.GetSource(1).Value));
break;

case Instruction.Maximum:
EvaluateBinary(operation, (x, y) => Math.Max(x, y));
break;
Expand Down

0 comments on commit 408bd63

Please sign in to comment.