i915g: Make the pipe_sampler_state struct non const and get rid of useless memcpy.
authorStéphane Marchesin <marcheu@chromium.org>
Thu, 15 Dec 2011 20:59:58 +0000 (12:59 -0800)
committerStéphane Marchesin <marcheu@chromium.org>
Tue, 20 Dec 2011 02:28:26 +0000 (18:28 -0800)
src/gallium/drivers/i915/i915_context.h
src/gallium/drivers/i915/i915_state.c

index bb1b3b1608a55ca87459535652eca6f77b5ac3d8..fb511853e720837471fc240896fe452b6adfdaca 100644 (file)
@@ -202,7 +202,7 @@ struct i915_rasterizer_state {
 };
 
 struct i915_sampler_state {
-   const struct pipe_sampler_state templ;
+   struct pipe_sampler_state templ;
    unsigned state[3];
    unsigned minlod;
    unsigned maxlod;
index fc0c86855603b6301d20fc529d17ab2a51e004d2..853468c6ffd5101179cab7746e7c93fed8c6281b 100644 (file)
@@ -223,7 +223,7 @@ i915_create_sampler_state(struct pipe_context *pipe,
    unsigned minFilt, magFilt;
    unsigned mipFilt;
 
-   memcpy(&cso->templ, sampler, sizeof(struct pipe_sampler_state));
+   cso->templ = *sampler;
 
    mipFilt = translate_mip_filter(sampler->min_mip_filter);
    minFilt = translate_img_filter( sampler->min_img_filter );