mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-24 07:06:01 +00:00
Bind TextureBuffers
This commit is contained in:
parent
62602e58b7
commit
3214a4cf8e
2 changed files with 65 additions and 83 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue