Remove some unused constants and other code

This commit is contained in:
gdk 2019-11-03 22:28:44 -03:00 committed by Thog
parent 3ab5c23f49
commit a31fced221
2 changed files with 0 additions and 23 deletions

View file

@ -7,16 +7,6 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
{ {
static class BindlessToIndexed static class BindlessToIndexed
{ {
private const int StorageDescsBaseOffset = 0x44; // In words.
private const int UbeStorageDescsBaseOffset = 0x84; // In words.
private const int UbeStorageMaxCount = 14;
private const int StorageDescSize = 4; // In words.
private const int StorageMaxCount = 16;
private const int StorageDescsSize = StorageDescSize * StorageMaxCount;
public static void RunPass(BasicBlock block) public static void RunPass(BasicBlock block)
{ {
// We can turn a bindless texture access into a indexed access, // We can turn a bindless texture access into a indexed access,

View file

@ -9,9 +9,6 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
{ {
private const int StorageDescsBaseOffset = 0x44; // In words. private const int StorageDescsBaseOffset = 0x44; // In words.
private const int UbeStorageDescsBaseOffset = 0x84; // In words.
private const int UbeStorageMaxCount = 14;
private const int StorageDescSize = 4; // In words. private const int StorageDescSize = 4; // In words.
private const int StorageMaxCount = 16; private const int StorageMaxCount = 16;
@ -23,11 +20,6 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
int sbEnd = sbStart + StorageDescsSize; int sbEnd = sbStart + StorageDescsSize;
// This one is only used on compute shaders.
// Compute shaders uses two separate sets of storage.
int ubeSbStart = UbeStorageDescsBaseOffset;
int ubeSbEnd = UbeStorageDescsBaseOffset + StorageDescSize * UbeStorageMaxCount;
for (LinkedListNode<INode> node = block.Operations.First; node != null; node = node.Next) for (LinkedListNode<INode> node = block.Operations.First; node != null; node = node.Next)
{ {
if (!(node.Value is Operation operation)) if (!(node.Value is Operation operation))
@ -44,11 +36,6 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
{ {
int storageIndex = SearchForStorageBase(asgOperation, sbStart, sbEnd); int storageIndex = SearchForStorageBase(asgOperation, sbStart, sbEnd);
/*if (storageIndex < 0 && stage == ShaderStage.Compute)
{
storageIndex = SearchForStorageBase(asgOperation, ubeSbStart, ubeSbEnd);
}*/
if (storageIndex >= 0) if (storageIndex >= 0)
{ {
node = ReplaceGlobalWithStorage(node, storageIndex); node = ReplaceGlobalWithStorage(node, storageIndex);