Add some formats
This commit is contained in:
parent
c8417c3f2f
commit
2e589fe98c
4 changed files with 7 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
|||
BC5,
|
||||
Z24S8,
|
||||
ZF32,
|
||||
Z16,
|
||||
|
||||
ConvertedBegin,
|
||||
Astc2D4x4,
|
||||
|
|
|
@ -71,7 +71,9 @@ namespace Ryujinx.Graphics.Gal
|
|||
{
|
||||
switch (Format)
|
||||
{
|
||||
case GalZetaFormat.Z32Float: return GalImageFormat.ZF32;
|
||||
case GalZetaFormat.Z32Float: return GalImageFormat.ZF32;
|
||||
case GalZetaFormat.S8Z24Unorm: return GalImageFormat.Z24S8;
|
||||
case GalZetaFormat.Z16Unorm: return GalImageFormat.Z16;
|
||||
}
|
||||
|
||||
throw new NotImplementedException(Format.ToString());
|
||||
|
@ -127,6 +129,7 @@ namespace Ryujinx.Graphics.Gal
|
|||
{
|
||||
case GalImageFormat.Z24S8:
|
||||
case GalImageFormat.ZF32:
|
||||
case GalImageFormat.Z16:
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
|||
case GalImageFormat.R16: return (PixelInternalFormat.R16, PixelFormat.Red, PixelType.HalfFloat);
|
||||
case GalImageFormat.R8: return (PixelInternalFormat.R8, PixelFormat.Red, PixelType.UnsignedByte);
|
||||
case GalImageFormat.ZF32: return (PixelInternalFormat.DepthComponent32f, PixelFormat.DepthComponent, PixelType.Float);
|
||||
case GalImageFormat.Z16: return (PixelInternalFormat.DepthComponent16, PixelFormat.DepthComponent, PixelType.HalfFloat);
|
||||
case GalImageFormat.BF10GF11RF11: return (PixelInternalFormat.R11fG11fB10f, PixelFormat.Rgb, PixelType.UnsignedInt10F11F11FRev);
|
||||
case GalImageFormat.Z24S8: return (PixelInternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace Ryujinx.HLE.Gpu.Texture
|
|||
case GalImageFormat.B5G6R5:
|
||||
case GalImageFormat.G8R8:
|
||||
case GalImageFormat.R16:
|
||||
case GalImageFormat.Z16:
|
||||
return Image.Width * Image.Height * 2;
|
||||
|
||||
case GalImageFormat.R8:
|
||||
|
|
Loading…
Add table
Reference in a new issue