From f9e331a574cc4eba60e0de5a29a4aed4bb40520c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 14 Aug 2007 13:04:07 -0600 Subject: Implement remaining mipmap modes for 2D textures. Also, add lodbias param to get_samples() --- src/mesa/pipe/tgsi/core/tgsi_exec.c | 9 +++++---- src/mesa/pipe/tgsi/core/tgsi_exec.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe/tgsi') diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.c b/src/mesa/pipe/tgsi/core/tgsi_exec.c index 03b3b49e2b..0a34754c40 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_exec.c +++ b/src/mesa/pipe/tgsi/core/tgsi_exec.c @@ -1044,6 +1044,7 @@ fetch_texel( struct tgsi_sampler *sampler, const union tgsi_exec_channel *s, const union tgsi_exec_channel *t, const union tgsi_exec_channel *p, + float lodbias, union tgsi_exec_channel *r, union tgsi_exec_channel *g, union tgsi_exec_channel *b, @@ -1052,7 +1053,7 @@ fetch_texel( struct tgsi_sampler *sampler, GLuint j; GLfloat rgba[NUM_CHANNELS][QUAD_SIZE]; - sampler->get_samples(sampler, s->f, t->f, p->f, rgba); + sampler->get_samples(sampler, s->f, t->f, p->f, lodbias, rgba); for (j = 0; j < 4; j++) { r->f[j] = rgba[0][j]; @@ -1608,7 +1609,7 @@ exec_instruction( } fetch_texel(&mach->Samplers[unit], - &r[0], NULL, NULL, + &r[0], NULL, NULL, 0.0, &r[0], &r[1], &r[2], &r[3]); break; @@ -1633,7 +1634,7 @@ exec_instruction( } fetch_texel(&mach->Samplers[unit], - &r[0], &r[1], NULL, + &r[0], &r[1], NULL, 0.0, &r[0], &r[1], &r[2], &r[3]); break; @@ -1660,7 +1661,7 @@ exec_instruction( } fetch_texel(&mach->Samplers[unit], - &r[0], &r[1], &r[2], + &r[0], &r[1], &r[2], 0.0, &r[0], &r[1], &r[2], &r[3]); break; diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.h b/src/mesa/pipe/tgsi/core/tgsi_exec.h index 4e6fef5724..b3ed124d3f 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_exec.h +++ b/src/mesa/pipe/tgsi/core/tgsi_exec.h @@ -37,6 +37,7 @@ struct tgsi_sampler const GLfloat s[QUAD_SIZE], const GLfloat t[QUAD_SIZE], const GLfloat p[QUAD_SIZE], + GLfloat lodbias, GLfloat rgba[NUM_CHANNELS][QUAD_SIZE]); void *pipe; /*XXX temporary*/ -- cgit v1.2.3