Ryujinx-git/src/Ryujinx.Graphics.Texture
riperiperi 68848000f7
Texture: Fix 3D texture size when totalBlocksOfGobsInZ > 1 (#5228)
* Texture: Fix 3D texture size when totalBlocksOfGobsInZ > 0

When there is a remainder when dividing depth by gobs in z, it is used to remove the unused part of the 3D texture's size. This was done to calculate correct sizes for single slice views of 3D textures.

However, this case can also apply to 3D textures with many slices, and more than one total block of gobs in z. In this case it's meant to trim off the end of the level size. Most textures won't encounter this as their size will be aligned, but UE4 games tend to use 3D textures with funny unaligned sizes.

The size offset should have been applied to the level size instead of the slice size, and it should only affect the slice size if it ends up larger.

Hopefully should fix issues with UE4 games without breaking other stuff, I don't have much time to test.

* Whoops
2023-06-05 13:33:09 +02:00
..
Astc Fix incorrect ASTC endpoint color when using LuminanceDelta mode (#4890) 2023-05-11 20:47:55 +02:00
Encoders Move solution and projects to src 2023-04-27 23:51:14 +02:00
Utils Move solution and projects to src 2023-04-27 23:51:14 +02:00
BC6Decoder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BC7Decoder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BCnDecoder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BCnEncoder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BlockLinearConstants.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
BlockLinearLayout.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Bpp12Pixel.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ETC2Decoder.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
LayoutConverter.cs Texture: Fix layout conversion when gobs in z is used with depth = 1 (#5220) 2023-06-04 20:25:57 +00:00
OffsetCalculator.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
PixelConverter.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Region.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
Ryujinx.Graphics.Texture.csproj Move solution and projects to src 2023-04-27 23:51:14 +02:00
Size.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
SizeCalculator.cs Texture: Fix 3D texture size when totalBlocksOfGobsInZ > 1 (#5228) 2023-06-05 13:33:09 +02:00
SizeInfo.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00