mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 13:40:11 +01:00
mesa: Don't install glEvalMesh in the beginend dispatch table
NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59740 Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
83f7cde182
commit
8b586322e7
3 changed files with 16 additions and 9 deletions
|
|
@ -824,7 +824,8 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
|
|||
|
||||
void
|
||||
_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
|
||||
const GLvertexformat *vfmt)
|
||||
const GLvertexformat *vfmt,
|
||||
bool beginend)
|
||||
{
|
||||
SET_EvalCoord1f(disp, vfmt->EvalCoord1f);
|
||||
SET_EvalCoord1fv(disp, vfmt->EvalCoord1fv);
|
||||
|
|
@ -833,8 +834,12 @@ _mesa_install_eval_vtxfmt(struct _glapi_table *disp,
|
|||
SET_EvalPoint1(disp, vfmt->EvalPoint1);
|
||||
SET_EvalPoint2(disp, vfmt->EvalPoint2);
|
||||
|
||||
SET_EvalMesh1(disp, vfmt->EvalMesh1);
|
||||
SET_EvalMesh2(disp, vfmt->EvalMesh2);
|
||||
/* glEvalMesh1 and glEvalMesh2 are not allowed between glBegin and glEnd.
|
||||
*/
|
||||
if (!beginend) {
|
||||
SET_EvalMesh1(disp, vfmt->EvalMesh1);
|
||||
SET_EvalMesh2(disp, vfmt->EvalMesh2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "main/mfeatures.h"
|
||||
#include "main/mtypes.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) \
|
||||
|
|
@ -76,7 +77,8 @@ extern GLfloat *_mesa_copy_map_points2d(GLenum target,
|
|||
|
||||
extern void
|
||||
_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
|
||||
const GLvertexformat *vfmt);
|
||||
const GLvertexformat *vfmt,
|
||||
bool beginend);
|
||||
|
||||
extern void _mesa_init_eval( struct gl_context *ctx );
|
||||
extern void _mesa_free_eval_data( struct gl_context *ctx );
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
static void
|
||||
install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
|
||||
const GLvertexformat *vfmt)
|
||||
const GLvertexformat *vfmt, bool beginend)
|
||||
{
|
||||
assert(ctx->Version > 0);
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
|
|||
}
|
||||
|
||||
if (ctx->API == API_OPENGL_COMPAT) {
|
||||
_mesa_install_eval_vtxfmt(tab, vfmt);
|
||||
_mesa_install_eval_vtxfmt(tab, vfmt, beginend);
|
||||
}
|
||||
|
||||
if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
|
||||
|
|
@ -251,9 +251,9 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
|
|||
void
|
||||
_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
|
||||
{
|
||||
install_vtxfmt( ctx, ctx->Exec, vfmt );
|
||||
install_vtxfmt(ctx, ctx->Exec, vfmt, false);
|
||||
if (ctx->BeginEnd)
|
||||
install_vtxfmt( ctx, ctx->BeginEnd, vfmt );
|
||||
install_vtxfmt(ctx, ctx->BeginEnd, vfmt, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ void
|
|||
_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
|
||||
{
|
||||
if (_mesa_is_desktop_gl(ctx))
|
||||
install_vtxfmt( ctx, ctx->Save, vfmt );
|
||||
install_vtxfmt(ctx, ctx->Save, vfmt, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue