summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/points.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-02-20 12:58:47 -0800
committerEric Anholt <eric@anholt.net>2013-02-22 10:55:39 -0800
commit92a204b493b447b1cbb06a3d2d350a1e6d2c6887 (patch)
tree0cfa8df85e050e4fe68a419517d4186cc6343357 /src/mesa/main/points.c
parent7b0731d940c758ca9c1e883cdea454d8787255c1 (diff)
downloadexternal_mesa3d-92a204b493b447b1cbb06a3d2d350a1e6d2c6887.zip
external_mesa3d-92a204b493b447b1cbb06a3d2d350a1e6d2c6887.tar.gz
external_mesa3d-92a204b493b447b1cbb06a3d2d350a1e6d2c6887.tar.bz2
mesa: Fix setup of ctx->Point.PointSprite for GLES2.
The recent change for GL core broke the older setup, which broke gl_PointCoord on pre-gen6 (where gl_PointCoord is undefined if point sprites are disabled). Fixes the new piglit GLES-2.0/glsl-fs-pointcoord test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32429 Note: This is a candidate for the stable branches. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/main/points.c')
-rw-r--r--src/mesa/main/points.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 1778640..c925d4c 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -253,7 +253,8 @@ _mesa_init_point(struct gl_context *ctx)
* In a core context, the state will default to true, and the setters and
* getters are disabled.
*/
- ctx->Point.PointSprite = (ctx->API == API_OPENGL_CORE);
+ ctx->Point.PointSprite = (ctx->API == API_OPENGL_CORE ||
+ ctx->API == API_OPENGLES2);
ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */