vbo: return a GL error earlier in vbo_save_playback_vertex_list_gallium
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
This commit is contained in:
parent
fa2c39df0f
commit
97caca6b47
|
@ -208,6 +208,12 @@ vbo_save_playback_vertex_list_gallium(struct gl_context *ctx,
|
|||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
/* Return precomputed GL errors such as invalid shaders. */
|
||||
if (!ctx->ValidPrimMask) {
|
||||
_mesa_error(ctx, ctx->DrawGLError, "glCallList");
|
||||
return DONE;
|
||||
}
|
||||
|
||||
/* Use the slow path when there are vertex inputs without vertex
|
||||
* elements. This happens with zero-stride attribs and non-fixed-func
|
||||
* shaders.
|
||||
|
@ -225,12 +231,6 @@ vbo_save_playback_vertex_list_gallium(struct gl_context *ctx,
|
|||
struct pipe_vertex_state *state = node->merged.gallium.state[mode];
|
||||
struct pipe_draw_vertex_state_info info = node->merged.gallium.info;
|
||||
|
||||
/* Return precomputed GL errors such as invalid shaders. */
|
||||
if (!ctx->ValidPrimMask) {
|
||||
_mesa_error(ctx, ctx->DrawGLError, "glCallList");
|
||||
return DONE;
|
||||
}
|
||||
|
||||
if (node->merged.gallium.ctx == ctx) {
|
||||
/* This mechanism allows passing references to the driver without
|
||||
* using atomics to increase the reference count.
|
||||
|
|
Loading…
Reference in New Issue