From b0d0e53a54ce79f57334942bf0b3762db8a3a7b8 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Fri, 23 Jan 2009 16:04:57 +0000 Subject: gallium: change the st_get_framebuffer_surface/texture functions to return TRUE/FALSE if the st_framebuffer is valid, and if it is return the surface/texture in the passed pointer. --- src/gallium/state_trackers/glx/xlib/xm_api.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gallium/state_trackers/glx/xlib/xm_api.c') diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index e0b666ffc8..33dc044ad5 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -1117,7 +1117,7 @@ void XMesaSwapBuffers( XMesaBuffer b ) */ st_notify_swapbuffers(b->stfb); - surf = st_get_framebuffer_surface(b->stfb, ST_SURFACE_BACK_LEFT); + st_get_framebuffer_surface(b->stfb, ST_SURFACE_BACK_LEFT, &surf); if (surf) { driver.display_surface(b, surf); } @@ -1132,12 +1132,13 @@ void XMesaSwapBuffers( XMesaBuffer b ) */ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) { - struct pipe_surface *surf_front - = st_get_framebuffer_surface(b->stfb, ST_SURFACE_FRONT_LEFT); - struct pipe_surface *surf_back - = st_get_framebuffer_surface(b->stfb, ST_SURFACE_BACK_LEFT); + struct pipe_surface *surf_front; + struct pipe_surface *surf_back; struct pipe_context *pipe = NULL; /* XXX fix */ + st_get_framebuffer_surface(b->stfb, ST_SURFACE_FRONT_LEFT, &surf_front); + st_get_framebuffer_surface(b->stfb, ST_SURFACE_BACK_LEFT, &surf_back); + if (!surf_front || !surf_back) return; -- cgit v1.2.3