diff options
author | Brian <[email protected]> | 2007-08-07 15:28:12 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-07 15:28:12 -0600 |
commit | adf5560ea5f6955425939df7e75ce9d11ea36511 (patch) | |
tree | bcba217903e9777ab35f67ba00dbb60bce69fdcd /src/mesa/pipe/softpipe | |
parent | ab80be0df126066c441cef5e2042b77fa6e0bdde (diff) |
checkpoint new tgsi_sampler_state struct
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_fs.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c index 66513bb4369..8eedb2ecc84 100644 --- a/src/mesa/pipe/softpipe/sp_quad_fs.c +++ b/src/mesa/pipe/softpipe/sp_quad_fs.c @@ -129,6 +129,16 @@ static INLINE void pinterp( struct exec_machine *exec, } +static void +get_sample(const struct tgsi_sampler_state *sampler, + const GLfloat strq[4], GLfloat rgba[4]) +{ + rgba[0] = 1; + rgba[1] = 1; + rgba[2] = 0; + rgba[3] = 0; +} + /* This should be done by the fragment shader execution unit (code * generated from the decl instructions). Do it here for now. @@ -196,6 +206,7 @@ shade_quad( struct quad_stage *qs, struct quad_header *quad ) struct tgsi_exec_machine machine; struct tgsi_exec_vector outputs[FRAG_ATTRIB_MAX + 1]; struct tgsi_exec_vector *aoutputs; + struct tgsi_sampler_state samplers[8]; GLuint i; #if !ALIGNED_ATTRIBS @@ -207,10 +218,17 @@ shade_quad( struct quad_stage *qs, struct quad_header *quad ) memset(&machine, 0, sizeof(machine)); #endif +#if 11 /* temp sampler setup */ + samplers[0].state = &softpipe->sampler[0]; + samplers[0].texture = softpipe->texture[0]; + samplers[0].get_sample = get_sample; +#endif + /* init machine state */ tgsi_exec_machine_init( &machine, - softpipe->fs.tokens ); + softpipe->fs.tokens, + 8, samplers); /* Consts does not require 16 byte alignment. */ machine.Consts = softpipe->fs.constants->constant; |