summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-02-20 12:58:47 -0800
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-04-17 12:37:40 +0200
commitc4cc666488693b80c54b225713f5091ad87dcbc0 (patch)
tree7f66332252879e065c52a07c503daaf3b37356f4
parentf4e4f2397dc518d39dc116d82b7a4cd55bf06e0d (diff)
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> (cherry picked from commit 92a204b493b447b1cbb06a3d2d350a1e6d2c6887)
-rw-r--r--src/mesa/main/context.c1
-rw-r--r--src/mesa/main/points.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index de385cdcd1..203fb7fd9a 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1037,7 +1037,6 @@ _mesa_initialize_context(struct gl_context *ctx,
case API_OPENGLES2:
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
- ctx->Point.PointSprite = GL_TRUE; /* always on for ES 2.x */
break;
}
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 538f3cf444..ae517aeb12 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -259,7 +259,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 */