summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 35063b94ca4..e8480f6ba73 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -737,9 +737,20 @@ draw_current_shader_clipvertex_output(const struct draw_context *draw)
uint
draw_current_shader_clipdistance_output(const struct draw_context *draw, int index)
{
+ if (draw->gs.geometry_shader)
+ return draw->gs.geometry_shader->clipdistance_output[index];
return draw->vs.clipdistance_output[index];
}
+
+uint
+draw_current_shader_num_written_clipdistances(const struct draw_context *draw)
+{
+ if (draw->gs.geometry_shader)
+ return draw->gs.geometry_shader->info.num_written_clipdistance;
+ return draw->vs.vertex_shader->info.num_written_clipdistance;
+}
+
/**
* Return a pointer/handle for a driver/CSO rasterizer object which
* disabled culling, stippling, unfilled tris, etc.