2 Copyright 2009-2015, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
7 #include <proto/gallium.h>
9 #include <gallium/pipe/p_screen.h>
10 #include <gallium/util/u_inlines.h>
12 #include "mesa3dgl_types.h"
13 #include "mesa3dgl_support.h"
14 #include "mesa3dgl_gallium.h"
17 /*****************************************************************************
27 Swaps the back with front buffers. MUST BE used to display the effect
28 of rendering onto the target RastPort, since GLA always work in
32 ctx - GL rendering context on which swap is to be performed.
42 *****************************************************************************/
44 struct mesa3dgl_context
*_ctx
= (struct mesa3dgl_context
*)ctx
;
46 if (_ctx
->framebuffer
->render_resource
)
48 /* Flush rendering cache before blitting */
49 _ctx
->st
->flush(_ctx
->st
, ST_FLUSH_FRONT
, NULL
);
51 BltPipeResourceRastPort(_ctx
->framebuffer
->render_resource
, 0, 0,
52 _ctx
->visible_rp
, _ctx
->left
, _ctx
->top
,
53 _ctx
->framebuffer
->width
, _ctx
->framebuffer
->height
);
56 MESA3DGLCheckAndUpdateBufferSize(_ctx
);