diff options
author | Ilia Mirkin <[email protected]> | 2017-02-01 16:11:41 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-02-02 20:28:27 -0500 |
commit | e73f87fcbdcb12b0b8d28c4ca3444bfb7669bca5 (patch) | |
tree | e64c2a5f11c08fcf541f7368df25b09169721373 | |
parent | 6cc3c46f58255839d3fe25303225dc3b41d4a2d3 (diff) |
vbo: process buffer binding state changes on draw when recording
The VBO module keeps track of any vbo buffers. It updates this list when
receiving an InvalidateState call, however this never happens when
recording draws right now. Make sure that we do all the usual state
updates when recording draws so that the VBO list may be kept up to
date.
Signed-off-by: Ilia Mirkin <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99631
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Cc: "13.0 17.0" <[email protected]>
-rw-r--r-- | src/mesa/vbo/vbo_save_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index f648ccc47fa..f8dab0cdaa7 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -78,6 +78,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/api_arrayelt.h" #include "main/vtxfmt.h" #include "main/dispatch.h" +#include "main/state.h" #include "util/bitscan.h" #include "vbo_context.h" @@ -1159,6 +1160,9 @@ _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count) if (save->out_of_memory) return; + /* Make sure to process any VBO binding changes */ + _mesa_update_state(ctx); + _ae_map_vbos(ctx); vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK @@ -1202,6 +1206,9 @@ _save_OBE_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, if (save->out_of_memory) return; + /* Make sure to process any VBO binding changes */ + _mesa_update_state(ctx); + _ae_map_vbos(ctx); if (_mesa_is_bufferobj(indexbuf)) |