renderer: Set GL_PACK_ALIGNMENT to 1

Otherwise row stride will multiple of 4, even for damage data.
rpi-vc4-hack
Andri Yngvason 2020-05-10 12:12:23 +00:00
parent 0761a5b818
commit 151e916752
1 changed files with 2 additions and 0 deletions

View File

@ -745,6 +745,8 @@ void renderer_read_pixels(struct renderer* self, void* dst, uint32_t y,
glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE, &read_type);
glFinish();
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(0, y, width, height, read_format, read_type, dst);
}