diff options
author | Michal Krol <[email protected]> | 2009-12-17 22:37:15 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-12-17 22:37:15 +0100 |
commit | 16c6dce013f089d072256652f012b3b604781bfd (patch) | |
tree | 077623708990a855f9be2dfeb3925f727e6207e7 /src/gallium/state_trackers/wgl | |
parent | 440fc5bf788201a265892ff2e12bf102e63a2896 (diff) | |
parent | 294bd53d4b6b15a6890599c46f14b205a3c738bf (diff) |
Merge branch 'master' into pipe-format-simplify
Conflicts:
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/auxiliary/draw/draw_pipe_pstipple.c
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_surface.c
src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
src/gallium/drivers/cell/ppu/cell_texture.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/drivers/svga/svga_state_vs.c
src/gallium/include/pipe/p_format.h
src/gallium/state_trackers/dri/dri_drawable.c
src/gallium/state_trackers/egl/egl_surface.c
src/gallium/state_trackers/python/p_device.i
src/gallium/state_trackers/python/st_softpipe_winsys.c
src/gallium/state_trackers/vega/api_filters.c
src/gallium/state_trackers/vega/image.c
src/gallium/state_trackers/vega/mask.c
src/gallium/state_trackers/vega/paint.c
src/gallium/state_trackers/vega/renderer.c
src/gallium/state_trackers/vega/vg_tracker.c
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_dri2.c
src/gallium/state_trackers/xorg/xorg_exa.c
src/gallium/state_trackers/xorg/xorg_renderer.c
src/gallium/state_trackers/xorg/xorg_xv.c
src/gallium/state_trackers/xorg/xvmc/surface.c
src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
src/gallium/winsys/drm/radeon/core/radeon_buffer.c
src/gallium/winsys/egl_xlib/sw_winsys.c
src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
src/gallium/winsys/gdi/gdi_softpipe_winsys.c
src/gallium/winsys/xlib/xlib_cell.c
src/gallium/winsys/xlib/xlib_llvmpipe.c
src/gallium/winsys/xlib/xlib_softpipe.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_texture.c
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_device.c | 14 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_framebuffer.c | 31 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_framebuffer.h | 3 |
3 files changed, 10 insertions, 38 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c index 985b8f0456a..7785aba4677 100644 --- a/src/gallium/state_trackers/wgl/stw_device.c +++ b/src/gallium/state_trackers/wgl/stw_device.c @@ -72,19 +72,7 @@ stw_flush_frontbuffer(struct pipe_screen *screen, return; } -#if DEBUG - { - /* ensure that a random surface was not passed to us */ - struct pipe_surface *surface2; - - if(!st_get_framebuffer_surface( fb->stfb, ST_SURFACE_FRONT_LEFT, &surface2 )) - assert(0); - else - assert(surface2 == surface); - } -#endif - - stw_framebuffer_present_locked(hdc, fb, ST_SURFACE_FRONT_LEFT); + stw_framebuffer_present_locked(hdc, fb, surface); } diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c index 3d029f91746..129a6298a77 100644 --- a/src/gallium/state_trackers/wgl/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c @@ -474,8 +474,6 @@ DrvPresentBuffers(HDC hdc, PGLPRESENTBUFFERSDATA data) struct stw_framebuffer *fb; struct pipe_screen *screen; struct pipe_surface *surface; - unsigned surface_index; - BOOL ret = FALSE; fb = stw_framebuffer_from_hdc( hdc ); if (fb == NULL) @@ -483,9 +481,7 @@ DrvPresentBuffers(HDC hdc, PGLPRESENTBUFFERSDATA data) screen = stw_dev->screen; - surface_index = (unsigned)(uintptr_t)data->pPrivateData; - if(!st_get_framebuffer_surface( fb->stfb, surface_index, &surface )) - goto fail; + surface = (struct pipe_surface *)data->pPrivateData; #ifdef DEBUG if(stw_dev->trace_running) { @@ -519,15 +515,11 @@ DrvPresentBuffers(HDC hdc, PGLPRESENTBUFFERSDATA data) stw_dev->stw_winsys->present( screen, surface, hdc ); } - ret = TRUE; - -fail: - stw_framebuffer_update(fb); stw_framebuffer_release(fb); - return ret; + return TRUE; } @@ -539,7 +531,7 @@ fail: BOOL stw_framebuffer_present_locked(HDC hdc, struct stw_framebuffer *fb, - unsigned surface_index) + struct pipe_surface *surface) { if(stw_dev->callbacks.wglCbPresentBuffers && stw_dev->stw_winsys->compose) { @@ -550,7 +542,7 @@ stw_framebuffer_present_locked(HDC hdc, data.magic2 = 0; data.AdapterLuid = stw_dev->AdapterLuid; data.rect = fb->client_rect; - data.pPrivateData = (void *)(uintptr_t)surface_index; + data.pPrivateData = (void *)surface; stw_framebuffer_release(fb); @@ -558,13 +550,6 @@ stw_framebuffer_present_locked(HDC hdc, } else { struct pipe_screen *screen = stw_dev->screen; - struct pipe_surface *surface; - - if(!st_get_framebuffer_surface( fb->stfb, surface_index, &surface )) { - /* FIXME: this shouldn't happen, but does on glean */ - stw_framebuffer_release(fb); - return FALSE; - } #ifdef DEBUG if(stw_dev->trace_running) { @@ -589,6 +574,7 @@ DrvSwapBuffers( HDC hdc ) { struct stw_framebuffer *fb; + struct pipe_surface *surface = NULL; fb = stw_framebuffer_from_hdc( hdc ); if (fb == NULL) @@ -599,12 +585,9 @@ DrvSwapBuffers( return TRUE; } - /* If we're swapping the buffer associated with the current context - * we have to flush any pending rendering commands first. - */ - st_notify_swapbuffers( fb->stfb ); + st_swapbuffers(fb->stfb, &surface, NULL); - return stw_framebuffer_present_locked(hdc, fb, ST_SURFACE_BACK_LEFT); + return stw_framebuffer_present_locked(hdc, fb, surface); } diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.h b/src/gallium/state_trackers/wgl/stw_framebuffer.h index 5afbe749086..b80d168a7ce 100644 --- a/src/gallium/state_trackers/wgl/stw_framebuffer.h +++ b/src/gallium/state_trackers/wgl/stw_framebuffer.h @@ -34,6 +34,7 @@ #include "pipe/p_thread.h" +struct pipe_surface; struct stw_pixelformat_info; /** @@ -140,7 +141,7 @@ stw_framebuffer_allocate( BOOL stw_framebuffer_present_locked(HDC hdc, struct stw_framebuffer *fb, - unsigned surface_index); + struct pipe_surface *surface); void stw_framebuffer_update( |