mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
SwapBuffersRegionNOK: invert rectangles on y axis
The EGL_NOK_swap_region2 spec states that the rectangles are specified with a bottom-left origin within a surface coordinate space also with a bottom left origin, so this patch ensures the rectangles are flipped before passing them on to dri2_copy_region. Fixes piglit's egl-nok-swap-region test. Tested-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
df4a88ac43
commit
0a523a8820
1 changed files with 1 additions and 2 deletions
|
|
@ -777,10 +777,9 @@ dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
|
|||
if (numRects > (int)ARRAY_SIZE(rectangles))
|
||||
return dri2_copy_region(drv, disp, draw, dri2_surf->region);
|
||||
|
||||
/* FIXME: Invert y here? */
|
||||
for (i = 0; i < numRects; i++) {
|
||||
rectangles[i].x = rects[i * 4];
|
||||
rectangles[i].y = rects[i * 4 + 1];
|
||||
rectangles[i].y = dri2_surf->base.Height - rects[i * 4 + 1] - rects[i * 4 + 3];
|
||||
rectangles[i].width = rects[i * 4 + 2];
|
||||
rectangles[i].height = rects[i * 4 + 3];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue