Mesa (master): i915g: Make the pipe_sampler_state struct non const and get rid of useless memcpy .
Stephane Marchesin
marcheu at kemper.freedesktop.org
Tue Dec 20 02:33:42 UTC 2011
Module: Mesa
Branch: master
Commit: a7534d8943d74e81299b2ee4edc462baac9d1331
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7534d8943d74e81299b2ee4edc462baac9d1331
Author: Stéphane Marchesin <marcheu at chromium.org>
Date: Thu Dec 15 12:59:58 2011 -0800
i915g: Make the pipe_sampler_state struct non const and get rid of useless memcpy.
---
src/gallium/drivers/i915/i915_context.h | 2 +-
src/gallium/drivers/i915/i915_state.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index bb1b3b1..fb51185 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -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;
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index fc0c868..853468c 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -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 );
More information about the mesa-commit
mailing list