Fix a small size related issue on MapBufferEx and add the BC7U texture format
This commit is contained in:
parent
adeb8793c2
commit
49fd76db0f
6 changed files with 11 additions and 8 deletions
|
@ -44,6 +44,7 @@ namespace Ryujinx.Core.Gpu
|
||||||
return W * H * 8;
|
return W * H * 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case GalTextureFormat.BC7U:
|
||||||
case GalTextureFormat.BC2:
|
case GalTextureFormat.BC2:
|
||||||
case GalTextureFormat.BC3:
|
case GalTextureFormat.BC3:
|
||||||
case GalTextureFormat.BC5:
|
case GalTextureFormat.BC5:
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace Ryujinx.Core.Gpu
|
||||||
case GalTextureFormat.B5G6R5: return Read565 (Memory, Texture);
|
case GalTextureFormat.B5G6R5: return Read565 (Memory, Texture);
|
||||||
case GalTextureFormat.G8R8: return Read2Bpp (Memory, Texture);
|
case GalTextureFormat.G8R8: return Read2Bpp (Memory, Texture);
|
||||||
case GalTextureFormat.R8: return Read1Bpp (Memory, Texture);
|
case GalTextureFormat.R8: return Read1Bpp (Memory, Texture);
|
||||||
|
case GalTextureFormat.BC7U: return Read16Bpt4x4(Memory, Texture);
|
||||||
case GalTextureFormat.BC1: return Read8Bpt4x4 (Memory, Texture);
|
case GalTextureFormat.BC1: return Read8Bpt4x4 (Memory, Texture);
|
||||||
case GalTextureFormat.BC2: return Read16Bpt4x4(Memory, Texture);
|
case GalTextureFormat.BC2: return Read16Bpt4x4(Memory, Texture);
|
||||||
case GalTextureFormat.BC3: return Read16Bpt4x4(Memory, Texture);
|
case GalTextureFormat.BC3: return Read16Bpt4x4(Memory, Texture);
|
||||||
|
|
|
@ -140,11 +140,9 @@ namespace Ryujinx.Core.OsHle.Services.Nv.NvGpuAS
|
||||||
|
|
||||||
if (Size == 0)
|
if (Size == 0)
|
||||||
{
|
{
|
||||||
Size = Map.Size;
|
Size = (uint)Map.Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
Size = Map.Size;
|
|
||||||
|
|
||||||
int Result = NvResult.Success;
|
int Result = NvResult.Success;
|
||||||
|
|
||||||
//Note: When the fixed offset flag is not set,
|
//Note: When the fixed offset flag is not set,
|
||||||
|
|
|
@ -8,6 +8,7 @@ namespace Ryujinx.Graphics.Gal
|
||||||
R32 = 0xf,
|
R32 = 0xf,
|
||||||
A1B5G5R5 = 0x14,
|
A1B5G5R5 = 0x14,
|
||||||
B5G6R5 = 0x15,
|
B5G6R5 = 0x15,
|
||||||
|
BC7U = 0x17,
|
||||||
G8R8 = 0x18,
|
G8R8 = 0x18,
|
||||||
R8 = 0x1d,
|
R8 = 0x1d,
|
||||||
BC1 = 0x24,
|
BC1 = 0x24,
|
||||||
|
|
|
@ -76,11 +76,12 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
{
|
{
|
||||||
switch (Format)
|
switch (Format)
|
||||||
{
|
{
|
||||||
case GalTextureFormat.BC1: return PixelInternalFormat.CompressedRgbaS3tcDxt1Ext;
|
case GalTextureFormat.BC7U: return PixelInternalFormat.CompressedRgbaBptcUnorm;
|
||||||
case GalTextureFormat.BC2: return PixelInternalFormat.CompressedRgbaS3tcDxt3Ext;
|
case GalTextureFormat.BC1: return PixelInternalFormat.CompressedRgbaS3tcDxt1Ext;
|
||||||
case GalTextureFormat.BC3: return PixelInternalFormat.CompressedRgbaS3tcDxt5Ext;
|
case GalTextureFormat.BC2: return PixelInternalFormat.CompressedRgbaS3tcDxt3Ext;
|
||||||
case GalTextureFormat.BC4: return PixelInternalFormat.CompressedRedRgtc1;
|
case GalTextureFormat.BC3: return PixelInternalFormat.CompressedRgbaS3tcDxt5Ext;
|
||||||
case GalTextureFormat.BC5: return PixelInternalFormat.CompressedRgRgtc2;
|
case GalTextureFormat.BC4: return PixelInternalFormat.CompressedRedRgtc1;
|
||||||
|
case GalTextureFormat.BC5: return PixelInternalFormat.CompressedRgRgtc2;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new NotImplementedException(Format.ToString());
|
throw new NotImplementedException(Format.ToString());
|
||||||
|
|
|
@ -202,6 +202,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
{
|
{
|
||||||
switch (Format)
|
switch (Format)
|
||||||
{
|
{
|
||||||
|
case GalTextureFormat.BC7U:
|
||||||
case GalTextureFormat.BC1:
|
case GalTextureFormat.BC1:
|
||||||
case GalTextureFormat.BC2:
|
case GalTextureFormat.BC2:
|
||||||
case GalTextureFormat.BC3:
|
case GalTextureFormat.BC3:
|
||||||
|
|
Loading…
Reference in a new issue