mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
st/dri2: Hook up flush_frontbuffer
Doesn't do anything because we can't tell the X server about any changes to the fake front buffer.
This commit is contained in:
parent
b7b046150b
commit
28c325f8d3
4 changed files with 30 additions and 1 deletions
|
|
@ -76,7 +76,8 @@ dri_create_context(const __GLcontextModes *visual,
|
|||
if (ctx->pipe == NULL)
|
||||
goto fail;
|
||||
|
||||
ctx->pipe->priv = ctx; /* I guess */
|
||||
/* used in dri_flush_frontbuffer */
|
||||
ctx->pipe->priv = ctx;
|
||||
|
||||
ctx->st = st_create_context(ctx->pipe, visual, st_share);
|
||||
if (ctx->st == NULL)
|
||||
|
|
@ -152,6 +153,7 @@ dri_make_current(__DRIcontextPrivate *cPriv,
|
|||
draw->stfb,
|
||||
read->stfb);
|
||||
|
||||
/* used in dri_flush_frontbuffer */
|
||||
ctx->dPriv = driDrawPriv;
|
||||
|
||||
if (driDrawPriv)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,15 @@
|
|||
#include "util/u_memory.h"
|
||||
|
||||
|
||||
static void
|
||||
dri_copy_to_front(__DRIdrawablePrivate *dPriv,
|
||||
struct pipe_surface *from,
|
||||
int x, int y, unsigned w, unsigned h)
|
||||
{
|
||||
/* TODO send a message to the Xserver to copy to the real front buffer */
|
||||
}
|
||||
|
||||
|
||||
static struct pipe_surface *
|
||||
dri_surface_from_handle(struct pipe_screen *screen,
|
||||
unsigned handle,
|
||||
|
|
@ -184,6 +193,16 @@ dri_get_buffers(__DRIdrawablePrivate *dPriv)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
dri_flush_frontbuffer(struct pipe_screen *screen,
|
||||
struct pipe_surface *surf,
|
||||
void *context_private)
|
||||
{
|
||||
struct dri_context *ctx = (struct dri_context *)context_private;
|
||||
dri_copy_to_front(ctx->dPriv, surf, 0, 0, surf->width, surf->height);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
dri_swap_buffers(__DRIdrawablePrivate * dPriv)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ dri_create_buffer(__DRIscreenPrivate *sPriv,
|
|||
const __GLcontextModes *visual,
|
||||
boolean isPixmap);
|
||||
|
||||
void
|
||||
dri_flush_frontbuffer(struct pipe_screen *screen,
|
||||
struct pipe_surface *surf,
|
||||
void *context_private);
|
||||
|
||||
void
|
||||
dri_swap_buffers(__DRIdrawablePrivate * dPriv);
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,9 @@ dri_init_screen2(__DRIscreenPrivate *sPriv)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
/* We need to hook in here */
|
||||
screen->pipe_screen->flush_frontbuffer = dri_flush_frontbuffer;
|
||||
|
||||
driParseOptionInfo(&screen->optionCache,
|
||||
__driConfigOptions,
|
||||
__driNConfigOptions);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue