diff options
author | Alan Hourihane <[email protected]> | 2009-01-23 16:04:57 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2009-01-23 16:06:26 +0000 |
commit | b0d0e53a54ce79f57334942bf0b3762db8a3a7b8 (patch) | |
tree | 4d7d3f6a2b1cbbc6aec52771c5a80767f8148c03 /src/gallium | |
parent | 483c730de8ec00ef140f31bdb40856aef3b6fde6 (diff) |
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.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_api.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index e0b666ffc8d..33dc044ad55 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; |