Mojira Archive
MC-225075

Blaze3D, NativeImage, has a wrong GL_UNPACK_ALIGNMENT usage

For com.mojang.blaze3d.platform.NativeImage.Format.RGB, the number of channels is 3, which is directly passed to glPixelStorei(GL_UNPACK_ALIGNMENT, param), whereas valid range for GL_UNPACK_ALIGNMENT is 1, 2, 4, or 8.

See glPixelStore

STBImage reading png files is generally 1 byte-aligned, so pass 1, 2, or 4 for RGBA format is fine.

Although no usage currently found with Minecraft, I'm hoping it can be fixed to stop mod developers from using it wrongly.

Unresolved

Icyllis Milica

2021-05-07, 11:33 AM

2022-01-23, 07:15 PM

4

1

Plausible

(Unassigned)

1.16.5, 21w18a, 1.17.1

-