mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-29 05:21:04 +00:00
Handle array textures with different types on the same buffer
This commit is contained in:
parent
d63964f6b8
commit
bec99d00b1
|
@ -29,7 +29,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
|
||||
private readonly HashSet<int> _usedConstantBufferBindings;
|
||||
|
||||
private readonly record struct TextureInfo(int CbufSlot, int Handle, int ArrayLength, TextureFormat Format);
|
||||
private readonly record struct TextureInfo(int CbufSlot, int Handle, int ArrayLength, SamplerType Type, TextureFormat Format);
|
||||
|
||||
private struct TextureMeta
|
||||
{
|
||||
|
@ -287,7 +287,10 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
usageFlags |= TextureUsageFlags.ImageCoherent;
|
||||
}
|
||||
|
||||
var info = new TextureInfo(cbufSlot, handle, arrayLength, format);
|
||||
// For array textures, we also want to use type as key,
|
||||
// since we may have texture handles stores in the same buffer, but for textures with different types.
|
||||
var keyType = arrayLength > 1 ? type : SamplerType.None;
|
||||
var info = new TextureInfo(cbufSlot, handle, arrayLength, keyType, format);
|
||||
var meta = new TextureMeta()
|
||||
{
|
||||
AccurateType = accurateType,
|
||||
|
|
Loading…
Reference in a new issue