From: Stéphane Marchesin Date: Tue, 8 Oct 2013 03:49:35 +0000 (-0700) Subject: i915g: Rename sampler to fragment_sampler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20bf508a42b0fdd5b094842b1bbeb412ce3f8505;p=mesa.git i915g: Rename sampler to fragment_sampler Otherwise it is fairly confusing. --- diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h index 0c0555c7172..c786fef7f47 100644 --- a/src/gallium/drivers/i915/i915_context.h +++ b/src/gallium/drivers/i915/i915_context.h @@ -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; diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index ae4ad04826b..a858a2589b8 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -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; } diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c index a6e4724c538..86234fc4e5d 100644 --- a/src/gallium/drivers/i915/i915_state_sampler.c +++ b/src/gallium/drivers/i915/i915_state_sampler.c @@ -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]); } diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c index 48d4857563a..bd20a5330aa 100644 --- a/src/gallium/drivers/i915/i915_surface.c +++ b/src/gallium/drivers/i915/i915_surface.c @@ -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);