~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i915/i915_vtbl.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
   struct i915_hw_state *state = &i915->state;
288
288
   int i, count, aper_count;
289
289
   GLuint dirty;
290
 
   dri_bo *aper_array[3 + I915_TEX_UNITS];
 
290
   drm_intel_bo *aper_array[3 + I915_TEX_UNITS];
291
291
   GET_CURRENT_CONTEXT(ctx);
292
292
   BATCH_LOCALS;
293
293
 
366
366
   }
367
367
 
368
368
   if (dirty & I915_UPLOAD_BUFFERS) {
369
 
      GLuint count = 15;
 
369
      GLuint count;
370
370
 
371
371
      if (INTEL_DEBUG & DEBUG_STATE)
372
372
         fprintf(stderr, "I915_UPLOAD_BUFFERS:\n");
373
373
 
 
374
      count = 14;
 
375
      if (state->Buffer[I915_DESTREG_DRAWRECT0] != MI_NOOP)
 
376
         count++;
374
377
      if (state->depth_region)
375
 
          count += 3;
 
378
         count += 3;
376
379
 
377
380
      BEGIN_BATCH(count);
378
381
      OUT_BATCH(state->Buffer[I915_DESTREG_CBUFADDR0]);
394
397
      OUT_BATCH(state->Buffer[I915_DESTREG_SR1]);
395
398
      OUT_BATCH(state->Buffer[I915_DESTREG_SR2]);
396
399
 
397
 
      assert(state->Buffer[I915_DESTREG_DRAWRECT0] != MI_NOOP);
398
 
      OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT0]);
 
400
      if (state->Buffer[I915_DESTREG_DRAWRECT0] != MI_NOOP)
 
401
         OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT0]);
399
402
      OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT1]);
400
403
      OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT2]);
401
404
      OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT3]);
494
497
 
495
498
   for (i = 0; i < I915_TEX_UNITS; i++) {
496
499
      if (i915->state.tex_buffer[i] != NULL) {
497
 
         dri_bo_unreference(i915->state.tex_buffer[i]);
 
500
         drm_intel_bo_unreference(i915->state.tex_buffer[i]);
498
501
         i915->state.tex_buffer[i] = NULL;
499
502
      }
500
503
   }
532
535
   struct intel_renderbuffer *irb = intel_renderbuffer(rb);
533
536
   GLuint value;
534
537
   struct i915_hw_state *state = &i915->state;
535
 
   uint32_t draw_x, draw_y;
 
538
   uint32_t draw_x, draw_y, draw_offset;
536
539
 
537
540
   if (state->draw_region != color_regions[0]) {
538
541
      intel_region_release(&state->draw_region);
621
624
      draw_y = 0;
622
625
   }
623
626
 
 
627
   draw_offset = (draw_y << 16) | draw_x;
 
628
 
624
629
   /* When changing drawing rectangle offset, an MI_FLUSH is first required. */
625
 
   state->Buffer[I915_DESTREG_DRAWRECT0] = MI_FLUSH;
 
630
   if (draw_offset != i915->last_draw_offset) {
 
631
      FALLBACK(intel, I915_FALLBACK_DRAW_OFFSET,
 
632
               (ctx->DrawBuffer->Width + draw_x > 2048) ||
 
633
               (ctx->DrawBuffer->Height + draw_y > 2048));
 
634
 
 
635
      state->Buffer[I915_DESTREG_DRAWRECT0] = MI_FLUSH | INHIBIT_FLUSH_RENDER_CACHE;
 
636
      i915->last_draw_offset = draw_offset;
 
637
   } else
 
638
      state->Buffer[I915_DESTREG_DRAWRECT0] = MI_NOOP;
 
639
 
626
640
   state->Buffer[I915_DESTREG_DRAWRECT1] = _3DSTATE_DRAWRECT_INFO;
627
641
   state->Buffer[I915_DESTREG_DRAWRECT2] = 0;
628
 
   state->Buffer[I915_DESTREG_DRAWRECT3] = (draw_y << 16) | draw_x;
 
642
   state->Buffer[I915_DESTREG_DRAWRECT3] = draw_offset;
629
643
   state->Buffer[I915_DESTREG_DRAWRECT4] =
630
644
      ((ctx->DrawBuffer->Width + draw_x - 1) & 0xffff) |
631
645
      ((ctx->DrawBuffer->Height + draw_y - 1) << 16);
632
 
   state->Buffer[I915_DESTREG_DRAWRECT5] = (draw_y << 16) | draw_x;
 
646
   state->Buffer[I915_DESTREG_DRAWRECT5] = draw_offset;
633
647
 
634
648
   I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
635
649
}
646
660
    * difficulties associated with them (physical address requirements).
647
661
    */
648
662
   i915->state.emitted = 0;
 
663
   i915->last_draw_offset = 0;
649
664
}
650
665
 
651
666
static void