summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-07 18:22:16 -0600
committerBrian <[email protected]>2007-08-07 18:24:30 -0600
commite4b5265487c3d912ea84511064681e02f3e2a5ba (patch)
treef6ed06e1f38028b5baf2401637cd44e4b0166acb /src
parent0dc4eea64f56cc93e5359372b08b99a2d600273c (diff)
use new tex filtering code
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/softpipe/Makefile1
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_fs.c24
2 files changed, 9 insertions, 16 deletions
diff --git a/src/mesa/pipe/softpipe/Makefile b/src/mesa/pipe/softpipe/Makefile
index 3e815aa4673..feb167405a3 100644
--- a/src/mesa/pipe/softpipe/Makefile
+++ b/src/mesa/pipe/softpipe/Makefile
@@ -30,6 +30,7 @@ DRIVER_SOURCES = \
sp_state_setup.c \
sp_state_surface.c \
sp_tex_layout.c \
+ sp_tex_sample.c \
sp_surface.c
C_SOURCES = \
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index 8eedb2ecc84..e55bfd97258 100644
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -37,6 +37,7 @@
#include "sp_context.h"
#include "sp_headers.h"
#include "sp_quad.h"
+#include "sp_tex_sample.h"
#include "tgsi/core/tgsi_core.h"
#if 0
@@ -129,24 +130,13 @@ 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.
*/
static void
shade_quad( struct quad_stage *qs, struct quad_header *quad )
{
- const struct softpipe_context *softpipe = qs->softpipe;
+ struct softpipe_context *softpipe = qs->softpipe;
struct exec_machine exec;
const GLfloat fx = quad->x0;
const GLfloat fy = quad->y0;
@@ -206,7 +196,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];
+ struct tgsi_sampler samplers[8];
GLuint i;
#if !ALIGNED_ATTRIBS
@@ -221,7 +211,8 @@ shade_quad( struct quad_stage *qs, struct quad_header *quad )
#if 11 /* temp sampler setup */
samplers[0].state = &softpipe->sampler[0];
samplers[0].texture = softpipe->texture[0];
- samplers[0].get_sample = get_sample;
+ samplers[0].get_sample = sp_get_sample;
+ samplers[0].pipe = &softpipe->pipe;
#endif
/* init machine state */
@@ -251,10 +242,11 @@ shade_quad( struct quad_stage *qs, struct quad_header *quad )
/* load input registers */
for (i = 0; i < softpipe->nr_attrs; i++) {
-#if 0
+#if 01
/* Make sure fp_attr_to_slot[] is an identity transform. */
+ /*
assert( softpipe->fp_attr_to_slot[i] == i );
-
+ */
memcpy(
&ainputs[i],
exec.attr[i],