diff options
author | Zack Rusin <[email protected]> | 2013-06-05 18:06:06 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-06-10 22:04:27 -0400 |
commit | c1a50f5ed7beb2f6aecfbacdc3339c8cb0107257 (patch) | |
tree | 7ee54eaac10f68a5bbf6616342ce236b0615229b /src/gallium/auxiliary/draw/draw_gs.c | |
parent | 3dacb7d40b3a15be1133deaac55b993e8b7809dc (diff) |
draw: make sure clipdistances work with geometry shaders
we were always fetching the info from the vertex shader, but if
geometry shader is present it should be used as the source of
that info.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_gs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 67e5117c587..74c6279d648 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -791,6 +791,12 @@ draw_create_geometry_shader(struct draw_context *draw, gs->position_output = i; if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX) gs->viewport_index_output = i; + if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPDIST) { + if (gs->info.output_semantic_index[i] == 0) + gs->clipdistance_output[0] = i; + else + gs->clipdistance_output[1] = i; + } } gs->machine = draw->gs.tgsi.machine; |