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

Author: Stéphane Marchesin <marc...@chromium.org>
Date:   Fri Jun 24 19:51:25 2011 -0700

i915g: always upload the vs constants.

This fixes a crash in llvm draw.

---

 src/gallium/drivers/i915/i915_context.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_context.c 
b/src/gallium/drivers/i915/i915_context.c
index 6d2e104..0d18c7a 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -73,15 +73,13 @@ i915_draw_vbo(struct pipe_context *pipe, const struct 
pipe_draw_info *info)
       mapped_indices = i915_buffer(i915->index_buffer.buffer)->data;
    draw_set_mapped_index_buffer(draw, mapped_indices);
 
-   if (cbuf_dirty) {
-      if (i915->constants[PIPE_SHADER_VERTEX])
-         draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
-                                         
i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data,
-                                         
(i915->current.num_user_constants[PIPE_SHADER_VERTEX] * 
-                                         4 * sizeof(float)));
-      else
-         draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0);
-   }
+   if (i915->constants[PIPE_SHADER_VERTEX])
+      draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
+                                      
i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data,
+                                      
(i915->current.num_user_constants[PIPE_SHADER_VERTEX] * 
+                                      4 * sizeof(float)));
+   else
+      draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0);
 
    /*
     * Do the drawing

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to