mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
mesa: Move check for vbo mapping into api_validate.c.
Instead of checking for mapped buffers in vbo_bind_arrays do this check in api_validate.c. This additionally enables printing the draw calls name into the error string. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
b7b0c51f1f
commit
72f1566f90
2 changed files with 8 additions and 7 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include <stdbool.h>
|
||||
#include "glheader.h"
|
||||
#include "api_validate.h"
|
||||
#include "arrayobj.h"
|
||||
#include "bufferobj.h"
|
||||
#include "context.h"
|
||||
#include "imports.h"
|
||||
|
|
@ -119,6 +120,12 @@ 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -396,13 +396,7 @@ vbo_bind_arrays(struct gl_context *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
if (!_mesa_all_buffers_are_unmapped(ctx->Array.VAO)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"draw call (vertex buffers are mapped)");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue