summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorZack Rusin <zack@kde.org>2010-06-11 13:31:52 -0400
committerZack Rusin <zack@kde.org>2010-06-11 13:31:52 -0400
commit53bd9796a1395e4acde884ff55cb7ee18586595a (patch)
tree639d1ab660ad6266a1d1c5639e04daead6a031ed /src/gallium/auxiliary/draw/draw_context.c
parent23969670387bc0bb7d0761936905e5eb4df963dc (diff)
gallium/softpipe/draw: support samplers in geometry shaders
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 7c7702549e..dab95e5051 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -435,13 +435,18 @@ draw_num_shader_outputs(const struct draw_context *draw)
*/
void
draw_texture_samplers(struct draw_context *draw,
+ uint shader,
uint num_samplers,
struct tgsi_sampler **samplers)
{
- draw->vs.num_samplers = num_samplers;
- draw->vs.samplers = samplers;
- draw->gs.num_samplers = num_samplers;
- draw->gs.samplers = samplers;
+ if (shader == PIPE_SHADER_VERTEX) {
+ draw->vs.num_samplers = num_samplers;
+ draw->vs.samplers = samplers;
+ } else {
+ debug_assert(shader == PIPE_SHADER_GEOMETRY);
+ draw->gs.num_samplers = num_samplers;
+ draw->gs.samplers = samplers;
+ }
}