summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-10 09:47:37 -0700
committerBrian Paul <[email protected]>2011-11-11 07:10:56 -0700
commit97dedfda5fbb4078db28519e50adeeeb8e1a1dc1 (patch)
tree2620b2c03120e2e748d3798b1aa5f3ea6c909712 /src/mesa/vbo/vbo_exec.h
parente6c4159372310110ec81273c5d15481c903fefed (diff)
vbo: better handling of VBO allocation failures
Previously, if we failed to allocate a VBO (either for display list compilation or immediate mode rendering) we'd eventually segfault when trying to map the non-existant buffer or in a glVertex/Color/etc call when we hit a null pointer. Now we don't try to map non-existant buffers and if we do fail to allocate a VBO we plug in no-op functions for glVertex/Color/etc so we don't segfault.
Diffstat (limited to 'src/mesa/vbo/vbo_exec.h')
-rw-r--r--src/mesa/vbo/vbo_exec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 0b72579a82c..8d6b8f95a7f 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -82,6 +82,7 @@ struct vbo_exec_context
{
struct gl_context *ctx;
GLvertexformat vtxfmt;
+ GLvertexformat vtxfmt_noop;
struct {
struct gl_buffer_object *bufferobj;