Mesa (master): i915g: Cleanup the vertex sampler interface a bit.

Stephane Marchesin marcheu at kemper.freedesktop.org
Tue Oct 25 14:37:43 PDT 2011


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

Author: Stéphane Marchesin <marcheu at chromium.org>
Date:   Tue Oct 18 10:26:04 2011 -0700

i915g: Cleanup the vertex sampler interface a bit.

---

 src/gallium/drivers/i915/i915_context.c |    4 +---
 src/gallium/drivers/i915/i915_context.h |    4 +---
 src/gallium/drivers/i915/i915_state.c   |    6 +++---
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index ff6d715..5a61740 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -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
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index 7f67f5f..7406b7e 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -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);
 
 
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index f018f52..bb4089e 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -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)



More information about the mesa-commit mailing list