Mesa (master): i915g: don't validate a NULL vbo

Daniel Vetter danvet at kemper.freedesktop.org
Thu Mar 10 22:27:24 UTC 2011


Module: Mesa
Branch: master
Commit: b0dd74aaf730f59d5d29db71a3617ab9eb1cb62f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0dd74aaf730f59d5d29db71a3617ab9eb1cb62f

Author: Daniel Vetter <daniel.vetter at ffwll.ch>
Date:   Sat Mar  5 23:17:56 2011 +0100

i915g: don't validate a NULL vbo

With the new clear code this is possible (if the app call glClear
before drawing the first primitive).

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

---

 src/gallium/drivers/i915/i915_state_emit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index 15350c0..324a8a3 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -119,7 +119,7 @@ validate_immediate(struct i915_context *i915, unsigned *batch_space)
                      1 << I915_IMMEDIATE_S5 | 1 << I915_IMMEDIATE_S6) &
                     i915->immediate_dirty;
 
-   if (i915->immediate_dirty & (1 << I915_IMMEDIATE_S0))
+   if (i915->immediate_dirty & (1 << I915_IMMEDIATE_S0) && i915->vbo)
       i915->validation_buffers[i915->num_validation_buffers++] = i915->vbo;
 
    *batch_space = 1 + util_bitcount(dirty);




More information about the mesa-commit mailing list