[Mesa-dev] [PATCH 1/2] mesa: Fix setup of ctx->Point.PointSprite for GLES2.
Ian Romanick
idr at freedesktop.org
Fri Feb 22 13:23:11 PST 2013
On 02/20/2013 04:58 PM, Eric Anholt wrote:
> 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.
Strong work! This series (notably patch 2) fixes the last gles2conform
failure on Ironlake!
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/main/context.c | 1 -
> src/mesa/main/points.c | 3 ++-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index e5ed97f..02acfc2 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -1073,7 +1073,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 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 */
>
More information about the mesa-dev
mailing list