summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2016-08-14 14:03:58 +0200
committerMathias Fröhlich <[email protected]>2016-08-15 07:10:39 +0200
commit72f1566f90c434c7752d8405193eec68d6743246 (patch)
treefc9e3dd3733a09b5247dd39156c769e554cea206 /src/mesa/main
parentb7b0c51f1fd54c666e9520e1166e24216cc72211 (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_validate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index ec3cc1b9853..ae3e118f426 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -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;
}