Merge commit 'origin/master' into gallium-sw-api-2
authorKeith Whitwell <keithw@vmware.com>
Tue, 9 Mar 2010 11:02:37 +0000 (11:02 +0000)
committerKeith Whitwell <keithw@vmware.com>
Tue, 9 Mar 2010 11:02:37 +0000 (11:02 +0000)
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

16 files changed:
1  2 
configs/autoconf.in
configs/default
configs/linux-dri
configs/linux-egl
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/llvmpipe/lp_texture.h
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/softpipe/sp_texture.h
src/gallium/state_trackers/egl/common/egl_g3d.c
src/gallium/state_trackers/egl/common/native.h
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

Simple merge
diff --cc configs/default
Simple merge
index ae3397300026eec2352c0e4cf630fdc8fd2e90e1,b75273946da84245f94d181afe1da1c8acbea0f0..04bcfd859d1919bf6516685fd397af965b78af2f
@@@ -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
  
index 9d898182fc94c92d6902a4fd74261dc4c8686962,a8910018fce8a5ccb5598db0521f65b1bee35d8f..28165ed5b5a3f30a6d0d86c223a97b0fbdb445b0
@@@ -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 
index fe60eb0437ec6ec5ca00a90468cb3ff1565284a6,cc7c18c8c0c039294532febdf9ec4d18b4f9ec59..fbe14924cb10628acd2ac4ff4dc7800dc505b488
@@@ -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 */
index e8d17ce7daf5362df57d86d598fd8d546c7ad6de,b54cf33ef5cc06c6ab5a6401c70446213caca351..1c8636d1d56b9695038117a455b9c01611cc937f
@@@ -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:
      */
index 2f7a8a8f7eb4806c304c6d43072b095cc2b58bad,50774b03f35a7b0635fc25b6e201fa418f00202f..f54c51a66817101aaccaefb8f6a4a62261bf3229
@@@ -567,6 -601,8 +587,7 @@@ egl_g3d_initialize(_EGLDriver *drv, _EG
        goto fail;
     }
  
 -   gdpy->native->screen->flush_frontbuffer = egl_g3d_flush_frontbuffer;
+    gdpy->native->user_data = (void *) dpy;
     gdpy->native->screen->update_buffer = egl_g3d_update_buffer;
  
     egl_g3d_init_st(&gdrv->base);
index 2e71de1885b89b6fbd895e578f92362b06f6375a,8c6a7d9349753bf3b28ead3ed7050a9197e5caf1..21ed6a2e0639933d502f1d88c65303d45333faf8
  #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_ */
index 6c6ba24e7b338764726198ab80b393078b750175,a94b1ca6c66043b9f594fbc3ec3bd7b40c5c44b7..0006b0caca4ca109c11903ff6cef2bc83689e0b2
@@@ -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;