summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-08-20 18:36:57 +0100
committerKeith Whitwell <[email protected]>2009-08-20 18:36:57 +0100
commit00c835918259f8d41c3f74eca679a972713b11b2 (patch)
treef2dc09454abd960fdcc12451181d97b6978d6e09 /src/gallium/drivers/softpipe/sp_context.c
parent0d9979d9ec5b931856d29c4ec44edb1f4931d1ac (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_context.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index e35c6b3aec7..a0196955c87 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -230,14 +230,16 @@ softpipe_create( struct pipe_screen *screen )
/* vertex shader samplers */
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
- softpipe->tgsi.vert_samplers[i].base.get_samples = sp_get_samples_vertex;
+ softpipe->tgsi.vert_samplers[i].base.get_samples = sp_get_samples;
+ softpipe->tgsi.vert_samplers[i].processor = TGSI_PROCESSOR_VERTEX;
softpipe->tgsi.vert_samplers[i].cache = softpipe->tex_cache[i];
softpipe->tgsi.vert_samplers_list[i] = &softpipe->tgsi.vert_samplers[i];
}
/* fragment shader samplers */
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
- softpipe->tgsi.frag_samplers[i].base.get_samples = sp_get_samples_fragment;
+ softpipe->tgsi.frag_samplers[i].base.get_samples = sp_get_samples;
+ softpipe->tgsi.frag_samplers[i].processor = TGSI_PROCESSOR_FRAGMENT;
softpipe->tgsi.frag_samplers[i].cache = softpipe->tex_cache[i];
softpipe->tgsi.frag_samplers_list[i] = &softpipe->tgsi.frag_samplers[i];
}