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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/i915/i915_blit.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:
31
31
#include "i915_batch.h"
32
32
#include "i915_debug.h"
33
33
 
34
 
#define FILE_DEBUG_FLAG DEBUG_BLIT
35
34
 
36
35
void
37
36
i915_fill_blit(struct i915_context *i915,
38
37
               unsigned cpp,
 
38
               unsigned rgba_mask,
39
39
               unsigned short dst_pitch,
40
 
               struct intel_buffer *dst_buffer,
 
40
               struct i915_winsys_buffer *dst_buffer,
41
41
               unsigned dst_offset,
42
42
               short x, short y, 
43
43
               short w, short h, 
46
46
   unsigned BR13, CMD;
47
47
 
48
48
 
49
 
   I915_DBG(i915,
50
 
      "%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
51
 
      __FUNCTION__,
52
 
      dst_buffer, dst_pitch, dst_offset, x, y, w, h);
 
49
   I915_DBG(DBG_BLIT, "%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
 
50
            __FUNCTION__, dst_buffer, dst_pitch, dst_offset, x, y, w, h);
53
51
 
54
52
   switch (cpp) {
55
53
   case 1:
62
60
   case 4:
63
61
      BR13 = (((int) dst_pitch) & 0xffff) |
64
62
         (0xF0 << 16) | (1 << 24) | (1 << 25);
65
 
      CMD = (XY_COLOR_BLT_CMD | XY_COLOR_BLT_WRITE_ALPHA |
66
 
             XY_COLOR_BLT_WRITE_RGB);
 
63
      CMD = (XY_COLOR_BLT_CMD | rgba_mask);
67
64
      break;
68
65
   default:
69
66
      return;
77
74
   OUT_BATCH(BR13);
78
75
   OUT_BATCH((y << 16) | x);
79
76
   OUT_BATCH(((y + h) << 16) | (x + w));
80
 
   OUT_RELOC(dst_buffer, INTEL_USAGE_2D_TARGET, dst_offset);
 
77
   OUT_RELOC(dst_buffer, I915_USAGE_2D_TARGET, dst_offset);
81
78
   OUT_BATCH(color);
82
 
   FLUSH_BATCH(NULL);
83
79
}
84
80
 
85
81
void
86
82
i915_copy_blit(struct i915_context *i915,
87
 
               unsigned do_flip,
88
83
               unsigned cpp,
89
84
               unsigned short src_pitch,
90
 
               struct intel_buffer *src_buffer,
 
85
               struct i915_winsys_buffer *src_buffer,
91
86
               unsigned src_offset,
92
87
               unsigned short dst_pitch,
93
 
               struct intel_buffer *dst_buffer,
 
88
               struct i915_winsys_buffer *dst_buffer,
94
89
               unsigned dst_offset,
95
90
               short src_x, short src_y,
96
91
               short dst_x, short dst_y, 
101
96
   int dst_x2 = dst_x + w;
102
97
 
103
98
 
104
 
   I915_DBG(i915,
105
 
      "%s src:buf(%p)/%d+%d %d,%d dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
106
 
      __FUNCTION__,
107
 
      src_buffer, src_pitch, src_offset, src_x, src_y,
108
 
      dst_buffer, dst_pitch, dst_offset, dst_x, dst_y, w, h);
 
99
   I915_DBG(DBG_BLIT,
 
100
            "%s src:buf(%p)/%d+%d %d,%d dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
 
101
            __FUNCTION__,
 
102
            src_buffer, src_pitch, src_offset, src_x, src_y,
 
103
            dst_buffer, dst_pitch, dst_offset, dst_x, dst_y, w, h);
109
104
 
110
105
   switch (cpp) {
111
106
   case 1:
143
138
   OUT_BATCH(BR13);
144
139
   OUT_BATCH((dst_y << 16) | dst_x);
145
140
   OUT_BATCH((dst_y2 << 16) | dst_x2);
146
 
   OUT_RELOC(dst_buffer, INTEL_USAGE_2D_TARGET, dst_offset);
 
141
   OUT_RELOC(dst_buffer, I915_USAGE_2D_TARGET, dst_offset);
147
142
   OUT_BATCH((src_y << 16) | src_x);
148
143
   OUT_BATCH(((int) src_pitch & 0xffff));
149
 
   OUT_RELOC(src_buffer, INTEL_USAGE_2D_SOURCE, src_offset);
150
 
   FLUSH_BATCH(NULL);
 
144
   OUT_RELOC(src_buffer, I915_USAGE_2D_SOURCE, src_offset);
151
145
}