summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_gs.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2013-06-05 18:06:06 -0400
committerZack Rusin <zackr@vmware.com>2013-06-10 22:04:27 -0400
commitc1a50f5ed7beb2f6aecfbacdc3339c8cb0107257 (patch)
tree7ee54eaac10f68a5bbf6616342ce236b0615229b /src/gallium/auxiliary/draw/draw_gs.c
parent3dacb7d40b3a15be1133deaac55b993e8b7809dc (diff)
downloadexternal_mesa3d-c1a50f5ed7beb2f6aecfbacdc3339c8cb0107257.tar.gz
external_mesa3d-c1a50f5ed7beb2f6aecfbacdc3339c8cb0107257.tar.bz2
external_mesa3d-c1a50f5ed7beb2f6aecfbacdc3339c8cb0107257.zip
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 <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c6
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 67e5117c58..74c6279d64 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;