Skip to content

Commit

Permalink
Add BGR5A1 Image Format (#495)
Browse files Browse the repository at this point in the history
* Add `BGR5A1` to ImageUtils.cs

Add `BGR5A1` Image Format.

* Add BGR5A1 to OGLEnumConverter.cs
  • Loading branch information
AcK77 authored and gdkchan committed Nov 11, 2018
1 parent fdd5767 commit 437962a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
Expand Up @@ -151,6 +151,7 @@ public static (PixelInternalFormat, PixelFormat, PixelType) GetImageFormat(GalIm
case GalImageFormat.R32 | GalImageFormat.Float: return (PixelInternalFormat.R32f, PixelFormat.Red, PixelType.Float);
case GalImageFormat.R32 | GalImageFormat.Sint: return (PixelInternalFormat.R32i, PixelFormat.Red, PixelType.Int);
case GalImageFormat.R32 | GalImageFormat.Uint: return (PixelInternalFormat.R32ui, PixelFormat.Red, PixelType.UnsignedInt);
case GalImageFormat.BGR5A1 | GalImageFormat.Unorm: return (PixelInternalFormat.Rgb5A1, PixelFormat.Rgba, PixelType.UnsignedShort5551);
case GalImageFormat.RGB5A1 | GalImageFormat.Unorm: return (PixelInternalFormat.Rgb5A1, PixelFormat.Rgba, PixelType.UnsignedShort1555Reversed);
case GalImageFormat.RGB565 | GalImageFormat.Unorm: return (PixelInternalFormat.Rgba, PixelFormat.Rgb, PixelType.UnsignedShort565Reversed);
case GalImageFormat.RG16 | GalImageFormat.Float: return (PixelInternalFormat.Rg16f, PixelFormat.Rg, PixelType.HalfFloat);
Expand Down
1 change: 1 addition & 0 deletions Ryujinx.Graphics/Texture/ImageUtils.cs
Expand Up @@ -102,6 +102,7 @@ public ImageDescriptor(int BytesPerPixel, int BlockWidth, int BlockHeight, Targe
{ GalImageFormat.RGBA4, new ImageDescriptor(2, 1, 1, TargetBuffer.Color) },
{ GalImageFormat.BptcSfloat, new ImageDescriptor(16, 4, 4, TargetBuffer.Color) },
{ GalImageFormat.BptcUfloat, new ImageDescriptor(16, 4, 4, TargetBuffer.Color) },
{ GalImageFormat.BGR5A1, new ImageDescriptor(2, 1, 1, TargetBuffer.Color) },
{ GalImageFormat.RGB5A1, new ImageDescriptor(2, 1, 1, TargetBuffer.Color) },
{ GalImageFormat.RGB565, new ImageDescriptor(2, 1, 1, TargetBuffer.Color) },
{ GalImageFormat.BptcUnorm, new ImageDescriptor(16, 4, 4, TargetBuffer.Color) },
Expand Down

0 comments on commit 437962a

Please sign in to comment.