summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915/intel_tris.c
diff options
context:
space:
mode:
authorYuanhan Liu <yuanhan.liu@linux.intel.com>2012-03-17 10:48:23 +0800
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2012-04-09 09:59:17 +0800
commitc6532875493ffe7de9c37924c70ebf6d0472e23d (patch)
treedf8d3f624e3b9ce8f08da5c9f5bfcd2ebfb71419 /src/mesa/drivers/dri/i915/intel_tris.c
parent8b5b3b93d73d80a54d12d0d7a6a74fb97b27bf8a (diff)
downloadexternal_mesa3d-c6532875493ffe7de9c37924c70ebf6d0472e23d.zip
external_mesa3d-c6532875493ffe7de9c37924c70ebf6d0472e23d.tar.gz
external_mesa3d-c6532875493ffe7de9c37924c70ebf6d0472e23d.tar.bz2
i915: set SPRITE_POINT_ENABLE bit correctly
When SPRITE_POINT_ENABLE bit is set, the texture coord would be replaced, and this is only needed when we called something like glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE). And more, we currently handle varying inputs as texture coord, we would be careful when setting this bit and set it just when needed, or you will find the value of varying input is not right and changed. Thus we do set SPRITE_POINT_ENABLE bit only when all enabled tex coord units need do CoordReplace. Or fallback is needed to make sure the rendering is right. With handling the bit setup at i915_update_sprite_point_enable(), we don't need the relative code at i915Enable then. This patch would _really_ fix the webglc point-size.html test case and of course, not regress piglit point-sprite and glean-pointSprite testcase. NOTE: This is a candidate for stable release branches. v2: fallback just when all enabled tex coord units need do CoordReplace (Eric) v3: move the sprite point validate code at I915InvalidateState (Eric) v4: sprite point enable bit update based on _NEW_PROGRAM, too add relative _NEW-state comments to show what state is being used(Eric) Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_tris.c')
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index c802d72..cf67d74 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -1188,6 +1188,7 @@ static char *fallbackStrings[] = {
[19] = "Smooth point",
[20] = "point sprite coord origin",
[21] = "depth/color drawing offset",
+ [22] = "coord replace(SPRITE POINT ENABLE)",
};