From: Keith Whitwell Date: Tue, 9 Mar 2010 11:02:37 +0000 (+0000) Subject: Merge commit 'origin/master' into gallium-sw-api-2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c96690a5b6e1c2d114e7ec5f1e9d60a4ff2a330;p=mesa.git Merge commit 'origin/master' into gallium-sw-api-2 Conflicts: src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/softpipe/sp_texture.c src/gallium/drivers/softpipe/sp_winsys.h src/gallium/state_trackers/egl/common/egl_g3d.c src/gallium/state_trackers/egl/x11/native_x11.c src/gallium/state_trackers/egl/x11/native_x11.h src/gallium/state_trackers/egl/x11/native_ximage.c --- 0c96690a5b6e1c2d114e7ec5f1e9d60a4ff2a330 diff --cc configs/linux-dri index ae339730002,b75273946da..04bcfd859d1 --- a/configs/linux-dri +++ b/configs/linux-dri @@@ -58,9 -58,7 +58,8 @@@ PROGRAM_DIRS := egl $(PROGRAM_DIRS EGL_DRIVERS_DIRS = glx DRIVER_DIRS = dri - WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm +GALLIUM_TARGET_DIRS = GALLIUM_WINSYS_DRM_DIRS = vmware intel i965 GALLIUM_STATE_TRACKERS_DIRS = egl diff --cc configs/linux-egl index 9d898182fc9,a8910018fce..28165ed5b5a --- a/configs/linux-egl +++ b/configs/linux-egl @@@ -51,8 -51,6 +51,7 @@@ SRC_DIRS = gallium mesa gallium/winsys PROGRAM_DIRS = egl DRIVER_DIRS = dri - WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = egl_drm +GALLIUM_TARGET_DIRS = DRI_DIRS = intel diff --cc src/gallium/drivers/llvmpipe/lp_setup.c index fe60eb0437e,cc7c18c8c0c..fbe14924cb1 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@@ -479,10 -487,10 +487,10 @@@ lp_setup_set_sampler_textures( struct s */ struct llvmpipe_screen *screen = llvmpipe_screen(tex->screen); - struct llvmpipe_winsys *winsys = screen->winsys; + struct sw_winsys *winsys = screen->winsys; - jit_tex->data = winsys->displaytarget_map(winsys, lp_tex->dt, + jit_tex->data[0] = winsys->displaytarget_map(winsys, lp_tex->dt, - PIPE_BUFFER_USAGE_CPU_READ); + PIPE_BUFFER_USAGE_CPU_READ); - assert(jit_tex->data); + assert(jit_tex->data[0]); } /* the scene references this texture */ diff --cc src/gallium/drivers/softpipe/sp_texture.h index e8d17ce7daf,b54cf33ef5c..1c8636d1d56 --- a/src/gallium/drivers/softpipe/sp_texture.h +++ b/src/gallium/drivers/softpipe/sp_texture.h @@@ -42,19 -46,12 +46,19 @@@ struct softpipe_textur { struct pipe_texture base; - unsigned long level_offset[PIPE_MAX_TEXTURE_LEVELS]; - unsigned stride[PIPE_MAX_TEXTURE_LEVELS]; + unsigned long level_offset[SP_MAX_TEXTURE_2D_LEVELS]; + unsigned stride[SP_MAX_TEXTURE_2D_LEVELS]; - /* The data is held here: + /** + * Display target, for textures with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET + * usage. + */ + struct sw_displaytarget *dt; + + /** + * Malloc'ed data for regular textures, or a mapping to dt above. */ - struct pipe_buffer *buffer; + void *data; /* True if texture images are power-of-two in all dimensions: */ diff --cc src/gallium/state_trackers/egl/common/egl_g3d.c index 2f7a8a8f7eb,50774b03f35..f54c51a6681 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@@ -567,6 -601,8 +587,7 @@@ egl_g3d_initialize(_EGLDriver *drv, _EG goto fail; } + gdpy->native->user_data = (void *) dpy; - gdpy->native->screen->flush_frontbuffer = egl_g3d_flush_frontbuffer; gdpy->native->screen->update_buffer = egl_g3d_update_buffer; egl_g3d_init_st(&gdrv->base); diff --cc src/gallium/state_trackers/egl/x11/native_x11.h index 2e71de1885b,8c6a7d93497..21ed6a2e063 --- a/src/gallium/state_trackers/egl/x11/native_x11.h +++ b/src/gallium/state_trackers/egl/x11/native_x11.h @@@ -29,9 -29,13 +29,11 @@@ #include "common/native.h" struct native_display * -x11_create_ximage_display(EGLNativeDisplayType dpy, - struct native_event_handler *event_handler, - boolean use_xshm); +x11_create_ximage_display(EGLNativeDisplayType dpy); struct native_display * - x11_create_dri2_display(EGLNativeDisplayType dpy, struct drm_api *api); + x11_create_dri2_display(EGLNativeDisplayType dpy, + struct native_event_handler *event_handler, + struct drm_api *api); #endif /* _NATIVE_X11_H_ */ diff --cc src/gallium/state_trackers/egl/x11/native_ximage.c index 6c6ba24e7b3,a94b1ca6c66..0006b0caca4 --- a/src/gallium/state_trackers/egl/x11/native_ximage.c +++ b/src/gallium/state_trackers/egl/x11/native_ximage.c @@@ -290,10 -371,10 +301,11 @@@ ximage_surface_swap_buffers(struct nati boolean ret; /* display the back buffer first */ - ret = ximage_surface_draw_buffer(nsurf, NATIVE_ATTACHMENT_BACK_LEFT); + ret = ximage_surface_draw_buffer(&xsurf->base, + NATIVE_ATTACHMENT_BACK_LEFT); /* force buffers to be updated in next validation call */ xsurf->server_stamp++; + ximage_surface_notify_invalid(&xsurf->base); xfront = &xsurf->buffers[NATIVE_ATTACHMENT_FRONT_LEFT]; xback = &xsurf->buffers[NATIVE_ATTACHMENT_BACK_LEFT]; @@@ -621,10 -770,16 +652,11 @@@ x11_create_ximage_display(EGLNativeDisp return NULL; } - xdpy->event_handler = event_handler; - - xdpy->use_xshm = - (use_xshm && x11_screen_support(xdpy->xscr, X11_SCREEN_EXTENSION_XSHM)); - - xdpy->winsys = create_sw_winsys(); - xdpy->base.screen = softpipe_create_screen(xdpy->winsys); + xdpy->driver = xlib_sw_winsys_init(); + xdpy->base.screen = xdpy->driver->create_pipe_screen(xdpy->dpy); xdpy->base.destroy = ximage_display_destroy; + xdpy->base.get_param = ximage_display_get_param; xdpy->base.get_configs = ximage_display_get_configs; xdpy->base.is_pixmap_supported = ximage_display_is_pixmap_supported;