From ddd30d8160dc7db5f24a5ac823fd1c64c43b50be Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 7 Aug 2007 18:22:40 -0600 Subject: clean up tgsi_sampler-related bits --- src/mesa/pipe/tgsi/core/tgsi_exec.c | 8 ++++---- src/mesa/pipe/tgsi/core/tgsi_exec.h | 23 ++++++----------------- 2 files changed, 10 insertions(+), 21 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.c b/src/mesa/pipe/tgsi/core/tgsi_exec.c index 71dfbc10f3..87dab9956f 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 b92d1b5918..1c714ad553 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( -- cgit v1.2.3