The com.mojang.blaze3d.opengl.GlCommandEncoder#copyTextureToTexture method contains a critical logical flaw. It allows mixing incompatible internal format types (e.g., Float vs Integer) which violates the OpenGL specification, leading to driver instability.
Steps to Reproduce (Code Analysis):
Inspect the source code for
com.mojang.blaze3d.opengl.GlCommandEncoder.java.Locate the method
copyTextureToTexture.Observe the validation logic: it checks
source.getFormat().hasColorAspect(), but ignores the underlying data type (Signed/Unsigned Integer vs Fixed-point/Float).Compare this logic against the OpenGL Specification for
glBlitFramebuffer, which explicitly states that mixing these formats generatesGL_INVALID_OPERATION.
Expected Result:
The method should validate that the source and destination textures share a compatible Internal Format Type (as required by OpenGL) before attempting the operation. It should throw an IllegalArgumentException if they are incompatible, protecting the render pipeline.
Actual Result:
The validation is missing. The engine proceeds to issue an invalid glBlitFramebuffer command.
This results in:
GL_INVALID_OPERATIONerrors generated by the driver.Potential rendering corruption or driver crashes/timeouts on strict hardware/drivers.
The render pipeline enters an undefined state, only catching the error via
_getError()after the damage is done.
Environment
All Platforms
Comments 2
Thank you for your report!
After consideration, the issue is being closed as Invalid.
This report does not describe a bug.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Please edit your report to change the Affected Version to the version shown on the Minecraft title screen