summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_sf.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2011-08-24 19:04:31 -0700
committerPaul Berry <stereotype441@gmail.com>2011-09-06 11:04:53 -0700
commitbbc53d6285efc664b9b9f326cdcd82a9414507c1 (patch)
treea3dfa042cbf96dff005d4cbf50507701e16fabef /src/mesa/drivers/dri/i965/brw_sf.c
parent58d9c95b3cb54383d07ca5560a1685fbe8588860 (diff)
downloadexternal_mesa3d-bbc53d6285efc664b9b9f326cdcd82a9414507c1.zip
external_mesa3d-bbc53d6285efc664b9b9f326cdcd82a9414507c1.tar.gz
external_mesa3d-bbc53d6285efc664b9b9f326cdcd82a9414507c1.tar.bz2
i965: SF: Remove unnecessary variables.
This patch removes the variables nr_attrs and nr_setup_attrs, whose purpose is now being served by the VUE map. nr_attr_regs and nr_setup_regs are still needed, however they are now computed using the VUE map rather than by counting the number of vertex shader outputs (which caused subtle bugs when gl_PointSize was written). Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sf.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index ecbc9fd..e9cd020 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -63,13 +63,11 @@ static void compile_sf_prog( struct brw_context *brw,
brw_init_compile(brw, &c.func, mem_ctx);
c.key = *key;
- c.nr_attrs = brw_count_bits(c.key.attrs);
- c.nr_attr_regs = (c.nr_attrs+1)/2;
- c.nr_setup_attrs = brw_count_bits(c.key.attrs);
- c.nr_setup_regs = (c.nr_setup_attrs+1)/2;
brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip,
c.key.do_twoside_color, c.key.attrs);
c.urb_entry_read_offset = brw_sf_compute_urb_entry_read_offset(intel);
+ c.nr_attr_regs = (c.vue_map.num_slots + 1)/2 - c.urb_entry_read_offset;
+ c.nr_setup_regs = c.nr_attr_regs;
c.prog_data.urb_read_length = c.nr_attr_regs;
c.prog_data.urb_entry_size = c.nr_setup_regs * 2;