vbo: simplify vbo_save_NotifyBegin()
This function always returned GL_TRUE. Just make it a void function. Remove unreachable code following the call to vbo_save_NotifyBegin() in save_Begin() in dlist.c There were some stale comments that no longer applied since an earlier code refactoring. No Piglit regressions. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
@@ -5766,25 +5766,9 @@ save_Begin(GLenum mode)
|
|||||||
_mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive glBegin");
|
_mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive glBegin");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Node *n;
|
|
||||||
|
|
||||||
ctx->Driver.CurrentSavePrimitive = mode;
|
ctx->Driver.CurrentSavePrimitive = mode;
|
||||||
|
|
||||||
/* Give the driver an opportunity to hook in an optimized
|
vbo_save_NotifyBegin(ctx, mode);
|
||||||
* display list compiler.
|
|
||||||
*/
|
|
||||||
if (vbo_save_NotifyBegin(ctx, mode))
|
|
||||||
return;
|
|
||||||
|
|
||||||
SAVE_FLUSH_VERTICES(ctx);
|
|
||||||
n = alloc_instruction(ctx, OPCODE_BEGIN, 1);
|
|
||||||
if (n) {
|
|
||||||
n[1].e = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx->ExecuteFlag) {
|
|
||||||
CALL_Begin(ctx->Exec, (mode));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -90,7 +90,7 @@ vbo_initialize_save_dispatch(const struct gl_context *ctx,
|
|||||||
|
|
||||||
void vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags);
|
void vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags);
|
||||||
void vbo_save_SaveFlushVertices(struct gl_context *ctx);
|
void vbo_save_SaveFlushVertices(struct gl_context *ctx);
|
||||||
GLboolean vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode);
|
void vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode);
|
||||||
void vbo_save_NewList(struct gl_context *ctx, GLuint list, GLenum mode);
|
void vbo_save_NewList(struct gl_context *ctx, GLuint list, GLenum mode);
|
||||||
void vbo_save_EndList(struct gl_context *ctx);
|
void vbo_save_EndList(struct gl_context *ctx);
|
||||||
void vbo_save_BeginCallList(struct gl_context *ctx, struct gl_display_list *list);
|
void vbo_save_BeginCallList(struct gl_context *ctx, struct gl_display_list *list);
|
||||||
|
@@ -1035,7 +1035,7 @@ _save_CallLists(GLsizei n, GLenum type, const GLvoid * v)
|
|||||||
* Called when a glBegin is getting compiled into a display list.
|
* Called when a glBegin is getting compiled into a display list.
|
||||||
* Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
|
* Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
|
||||||
*/
|
*/
|
||||||
GLboolean
|
void
|
||||||
vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
|
vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
|
||||||
{
|
{
|
||||||
struct vbo_save_context *save = &vbo_context(ctx)->save;
|
struct vbo_save_context *save = &vbo_context(ctx)->save;
|
||||||
@@ -1064,11 +1064,6 @@ vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode)
|
|||||||
|
|
||||||
/* We need to call vbo_save_SaveFlushVertices() if there's state change */
|
/* We need to call vbo_save_SaveFlushVertices() if there's state change */
|
||||||
ctx->Driver.SaveNeedFlush = GL_TRUE;
|
ctx->Driver.SaveNeedFlush = GL_TRUE;
|
||||||
|
|
||||||
/* GL_TRUE means we've handled this glBegin here; don't compile a BEGIN
|
|
||||||
* opcode into the display list.
|
|
||||||
*/
|
|
||||||
return GL_TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user