mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-24 15:37:10 +02:00
Fix 3 graphics related issues (#180)
* Fix 3 graphics related bugs * OGLShader shouldn't be public (yet)
This commit is contained in:
parent
5182361f4b
commit
c26ddd6259
8 changed files with 40 additions and 14 deletions
|
@ -248,6 +248,15 @@ namespace Ryujinx.HLE.Gpu
|
|||
|
||||
int TextureHandle = Vmm.ReadInt32(Position);
|
||||
|
||||
if (TextureHandle == 0)
|
||||
{
|
||||
//TODO: Is this correct?
|
||||
//Some games like puyo puyo will have 0 handles.
|
||||
//It may be just normal behaviour or a bug caused by sync issues.
|
||||
//The game does initialize the value properly after through.
|
||||
return;
|
||||
}
|
||||
|
||||
int TicIndex = (TextureHandle >> 0) & 0xfffff;
|
||||
int TscIndex = (TextureHandle >> 20) & 0xfff;
|
||||
|
||||
|
@ -314,7 +323,7 @@ namespace Ryujinx.HLE.Gpu
|
|||
continue;
|
||||
}
|
||||
|
||||
for (int Cbuf = 0; Cbuf < ConstBuffers.Length; Cbuf++)
|
||||
for (int Cbuf = 0; Cbuf < ConstBuffers[Index].Length; Cbuf++)
|
||||
{
|
||||
ConstBuffer Cb = ConstBuffers[Index][Cbuf];
|
||||
|
||||
|
|
|
@ -41,6 +41,17 @@ namespace Ryujinx.HLE.Gpu
|
|||
|
||||
TextureSwizzle Swizzle = (TextureSwizzle)((Tic[2] >> 21) & 7);
|
||||
|
||||
if (Swizzle == TextureSwizzle.BlockLinear ||
|
||||
Swizzle == TextureSwizzle.BlockLinearColorKey)
|
||||
{
|
||||
TextureAddress &= ~0x1ffL;
|
||||
}
|
||||
else if (Swizzle == TextureSwizzle.Pitch ||
|
||||
Swizzle == TextureSwizzle.PitchColorKey)
|
||||
{
|
||||
TextureAddress &= ~0x1fL;
|
||||
}
|
||||
|
||||
int Pitch = (Tic[3] & 0xffff) << 5;
|
||||
|
||||
int BlockHeightLog2 = (Tic[3] >> 3) & 7;
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace Ryujinx.HLE.Gpu
|
|||
{
|
||||
switch (Texture.Swizzle)
|
||||
{
|
||||
case TextureSwizzle._1dBuffer:
|
||||
case TextureSwizzle.Pitch:
|
||||
case TextureSwizzle.PitchColorKey:
|
||||
return new LinearSwizzle(Texture.Pitch, Bpp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue