mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
mesa: Move buffers-unmapped earlier in check_valid_to_render().
This needs to be above the switch on API, as that can return true
(valid to render) before this error check even had a chance to run.
Fixes ESEXT-CTS.draw_elements_base_vertex_tests.invalid_mapped_bos,
which worked before commit 72f1566f90.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
6b0ba02cae
commit
eaacb27812
1 changed files with 6 additions and 6 deletions
|
|
@ -45,6 +45,12 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!_mesa_all_buffers_are_unmapped(ctx->Array.VAO)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(vertex buffers are mapped)", function);
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (ctx->API) {
|
||||
case API_OPENGLES2:
|
||||
/* For ES2, we can draw if we have a vertex program/shader). */
|
||||
|
|
@ -119,12 +125,6 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
|
|||
unreachable("Invalid API value in check_valid_to_render()");
|
||||
}
|
||||
|
||||
if (!_mesa_all_buffers_are_unmapped(ctx->Array.VAO)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(vertex buffers are mapped)", function);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue