i915g: Cleanup the vertex sampler interface a bit.
authorStéphane Marchesin <marcheu@chromium.org>
Tue, 18 Oct 2011 17:26:04 +0000 (10:26 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Tue, 25 Oct 2011 21:30:08 +0000 (14:30 -0700)
src/gallium/drivers/i915/i915_context.c
src/gallium/drivers/i915/i915_context.h
src/gallium/drivers/i915/i915_state.c

index ff6d715b72ad532d2fa7da12e2265ccb81ea2a3f..5a61740422b91bd18e7afbf96a0fd7f25be980e0 100644 (file)
@@ -80,9 +80,7 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
       draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0);
 
    if (i915->num_vertex_sampler_views > 0)
-      i915_prepare_vertex_sampling(i915,
-                                   i915->num_vertex_sampler_views,
-                                   i915->vertex_sampler_views);
+      i915_prepare_vertex_sampling(i915);
 
    /*
     * Do the drawing
index 7f67f5f1340e98b0eaebb5f345b75e8046b7418e..7406b7e812feadd7ea49fcc8998897403cd45b18 100644 (file)
@@ -370,9 +370,7 @@ struct draw_stage *i915_draw_vbuf_stage( struct i915_context *i915 );
 /***********************************************************************
  * i915_state.c:
  */
-void i915_prepare_vertex_sampling(struct i915_context *i915,
-                                  unsigned num,
-                                  struct pipe_sampler_view **views);
+void i915_prepare_vertex_sampling(struct i915_context *i915);
 void i915_cleanup_vertex_sampling(struct i915_context *i915);
 
 
index f018f5262468020b9e2c3e5c0b534ce0260844dd..bb4089e2105d101118eaae2af41029c7f6025785 100644 (file)
@@ -364,15 +364,15 @@ static void i915_delete_sampler_state(struct pipe_context *pipe,
  * Called before drawing VBO to map vertex samplers and hand them to draw
  */
 void
-i915_prepare_vertex_sampling(struct i915_context *i915,
-                             unsigned num,
-                             struct pipe_sampler_view **views)
+i915_prepare_vertex_sampling(struct i915_context *i915)
 {
    struct i915_winsys *iws = i915->iws;
    unsigned i,j;
    uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS];
    uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS];
    const void* data[PIPE_MAX_TEXTURE_LEVELS];
+   unsigned num = i915->num_vertex_sampler_views;
+   struct pipe_sampler_view **views = i915->vertex_sampler_views;
 
    assert(num <= PIPE_MAX_VERTEX_SAMPLERS);
    if (!num)