Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
authorBrian Paul <brianp@vmware.com>
Sun, 27 Dec 2009 22:31:08 +0000 (15:31 -0700)
committerBrian Paul <brianp@vmware.com>
Sun, 27 Dec 2009 22:31:08 +0000 (15:31 -0700)
Conflicts:
src/gallium/auxiliary/util/u_network.c
src/gallium/auxiliary/util/u_network.h
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/trace/tr_rbug.c
src/gallium/state_trackers/vega/bezier.c
src/gallium/state_trackers/vega/vg_context.c
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_driver.c
src/gallium/winsys/xlib/xlib_brw_context.c
src/mesa/main/mtypes.h

1  2 
src/gallium/auxiliary/util/u_clear.h
src/gallium/drivers/i915/i915_state.c
src/gallium/state_trackers/egl/egl_surface.c
src/gallium/state_trackers/vega/arc.c
src/gallium/state_trackers/vega/bezier.c
src/gallium/state_trackers/vega/vg_context.c
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_driver.c
src/mesa/drivers/dri/i915/i915_program.c
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/intel/intel_pixel_bitmap.c

@@@ -46,14 -45,10 +46,14 @@@ util_clear(struct pipe_context *pipe
  {
     if (buffers & PIPE_CLEAR_COLOR) {
        struct pipe_surface *ps = framebuffer->cbufs[0];
-       unsigned color;
+       unsigned color = 0;
  
        util_pack_color(rgba, ps->format, &color);
 -      pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, color);
 +      if (pipe->surface_fill) {
 +         pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, color);
 +      } else {
 +         util_surface_fill(pipe, ps, 0, 0, ps->width, ps->height, color);
 +      }
     }
  
     if (buffers & PIPE_CLEAR_DEPTHSTENCIL) {
Simple merge
Simple merge
@@@ -232,7 -232,6 +232,10 @@@ static void update_clip_state(struct vg
        struct pipe_blend_state *blend = &ctx->state.g3d.blend;
        struct pipe_framebuffer_state *fb = &ctx->state.g3d.fb;
        int i;
++<<<<<<< HEAD:src/gallium/state_trackers/vega/vg_context.c
 +
++=======
++>>>>>>> mesa_7_6_branch:src/gallium/state_trackers/vega/vg_context.c
        dsa->depth.writemask = 1;/*glDepthMask(TRUE);*/
        dsa->depth.func = PIPE_FUNC_ALWAYS;
        dsa->depth.enabled = 1;
@@@ -158,25 -170,19 +164,26 @@@ crtc_shadow_create(xf86CrtcPtr crtc, vo
  static void
  crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
  {
+     /* ScrnInfoPtr pScrn = crtc->scrn; */
  }
  
 +/*
 + * Cursor functions
 + */
 +
  static void
 -crtc_destroy(xf86CrtcPtr crtc)
 +crtc_set_cursor_colors(xf86CrtcPtr crtc, int bg, int fg)
  {
 -    struct crtc_private *crtcp = crtc->driver_private;
 +    /* XXX: See if this one is needed, as we only support ARGB cursors */
 +}
  
 -    if (crtcp->cursor_tex)
 -      pipe_texture_reference(&crtcp->cursor_tex, NULL);
 +static void
 +crtc_set_cursor_position(xf86CrtcPtr crtc, int x, int y)
 +{
 +    modesettingPtr ms = modesettingPTR(crtc->scrn);
 +    struct crtc_private *crtcp = crtc->driver_private;
  
 -    drmModeFreeCrtc(crtcp->drm_crtc);
 -    xfree(crtcp);
 +    drmModeMoveCursor(ms->fd, crtcp->drm_crtc->crtc_id, x, y);
  }
  
  static void
@@@ -217,57 -176,39 +217,63 @@@ drv_init_drm(ScrnInfoPtr pScrn
  }
  
  static Bool
 -crtc_resize(ScrnInfoPtr pScrn, int width, int height)
 +drv_init_resource_management(ScrnInfoPtr pScrn)
  {
      modesettingPtr ms = modesettingPTR(pScrn);
+     /*
+     ScreenPtr pScreen = pScrn->pScreen;
+     PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
+     Bool fbAccessDisabled;
+     CARD8 *fbstart;
+      */
  
 -    if (width == pScrn->virtualX && height == pScrn->virtualY)
 +    if (ms->screen || ms->kms)
        return TRUE;
  
 -    ErrorF("RESIZING TO %dx%d\n", width, height);
 +    ms->api = drm_api_create();
 +    if (ms->api) {
 +      ms->screen = ms->api->create_screen(ms->api, ms->fd, NULL);
  
 -    pScrn->virtualX = width;
 -    pScrn->virtualY = height;
 +      if (ms->screen)
 +          return TRUE;
  
 -    /* HW dependent - FIXME */
 -    pScrn->displayWidth = pScrn->virtualX;
 +      if (ms->api->destroy)
 +          ms->api->destroy(ms->api);
  
 -    drmModeRmFB(ms->fd, ms->fb_id);
 +      ms->api = NULL;
 +    }
  
 -    /* now create new frontbuffer */
 -    return CreateFrontBuffer(pScrn);
 +#ifdef HAVE_LIBKMS
 +    if (!kms_create(ms->fd, &ms->kms))
 +      return TRUE;
 +#endif
 +
 +    return FALSE;
  }
  
 -static const xf86CrtcConfigFuncsRec crtc_config_funcs = {
 -    crtc_resize
 -};
 +static Bool
 +drv_close_resource_management(ScrnInfoPtr pScrn)
 +{
 +    modesettingPtr ms = modesettingPTR(pScrn);
 +
 +    if (ms->screen)
 +      ms->screen->destroy(ms->screen);
 +    ms->screen = NULL;
 +
 +    if (ms->api && ms->api->destroy)
 +      ms->api->destroy(ms->api);
 +    ms->api = NULL;
 +
 +#ifdef HAVE_LIBKMS
 +    if (ms->kms)
 +      kms_destroy(&ms->kms);
 +#endif
 +
 +    return TRUE;
 +}
  
  static Bool
 -PreInit(ScrnInfoPtr pScrn, int flags)
 +drv_pre_init(ScrnInfoPtr pScrn, int flags)
  {
      xf86CrtcConfigPtr xf86_config;
      modesettingPtr ms;
@@@ -32,8 -32,8 +32,9 @@@
  #include "main/mtypes.h"
  #include "main/macros.h"
  #include "main/bufferobj.h"
+ #include "main/polygon.h"
  #include "main/pixelstore.h"
 +#include "main/polygon.h"
  #include "main/state.h"
  #include "main/teximage.h"
  #include "main/texenv.h"