summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_sf.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-03-08 12:12:31 -0800
committerEric Anholt <eric@anholt.net>2010-03-08 14:23:18 -0800
commitbc632d04370566c1156cbd0345fe303834f0b910 (patch)
treebd3d39bc412503773b627aae68c0e887371f81db /src/mesa/drivers/dri/i965/brw_sf.h
parent1d84808dc045d7fcf2fade8d1504bc25e7c5041a (diff)
i965: Fix up the handling of point sprite coordinate replacement.
The code was walking over the regs of pairs of attributes and checking whether the attribute with a given reg index had point sprite enabled. So the point sprite setup code was rarely even getting executed. Instead, we need to determine which channels of a reg need point sprite coordinate replacement. In addition, it was multiplying the attribute by 1/w, when it's supposed to cover (0, 1) in each direction regardless of w, and it wasn't filling in the Z and W components of the texcoord as specified. Fixes piglit point-sprite and the spriteblast demo. Bug #24431, #22245.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sf.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf.h b/src/mesa/drivers/dri/i965/brw_sf.h
index 0ba731fac9..a0680a56f2 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.h
+++ b/src/mesa/drivers/dri/i965/brw_sf.h
@@ -46,6 +46,7 @@
struct brw_sf_prog_key {
GLbitfield64 attrs;
+ uint8_t point_sprite_coord_replace;
GLuint primitive:2;
GLuint do_twoside_color:1;
GLuint do_flat_shading:1;
@@ -56,10 +57,6 @@ struct brw_sf_prog_key {
GLuint pad:24;
};
-struct brw_sf_point_tex {
- GLboolean CoordReplace;
-};
-
struct brw_sf_compile {
struct brw_compile func;
struct brw_sf_prog_key key;
@@ -100,7 +97,6 @@ struct brw_sf_compile {
GLubyte attr_to_idx[VERT_RESULT_MAX];
GLubyte idx_to_attr[VERT_RESULT_MAX];
- struct brw_sf_point_tex point_attrs[VERT_RESULT_MAX];
};