i915g: Rename sampler to fragment_sampler
authorStéphane Marchesin <marcheu@chromium.org>
Tue, 8 Oct 2013 03:49:35 +0000 (20:49 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Tue, 8 Oct 2013 03:53:55 +0000 (20:53 -0700)
Otherwise it is fairly confusing.

src/gallium/drivers/i915/i915_context.h
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/i915/i915_state_sampler.c
src/gallium/drivers/i915/i915_surface.c

index 0c0555c7172be8d598b7d1286bde7fd6d8c25d86..c786fef7f47b14caae2a3c1bb373d9b1ea86f10a 100644 (file)
@@ -227,8 +227,8 @@ struct i915_context {
    /* The most recent drawing state as set by the driver:
     */
    const struct i915_blend_state           *blend;
-   const struct i915_sampler_state         *sampler[PIPE_MAX_SAMPLERS];
-   struct pipe_sampler_state *vertex_samplers[PIPE_MAX_SAMPLERS];
+   const struct i915_sampler_state         *fragment_sampler[PIPE_MAX_SAMPLERS];
+   struct pipe_sampler_state               *vertex_samplers[PIPE_MAX_SAMPLERS];
    const struct i915_depth_stencil_state   *depth_stencil;
    const struct i915_rasterizer_state      *rasterizer;
 
index ae4ad04826bc8391297844aac0f8e020e4d4f633..a858a2589b8efe48d963f8415cd557709ff796a0 100644 (file)
@@ -337,17 +337,17 @@ static void i915_bind_fragment_sampler_states(struct pipe_context *pipe,
 
    /* Check for no-op */
    if (num == i915->num_samplers &&
-       !memcmp(i915->sampler + start, samplers,
+       !memcmp(i915->fragment_sampler + start, samplers,
                num * sizeof(void *)))
       return;
 
    for (i = 0; i < num; ++i)
-      i915->sampler[i + start] = samplers[i];
+      i915->fragment_sampler[i + start] = samplers[i];
 
    /* find highest non-null samplers[] entry */
    {
       unsigned j = MAX2(i915->num_samplers, start + num);
-      while (j > 0 && i915->sampler[j - 1] == NULL)
+      while (j > 0 && i915->fragment_sampler[j - 1] == NULL)
          j--;
       i915->num_samplers = j;
    }
index a6e4724c53831d2fec106b441ba2283432a59c50..86234fc4e5d58999f7c7262bd48cc9e7fd0e6e84 100644 (file)
@@ -161,13 +161,13 @@ static void update_samplers(struct i915_context *i915)
 
          update_sampler(i915,
                         unit,
-                        i915->sampler[unit],          /* sampler state */
+                        i915->fragment_sampler[unit], /* sampler state */
                         texture,                      /* texture */
                         i915->current.sampler[unit]); /* the result */
          update_map(i915,
                     unit,
                     texture,                             /* texture */
-                    i915->sampler[unit],                 /* sampler state */
+                    i915->fragment_sampler[unit],        /* sampler state */
                     i915->fragment_sampler_views[unit],  /* sampler view */
                     i915->current.texbuffer[unit]);      /* the result */
 
@@ -357,7 +357,7 @@ static void update_maps(struct i915_context *i915)
          update_map(i915,
                     unit,
                     texture,                            /* texture */
-                    i915->sampler[unit],                /* sampler state */
+                    i915->fragment_sampler[unit],       /* sampler state */
                     i915->fragment_sampler_views[unit], /* sampler view */
                     i915->current.texbuffer[unit]);
       }
index 48d4857563a23a72f7055da0778ffcab8fe4f5aa..bd20a5330aaa86a7309e0ef5dcda85bb554ed991 100644 (file)
@@ -62,7 +62,7 @@ i915_util_blitter_save_states(struct i915_context *i915)
 
    util_blitter_save_fragment_sampler_states(i915->blitter,
                                              i915->num_samplers,
-                                             (void**)i915->sampler);
+                                             (void**)i915->fragment_sampler);
    util_blitter_save_fragment_sampler_views(i915->blitter,
                                             i915->num_fragment_sampler_views,
                                             i915->fragment_sampler_views);