i915g: always upload the vs constants.
authorStéphane Marchesin <marcheu@chromium.org>
Sat, 25 Jun 2011 02:51:25 +0000 (19:51 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Sat, 25 Jun 2011 02:59:17 +0000 (19:59 -0700)
This fixes a crash in llvm draw.

src/gallium/drivers/i915/i915_context.c

index 6d2e10470cf7428f3f6d4979344775d175d645ea..0d18c7a76bee614f59533e20dcb0c43f95a6c40d 100644 (file)
@@ -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