Linear framebuffer crashes on certain dimensions
averne opened this issue · comments
averne commented
The following code results in a data abort (fatal error 2168-0002). It seems to trigger a heap corruption during linear -> block linear conversion?
Regular dimensions such as 1280x720 work as expected.
#include <switch.h>
#define FB_WIDTH 256
#define FB_HEIGHT 256
int main() {
Framebuffer fb;
framebufferCreate(&fb, nwindowGetDefault(),
FB_WIDTH, FB_HEIGHT, PIXEL_FORMAT_RGBA_8888, 2);
framebufferMakeLinear(&fb);
framebufferBegin(&fb, NULL);
framebufferEnd(&fb);
framebufferClose(&fb);
return 0;
}
fincs commented
This was a long standing known bug, the cause of which has finally been found and fixed. Thanks for your report.
averne commented
Nice, thanks for the fix