mesa: Correct the is_vertex_position decision for dlists.
We have to use _mesa_inside_dlist_begin_end instead of _mesa_inside_begin_end to see if we are inside a glBegin/glEnd block in case of display lists. So split the is_vertex_position function used in vertex attribute processing into a imm and dlist variant and use the appropriate _mesa_inside_begin_end variant. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
@@ -522,20 +522,6 @@ TAG(MultiTexCoord4fv)(GLenum target, const GLfloat * v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If index=0, does glVertexAttrib*() alias glVertex() to emit a vertex?
|
|
||||||
* It depends on a few things, including whether we're inside or outside
|
|
||||||
* of glBegin/glEnd.
|
|
||||||
*/
|
|
||||||
static inline bool
|
|
||||||
is_vertex_position(const struct gl_context *ctx, GLuint index)
|
|
||||||
{
|
|
||||||
return (index == 0 &&
|
|
||||||
_mesa_attr_zero_aliases_vertex(ctx) &&
|
|
||||||
_mesa_inside_begin_end(ctx));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void GLAPIENTRY
|
static void GLAPIENTRY
|
||||||
TAG(VertexAttrib1fARB)(GLuint index, GLfloat x)
|
TAG(VertexAttrib1fARB)(GLuint index, GLfloat x)
|
||||||
{
|
{
|
||||||
|
@@ -457,6 +457,20 @@ vbo_exec_begin_vertices(struct gl_context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If index=0, does glVertexAttrib*() alias glVertex() to emit a vertex?
|
||||||
|
* It depends on a few things, including whether we're inside or outside
|
||||||
|
* of glBegin/glEnd.
|
||||||
|
*/
|
||||||
|
static inline bool
|
||||||
|
is_vertex_position(const struct gl_context *ctx, GLuint index)
|
||||||
|
{
|
||||||
|
return (index == 0 &&
|
||||||
|
_mesa_attr_zero_aliases_vertex(ctx) &&
|
||||||
|
_mesa_inside_begin_end(ctx));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This macro is used to implement all the glVertex, glColor, glTexCoord,
|
* This macro is used to implement all the glVertex, glColor, glTexCoord,
|
||||||
* glVertexAttrib, etc functions.
|
* glVertexAttrib, etc functions.
|
||||||
|
@@ -979,6 +979,20 @@ reset_vertex(struct gl_context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If index=0, does glVertexAttrib*() alias glVertex() to emit a vertex?
|
||||||
|
* It depends on a few things, including whether we're inside or outside
|
||||||
|
* of glBegin/glEnd.
|
||||||
|
*/
|
||||||
|
static inline bool
|
||||||
|
is_vertex_position(const struct gl_context *ctx, GLuint index)
|
||||||
|
{
|
||||||
|
return (index == 0 &&
|
||||||
|
_mesa_attr_zero_aliases_vertex(ctx) &&
|
||||||
|
_mesa_inside_dlist_begin_end(ctx));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ERROR(err) _mesa_compile_error(ctx, err, __func__);
|
#define ERROR(err) _mesa_compile_error(ctx, err, __func__);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user