Omit image format if possible, and fix BA bit (#1280)
* Omit image format if possible, and fix BA bit * Match extension name
This commit is contained in:
parent
b663cd22c8
commit
0b6d206daa
8 changed files with 27 additions and 2 deletions
|
@ -19,6 +19,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
context.AppendLine("#extension GL_ARB_gpu_shader_int64 : enable");
|
||||
context.AppendLine("#extension GL_ARB_shader_ballot : enable");
|
||||
context.AppendLine("#extension GL_ARB_shader_group_vote : enable");
|
||||
context.AppendLine("#extension GL_EXT_shader_image_load_formatted : enable");
|
||||
|
||||
if (context.Config.Stage == ShaderStage.Compute)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||
Size = (IntegerSize)opCode.Extract(20, 4);
|
||||
}
|
||||
|
||||
ByteAddress = !opCode.Extract(23);
|
||||
ByteAddress = opCode.Extract(23);
|
||||
|
||||
Dimensions = (ImageDimensions)opCode.Extract(33, 3);
|
||||
|
||||
|
|
|
@ -54,6 +54,11 @@
|
|||
return 16;
|
||||
}
|
||||
|
||||
public bool QuerySupportsImageLoadFormatted()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool QuerySupportsNonConstantTextureOffset()
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -1217,6 +1217,13 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||
|
||||
private static TextureFormat GetTextureFormat(EmitterContext context, 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 (context.Config.GpuAccessor.QuerySupportsImageLoadFormatted())
|
||||
{
|
||||
return TextureFormat.Unknown;
|
||||
}
|
||||
|
||||
var format = context.Config.GpuAccessor.QueryTextureFormat(handle);
|
||||
|
||||
if (format == TextureFormat.Unknown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue