add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / workbench / libs / mesa / mesa3dgl_glaswapbuffers.c
blobea34396ef64c9fbb1d5db10d4f3602ecd74c1c1c
1 /*
2 Copyright © 2009-2019, The AROS Development Team. All rights reserved.
3 $Id$
4 */
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 /*****************************************************************************
26 NAME */
28 void glASwapBuffers(
30 /* SYNOPSIS */
31 GLAContext ctx)
33 /* FUNCTION
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
36 double buffer mode.
38 INPUTS
39 ctx - GL rendering context on which swap is to be performed.
41 RESULT
43 BUGS
45 INTERNALS
47 HISTORY
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);