2 Copyright © 2009-2019, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
8 #include "util/os_misc.h"
9 #include "pipe/p_defines.h"
10 #include "pipe/p_screen.h"
11 #include "pipe/p_state.h"
13 #include "util/u_inlines.h"
16 #include <proto/exec.h>
17 #include <proto/gallium.h>
19 #include "mesa3dgl_types.h"
20 #include "mesa3dgl_support.h"
21 #include "mesa3dgl_gallium.h"
24 /*****************************************************************************
34 Swaps the back with front buffers. MUST BE used to display the effect
35 of rendering onto the target RastPort, since GLA always work in
39 ctx - GL rendering context on which swap is to be performed.
49 *****************************************************************************/
51 struct mesa3dgl_context
*_ctx
= (struct mesa3dgl_context
*)ctx
;
53 D(bug("[MESA3DGL] %s()\n", __func__
));
55 if (_ctx
->framebuffer
->render_resource
)
57 /* Flush rendering cache before blitting */
58 _ctx
->st
->flush(_ctx
->st
, ST_FLUSH_FRONT
, NULL
);
60 BltPipeResourceRastPort(_ctx
->driver
, _ctx
->framebuffer
->render_resource
, 0, 0,
61 _ctx
->visible_rp
, _ctx
->left
, _ctx
->top
,
62 _ctx
->framebuffer
->width
, _ctx
->framebuffer
->height
);
65 MESA3DGLCheckAndUpdateBufferSize(_ctx
);