diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-11-04 21:12:48 +0000 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-11-04 21:12:48 +0000 |
commit | cde48bc8d1576482d7381b9b6fdce32b013e5d00 (patch) | |
tree | 22b3adac12ee73aa8863a263885e85da55ff9c98 /src | |
parent | b8bb48f4528227e36400cd1599a82bb73415ef60 (diff) | |
download | external_mesa3d-cde48bc8d1576482d7381b9b6fdce32b013e5d00.zip external_mesa3d-cde48bc8d1576482d7381b9b6fdce32b013e5d00.tar.gz external_mesa3d-cde48bc8d1576482d7381b9b6fdce32b013e5d00.tar.bz2 |
i965g: hook up flush-frontbuffer
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/drm/i965/xlib/xlib_i965.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/gallium/winsys/drm/i965/xlib/xlib_i965.c b/src/gallium/winsys/drm/i965/xlib/xlib_i965.c index d5c65fa..4ce22a5 100644 --- a/src/gallium/winsys/drm/i965/xlib/xlib_i965.c +++ b/src/gallium/winsys/drm/i965/xlib/xlib_i965.c @@ -125,6 +125,7 @@ xlib_brw_bo_alloc( struct brw_winsys_screen *sws, buf->offset = align(xbw->offset, alignment); buf->type = type; buf->virtual = MALLOC(size); + buf->cheesy_refcount = 1; buf->base.offset = &buf->offset; /* hmm, cheesy */ buf->base.size = size; @@ -299,6 +300,27 @@ xlib_create_brw_winsys_screen( void ) * Implementation of Xlib co-state-tracker's winsys interface */ +static void +xlib_i965_display_surface(struct xmesa_buffer *xm_buffer, + struct pipe_surface *surf) +{ + /* struct brw_texture *texture = brw_texture(surf->texture); */ + + debug_printf("%s tex %p, sz %dx%d\n", __FUNCTION__, + (void *)surf->texture, + surf->texture->width[0], + surf->texture->height[0]); +} + +static void +xlib_i965_flush_frontbuffer(struct pipe_screen *screen, + struct pipe_surface *surf, + void *context_private) +{ + xlib_i965_display_surface(NULL, surf); +} + + static struct pipe_screen * xlib_create_i965_screen( void ) { @@ -309,11 +331,11 @@ xlib_create_i965_screen( void ) if (winsys == NULL) return NULL; - screen = brw_create_screen(winsys, - PCI_CHIP_GM45_GM); + screen = brw_create_screen(winsys, PCI_CHIP_GM45_GM); if (screen == NULL) goto fail; + screen->flush_frontbuffer = xlib_i965_flush_frontbuffer; return screen; fail: @@ -343,17 +365,6 @@ fail: } -static void -xlib_i965_display_surface(struct xmesa_buffer *xm_buffer, - struct pipe_surface *surf) -{ - /* struct brw_texture *texture = brw_texture(surf->texture); */ - - debug_printf("%s tex %p, sz %dx%d\n", __FUNCTION__, - (void *)surf->texture, - surf->texture->width[0], - surf->texture->height[0]); -} struct xm_driver xlib_i965_driver = |