mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-28 09:27:10 +02:00
Implement shader LEA instruction and improve bindless image load/store (#1355)
This commit is contained in:
parent
4c3a1106ec
commit
99a6e8a61c
7 changed files with 82 additions and 43 deletions
|
@ -68,5 +68,26 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
// The depth register is always two registers after the last color output.
|
||||
return count + 1;
|
||||
}
|
||||
|
||||
public TextureFormat GetTextureFormat(int handle)
|
||||
{
|
||||
// When the formatted load extension is supported, we don't need to
|
||||
// specify a format, we can just declare it without a format and the GPU will handle it.
|
||||
if (GpuAccessor.QuerySupportsImageLoadFormatted())
|
||||
{
|
||||
return TextureFormat.Unknown;
|
||||
}
|
||||
|
||||
var format = GpuAccessor.QueryTextureFormat(handle);
|
||||
|
||||
if (format == TextureFormat.Unknown)
|
||||
{
|
||||
GpuAccessor.Log($"Unknown format for texture {handle}.");
|
||||
|
||||
format = TextureFormat.R8G8B8A8Unorm;
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue