From: Brian Date: Wed, 8 Aug 2007 00:22:40 +0000 (-0600) Subject: clean up tgsi_sampler-related bits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ddd30d8160dc7db5f24a5ac823fd1c64c43b50be;p=mesa.git clean up tgsi_sampler-related bits --- diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.c b/src/mesa/pipe/tgsi/core/tgsi_exec.c index 71dfbc10f31..87dab9956f6 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_exec.c +++ b/src/mesa/pipe/tgsi/core/tgsi_exec.c @@ -65,7 +65,7 @@ tgsi_exec_machine_init( struct tgsi_exec_machine *mach, struct tgsi_token *tokens, GLuint numSamplers, - const struct tgsi_sampler_state *samplers) + const struct tgsi_sampler *samplers) { GLuint i, k; struct tgsi_parse_context parse; @@ -1040,7 +1040,7 @@ exec_kil (struct tgsi_exec_machine *mach, */ static void fetch_texel_1d( GLcontext *ctx, - const struct tgsi_sampler_state *sampler, + const struct tgsi_sampler *sampler, const union tgsi_exec_channel *s, GLuint unit, union tgsi_exec_channel *r, @@ -1097,7 +1097,7 @@ fetch_texel_1d( GLcontext *ctx, */ static void fetch_texel_2d( GLcontext *ctx, - const struct tgsi_sampler_state *sampler, + const struct tgsi_sampler *sampler, const union tgsi_exec_channel *s, const union tgsi_exec_channel *t, GLuint unit, @@ -1166,7 +1166,7 @@ fetch_texel_2d( GLcontext *ctx, */ static void fetch_texel_3d( GLcontext *ctx, - const struct tgsi_sampler_state *sampler, + const struct tgsi_sampler *sampler, const union tgsi_exec_channel *s, const union tgsi_exec_channel *t, const union tgsi_exec_channel *p, diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.h b/src/mesa/pipe/tgsi/core/tgsi_exec.h index b92d1b59189..1c714ad553e 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_exec.h +++ b/src/mesa/pipe/tgsi/core/tgsi_exec.h @@ -21,24 +21,13 @@ struct tgsi_exec_vector union tgsi_exec_channel xyzw[4]; }; -struct tgsi_sampler_state +struct tgsi_sampler { const struct pipe_sampler_state *state; - const struct pipe_mipmap_tree *texture; - void (*get_sample)(const struct tgsi_sampler_state *sampler, + struct pipe_mipmap_tree *texture; + void (*get_sample)(struct tgsi_sampler *sampler, const GLfloat strq[4], GLfloat rgba[4]); - -#if 0 - GLboolean NeedLambda; - GLboolean NeedLodBias; /* if NeedLambda */ - GLboolean NeedLambdaClamp; /* if NeedLambda */ - GLfloat LodBias; /* if NeedLodBias */ - GLfloat MinLod; /* if NeedLambdaClamp */ - GLfloat MaxLod; /* if NeedLambdaClamp */ - GLfloat ImageWidth; - GLfloat ImageHeight; - GLfloat ImageDepth; -#endif + void *pipe; /*XXX temporary*/ }; struct tgsi_exec_labels @@ -124,7 +113,7 @@ struct tgsi_exec_machine struct tgsi_exec_vector *Temps; struct tgsi_exec_vector *Addrs; - const struct tgsi_sampler_state *Samplers; + struct tgsi_sampler *Samplers; GLfloat Imms[256][4]; GLuint ImmLimit; @@ -147,7 +136,7 @@ tgsi_exec_machine_init( struct tgsi_exec_machine *mach, struct tgsi_token *tokens, GLuint numSamplers, - const struct tgsi_sampler_state *samplers); + const struct tgsi_sampler *samplers); void tgsi_exec_prepare(