~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i965/brw_gs.c

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2011-06-06 16:51:56 UTC
  • mfrom: (1.2.35 upstream) (3.3.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110606165156-c6632o2ttkrgwcr6
Tags: 7.10.3-0ubuntu1
* New upstream 7.10.3 bugfix release.
 - Fixes infinite loop in GLSL compiler (LP: #788730)
* Merge with Debian unstable.  Remaining Ubuntu changes:
 - debian/control
    + Drop lesstif-dev from Build-Depends; it's in Universe.
    + Comment out GLw libs since it depends on lesstif-dev.
    + Drop i686 swx11 libgl package.
    + Add libdrm-dev to mesa-common-dev Depends.
  - debian/rules
    + Use --disable-glw for swx11 targets too.
    + Don't enable motif for swx11 targets.
    + Use lzma compression for binary debs to save CD space.
    + Drop unloved mach64 driver.
    + Install both r300/r300g and r600/r600g
    + Use --enable-shared-dricore to claw back CD space.
  - debian/patches
    + 100_no_abi_tag.patch
    + 101_ubuntu_hidden_glname.patch
    + 103_savage-expose_fbmodes_with_nonzero_alpha.patch
  - rules, libgl1-mesa-{glx,dev,swx11,swx11-dev}.install.in,
    libgl1-mesa-{glx,swx11}.{postinst,prerm}, libgl1-mesa-dev.links.in:
    Install libGL.so* in /usr/lib/mesa to allow things to work with
    alternatives.
  - debian/not-installed:
    + Drop i686 files; we don't build 686-optimised packages in the first
      place.
  - debian/gbp.conf
    + Point at Ubuntu branch to make git-buildpackage less narky.
  - debian/patches/105_use_shared_libdricore.patch, debian/rules:
    + Link DRI drivers against shared dricore routines to save CD space.
  - debian/patches/109_fix_length_of_glxgetfbconfigssgix.patch:
    Fix "BadLength (poly request too large or internal Xlib length" 
    when using non-C, non-en locales.  (LP 714280)
  - debian/patches/108_fix_leaks_dri2_screen_creation.patch: Cherrypick
    to fix some leaks in DRI2 screen creation failure paths.
  - 114_intel_dri_renderer_string.diff: Re-add "GEM" to the dri renderer
    string of the intel driver. (LP 753370)
  - 113_fix_tls.diff: Fix crashes in unrelated code due to TLS usage.
* debian/rules:
* debian/libgl1-mesa-dri-experimental.install.in:
  - Ship i915g in the experimental package.  We're already building it,
    and it's apparently now comparable to i915c.
* debian/control:
* debian/libgl1-mesa-dri-experimental.install.in:
* debian/libgl1-mesa-dri.install.linux.in:
  - Move nouveau gallium driver from -dri-experimental to -dri.  Upstream
    is no longer adamant that bugs should be ignored.  Try installing it by
    default to get a better Unity experience OOTB. (LP: #759562)
* debian/libgl1-mesa-dri-experimental.install.in:
* debian/libgl1-mesa-dri.install.linux.in:
  - Move r300/r600 classic drivers to -experimental.  They're not supported.
    Shave another ~1MB off the CD!
* debian/control:
  - Add new bison and flex build-depends.
* debian/patches/115_llvm_dynamic_linking.diff
  - Dynamically link DRI drivers to libllvm.  Saves ~6MiB per DRI driver.
* debian/rules:
* debian/patches/116_use_shared_galliumcore.diff:
* debian/libgl1-mesa-dri.install.in:
  - Link gallium DRI drivers against shared gallium routines to save CD
    space.
* Merge multiarch support branch:
  - Declare Breaks: against old versions of xserver-xorg-core and
    libgl1-mesa-glx that will look for DRI modules only in /usr/lib/dri.
  - Fix up the maintainer scripts to transition to per-architecture
    alternatives for ld.so configs.
  - Declare Breaks: against nvidia-current, nvidia-173, and fglrx due to the
    migration of alternatives for the ld.so.conf snippets.
  - Use multiarch dirs for our dri module search path, with a fallback to
    /usr/lib/dri.
  - Use the right path for dh_shlibdeps.  
* debian/patches/117_handle_dri2connect_errors_when_indirect.diff:
  - Handle BadRequest X protocol errors which DRI2 throws when remote
    clients attempt to connect so that mesa can fall back to a codepath
    that works. (LP: #785368)

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
   /* Note that primitives which don't require a GS program have
84
84
    * already been weeded out by this stage:
85
85
    */
 
86
 
 
87
   /* Gen6: VF has already converted into polygon, and LINELOOP is
 
88
    * converted to LINESTRIP at the beginning of the 3D pipeline.
 
89
    */
 
90
   if (intel->gen == 6)
 
91
      return;
 
92
 
86
93
   switch (key->primitive) {
87
94
   case GL_QUADS:
88
 
      /* Gen6: VF has already converted into polygon. */
89
 
      if (intel->gen == 6)
90
 
          return;
91
95
      brw_gs_quads( &c, key );
92
96
      break;
93
97
   case GL_QUAD_STRIP:
94
 
      if (intel->gen == 6)
95
 
          return;
96
98
      brw_gs_quad_strip( &c, key );
97
99
      break;
98
100
   case GL_LINE_LOOP:
99
 
      /* Gen6: LINELOOP is converted to LINESTRIP at the beginning of the 3D pipeline */
100
 
      if (intel->gen == 6)
101
 
          return;
102
101
      brw_gs_lines( &c );
103
102
      break;
104
 
   case GL_LINES:
105
 
      if (key->hint_gs_always)
106
 
         brw_gs_lines( &c );
107
 
      else {
108
 
         return;
109
 
      }
110
 
      break;
111
 
   case GL_TRIANGLES:
112
 
      if (key->hint_gs_always)
113
 
         brw_gs_tris( &c );
114
 
      else {
115
 
         return;
116
 
      }
117
 
      break;
118
 
   case GL_POINTS:
119
 
      if (key->hint_gs_always)
120
 
         brw_gs_points( &c );
121
 
      else {
122
 
         return;
123
 
      }
124
 
      break;      
125
103
   default:
126
104
      return;
127
105
   }
170
148
{
171
149
   struct gl_context *ctx = &brw->intel.ctx;
172
150
   struct intel_context *intel = &brw->intel;
173
 
   int prim_gs_always;
174
151
 
175
152
   memset(key, 0, sizeof(*key));
176
153
 
180
157
   /* BRW_NEW_PRIMITIVE */
181
158
   key->primitive = gs_prim[brw->primitive];
182
159
 
183
 
   key->hint_gs_always = 0;     /* debug code? */
184
 
   
185
160
   /* _NEW_LIGHT */
186
161
   key->pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
187
162
   if (key->primitive == GL_QUADS && ctx->Light.ShadeModel != GL_FLAT) {
191
166
      key->pv_first = GL_TRUE;
192
167
   }
193
168
 
194
 
   if (intel->gen == 6)
195
 
       prim_gs_always = 0;
196
 
   else
197
 
       prim_gs_always = brw->primitive == GL_QUADS ||
198
 
                        brw->primitive == GL_QUAD_STRIP ||
199
 
                        brw->primitive == GL_LINE_LOOP;
200
 
 
201
 
   key->need_gs_prog = (key->hint_gs_always || prim_gs_always);
 
169
   key->need_gs_prog = (intel->gen == 6)
 
170
      ? 0
 
171
      : (brw->primitive == GL_QUADS ||
 
172
         brw->primitive == GL_QUAD_STRIP ||
 
173
         brw->primitive == GL_LINE_LOOP);
202
174
}
203
175
 
204
176
/* Calculate interpolants for triangle and line rasterization.