draw/gs: fix point size outputs from geometry shader.
authorDave Airlie <airlied@redhat.com>
Mon, 25 Mar 2019 05:12:13 +0000 (15:12 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 25 Mar 2019 19:17:06 +0000 (05:17 +1000)
If the geom shader emits a point size we failed to find it here,
use the correct API to look it up.

Fixes:
tests/spec/glsl-1.50/execution/geometry/point-size-out.shader_test

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_wide_point.c

index 1329ab4e7c0bb29444cf4e0629a6d051fa39a9a8..e9bbb67a95838cd7c948a2e2bf8b0b66cf30f1ca 100644 (file)
@@ -266,14 +266,7 @@ widepoint_first_point(struct draw_stage *stage,
    wide->psize_slot = -1;
    if (rast->point_size_per_vertex) {
       /* find PSIZ vertex output */
-      const struct draw_vertex_shader *vs = draw->vs.vertex_shader;
-      uint i;
-      for (i = 0; i < vs->info.num_outputs; i++) {
-         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
-            wide->psize_slot = i;
-            break;
-         }
-      }
+      wide->psize_slot = draw_find_shader_output(draw, TGSI_SEMANTIC_PSIZE, 0);
    }
    
    stage->point( stage, header );