diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-08-20 18:36:57 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-08-20 18:36:57 +0100 |
commit | 00c835918259f8d41c3f74eca679a972713b11b2 (patch) | |
tree | f2dc09454abd960fdcc12451181d97b6978d6e09 /src/gallium/drivers/softpipe/sp_tex_sample.h | |
parent | 0d9979d9ec5b931856d29c4ec44edb1f4931d1ac (diff) |
softpipe: allow the existing sampler routines to be hooked up directly
Let eg. sp_get_samples_rect be hooked directly in as the tgsi sampler
routine.
Add a field to determine whether this is a vertex or fragment sampling
call, and massage parameters to match the tgsi call.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.h')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tex_sample.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h index 0650c7830b..c73ae44131 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.h +++ b/src/gallium/drivers/softpipe/sp_tex_sample.h @@ -39,6 +39,8 @@ struct sp_shader_sampler { struct tgsi_sampler base; /**< base class */ + unsigned processor; + /* For sp_get_samples_2d_linear_POT: */ unsigned xpot; @@ -60,21 +62,14 @@ sp_shader_sampler(const struct tgsi_sampler *sampler) } -extern void -sp_get_samples_fragment(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - float lodbias, - float rgba[NUM_CHANNELS][QUAD_SIZE]); extern void -sp_get_samples_vertex(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - float lodbias, - float rgba[NUM_CHANNELS][QUAD_SIZE]); +sp_get_samples(struct tgsi_sampler *tgsi_sampler, + const float s[QUAD_SIZE], + const float t[QUAD_SIZE], + const float p[QUAD_SIZE], + float lodbias, + float rgba[NUM_CHANNELS][QUAD_SIZE]); #endif /* SP_TEX_SAMPLE_H */ |