Re: [Mesa-dev] [PATCH] draw/gs: fix point size outputs from geometry shader.

2019-03-25 Thread Brian Paul

On 03/24/2019 11:14 PM, Dave Airlie wrote:

From: Dave Airlie 

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
---
  src/gallium/auxiliary/draw/draw_pipe_wide_point.c | 9 +
  1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c 
b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
index 1329ab4e7c0..e9bbb67a958 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
@@ -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 );




Reviewed-by: Brian Paul 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] draw/gs: fix point size outputs from geometry shader.

2019-03-24 Thread Dave Airlie
From: Dave Airlie 

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
---
 src/gallium/auxiliary/draw/draw_pipe_wide_point.c | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c 
b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
index 1329ab4e7c0..e9bbb67a958 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
@@ -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 );
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev