summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-02-27 19:07:18 +0100
committerRoland Scheidegger <[email protected]>2013-02-28 03:39:53 +0100
commit6b35c2b110be0d9ae6a292250fdcbab11a9190a5 (patch)
tree5141a7490ac67ee8df3542f8396b2ba4e6423ec7 /src/gallium/auxiliary/draw/draw_context.c
parent0845d16976b41e0a151f96b900fb58a7f26d7774 (diff)
softpipe/draw/tgsi: simplify driver/tgsi sampler interface
Use a single sampler adapter instead of per-sampler-unit samplers, and just pass along texture unit and sampler unit in the calls. The reason is that for dx10-style sample opcodes pre-wired samplers including all the texture state aren't really feasible (and for sample_i/sviewinfo we don't even have samplers). Of course right now softpipe doesn't actually do anything more than just look up all its pre-wired per-texunit/per-samplerunit sampler as it did before so this doesn't really achieve much except one more function call, however this is now all softpipe's fault (fixing that in a way which doesn't suck is still an unsolved problem). Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 045bb6b2ae8..6b70ac88be6 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -581,18 +581,15 @@ draw_num_shader_outputs(const struct draw_context *draw)
* This might only be used by software drivers for the time being.
*/
void
-draw_texture_samplers(struct draw_context *draw,
- uint shader,
- uint num_samplers,
- struct tgsi_sampler **samplers)
+draw_texture_sampler(struct draw_context *draw,
+ uint shader,
+ struct tgsi_sampler *sampler)
{
if (shader == PIPE_SHADER_VERTEX) {
- draw->vs.tgsi.num_samplers = num_samplers;
- draw->vs.tgsi.samplers = samplers;
+ draw->vs.tgsi.sampler = sampler;
} else {
debug_assert(shader == PIPE_SHADER_GEOMETRY);
- draw->gs.tgsi.num_samplers = num_samplers;
- draw->gs.tgsi.samplers = samplers;
+ draw->gs.tgsi.sampler = sampler;
}
}