1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-24 07:06:01 +00:00

Bind TextureBuffers

This commit is contained in:
Isaac Marovitz 2024-07-27 11:32:45 +01:00 committed by Isaac Marovitz
parent 62602e58b7
commit 3214a4cf8e
2 changed files with 65 additions and 83 deletions

View file

@ -54,10 +54,10 @@ namespace Ryujinx.Graphics.Metal
record struct TextureRef
{
public ShaderStage Stage;
public Texture Storage;
public TextureBase Storage;
public Sampler Sampler;
public TextureRef(ShaderStage stage, Texture storage, Sampler sampler)
public TextureRef(ShaderStage stage, TextureBase storage, Sampler sampler)
{
Stage = stage;
Storage = storage;

View file

@ -805,13 +805,9 @@ namespace Ryujinx.Graphics.Metal
public readonly void UpdateTextureAndSampler(ShaderStage stage, ulong binding, TextureBase texture, Sampler sampler)
{
if (texture is TextureBuffer)
if (texture != null)
{
// TODO: Texture buffers
}
else if (texture is Texture view)
{
_currentState.TextureRefs[binding] = new(stage, view, sampler);
_currentState.TextureRefs[binding] = new(stage, texture, sampler);
}
else
{
@ -1123,8 +1119,6 @@ namespace Ryujinx.Graphics.Metal
break;
case MetalRenderer.TextureSetIndex:
if (!segment.IsArray)
{
if (segment.Type != ResourceType.BufferTexture)
{
for (int i = 0; i < count; i++)
{
@ -1175,11 +1169,6 @@ namespace Ryujinx.Graphics.Metal
}
}
else
{
// TODO: Buffer textures
}
}
else
{
// TODO: Texture arrays
}
@ -1342,8 +1331,6 @@ namespace Ryujinx.Graphics.Metal
break;
case MetalRenderer.TextureSetIndex:
if (!segment.IsArray)
{
if (segment.Type != ResourceType.BufferTexture)
{
for (int i = 0; i < count; i++)
{
@ -1375,11 +1362,6 @@ namespace Ryujinx.Graphics.Metal
}
}
else
{
// TODO: Buffer textures
}
}
else
{
// TODO: Texture arrays
}