aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics
diff options
context:
space:
mode:
authorLordmau5 <mail@lordmau5.com>2018-06-13 01:28:49 +0200
committerLordmau5 <mail@lordmau5.com>2018-06-13 01:28:49 +0200
commite6f6c6ad57c58081636164232d112c9642d5f98c (patch)
treef1a21d7856d55168aba96efdb27ced6247f1dfb2 /Ryujinx.Graphics
parentc636c74dd2a54a9c0ece6cd31b03512f8c41fc43 (diff)
parent98e6a34608cc31f1f40e964a4a8cc80606877eca (diff)
Merge branch 'master' into ICommonStateGetter
Diffstat (limited to 'Ryujinx.Graphics')
-rw-r--r--Ryujinx.Graphics/Gal/GalTextureFormat.cs1
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs1
-rw-r--r--Ryujinx.Graphics/Gal/Shader/GlslDecl.cs3
-rw-r--r--Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs3
-rw-r--r--Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs2
5 files changed, 7 insertions, 3 deletions
diff --git a/Ryujinx.Graphics/Gal/GalTextureFormat.cs b/Ryujinx.Graphics/Gal/GalTextureFormat.cs
index 3bac2f80..7d19dc26 100644
--- a/Ryujinx.Graphics/Gal/GalTextureFormat.cs
+++ b/Ryujinx.Graphics/Gal/GalTextureFormat.cs
@@ -10,6 +10,7 @@ namespace Ryujinx.Graphics.Gal
B5G6R5 = 0x15,
BC7U = 0x17,
G8R8 = 0x18,
+ R16 = 0x1b,
R8 = 0x1d,
BC1 = 0x24,
BC2 = 0x25,
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
index 50b802c1..c8000603 100644
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
+++ b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
@@ -66,6 +66,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
case GalTextureFormat.A1B5G5R5: return (PixelFormat.Rgba, PixelType.UnsignedShort5551);
case GalTextureFormat.B5G6R5: return (PixelFormat.Rgb, PixelType.UnsignedShort565);
case GalTextureFormat.G8R8: return (PixelFormat.Rg, PixelType.UnsignedByte);
+ case GalTextureFormat.R16: return (PixelFormat.Red, PixelType.HalfFloat);
case GalTextureFormat.R8: return (PixelFormat.Red, PixelType.UnsignedByte);
}
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
index 43a04813..4002c29a 100644
--- a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
+++ b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
@@ -159,7 +159,8 @@ namespace Ryujinx.Graphics.Gal.Shader
case ShaderIrOperAbuf Abuf:
{
//This is a built-in input variable.
- if (Abuf.Offs == VertexIdAttr)
+ if (Abuf.Offs == VertexIdAttr ||
+ Abuf.Offs == InstanceIdAttr)
{
break;
}
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
index 71a53a5a..1bcedacb 100644
--- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
+++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
@@ -975,7 +975,8 @@ namespace Ryujinx.Graphics.Gal.Shader
switch (Node)
{
case ShaderIrOperAbuf Abuf:
- return Abuf.Offs == GlslDecl.VertexIdAttr
+ return Abuf.Offs == GlslDecl.VertexIdAttr ||
+ Abuf.Offs == GlslDecl.InstanceIdAttr
? OperType.I32
: OperType.F32;
diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs
index 3299ebab..a8ad5ec2 100644
--- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs
+++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeHelper.cs
@@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.Gal.Shader
for (int Index = 0; Index <= Size; Index++)
{
- Opers[Index] = new ShaderIrOperAbuf(Abuf, Reg);
+ Opers[Index] = new ShaderIrOperAbuf(Abuf + Index * 4, Reg);
}
return Opers;