mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-07-11 01:24:01 +02:00
f76e7472fd
For some reason when using GL_RGB, it seems to corrupt memory and cause a crash, valgrind says the following: ==29295== Invalid write of size 1 ==29295== at 0x20BC10E6: convert_ubyte (format_utils.c:996) ==29295== by 0x20BDE59B: _mesa_format_convert (format_utils.c:452) ==29295== by 0x20CA072D: read_rgba_pixels (readpix.c:609) ==29295== by 0x20CA072D: _mesa_readpixels (readpix.c:923) ==29295== by 0x20CA6DCA: st_ReadPixels (st_cb_readpixels.c:577) ==29295== by 0x20CA120B: read_pixels (readpix.c:1218) ==29295== by 0x20CA120B: _mesa_ReadnPixelsARB (readpix.c:1235) ==29295== by 0x20CA1564: _mesa_ReadPixels (readpix.c:1250) ==29295== by 0x5741BCF4: opengl::GlReadPixelsCommand::commandToExecute() (opengl_WrappedFunctions.h:682) ==29295== by 0x5740EB75: opengl::OpenGlCommand::performCommandSingleThreaded() (opengl_Command.cpp:13) ==29295== by 0x574117B1: opengl::FunctionWrapper::executeCommand(std::shared_ptr<opengl::OpenGlCommand>) (opengl_Wrapper.cpp:30) ==29295== by 0x57412548: opengl::FunctionWrapper::wrReadPixels(int, int, int, int, unsigned int, unsigned int, void*) (opengl_Wrapper.cpp:316) ==29295== by 0x57507C74: DisplayWindowMupen64plus::_readScreen2(void*, int*, int*, int) (mupen64plus_DisplayWindow.cpp:263) ==29295== by 0x573B69D3: DisplayWindow::readScreen2(void*, int*, int*, int) (DisplayWindow.cpp:209) valgrind leads me to believe this might be a mesa issue where it writes out of bounds of the provided buffer, this issue does not occur when using GL_RGBA, nor does it appear when using an older mesa version in the AppImage. Reverting https://github.com/gonetz/GLideN64/pull/2856 fixes the issue. Fixes https://github.com/Rosalie241/RMG/issues/498