draw: fix incorrect NIR support code
authorMarek Olšák <marek.olsak@amd.com>
Fri, 11 Dec 2020 01:03:50 +0000 (20:03 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 18 Dec 2020 04:53:44 +0000 (04:53 +0000)
"state" contains NIR, while "vs->base.state" contains TGSI generated
from NIR. It was a typo.

This fixes the arb_vp subtest of: DRAW_USE_LLVM=1 piglit/bin/rasterpos

Fixes: df11ceaaaf7 - draw: add NIR support to draw_create_vertex_shader

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>

src/gallium/auxiliary/draw/draw_vs_exec.c

index 17800ad..95e2e96 100644 (file)
@@ -240,7 +240,7 @@ draw_create_vs_exec(struct draw_context *draw,
       }
    }
 
-   tgsi_scan_shader(state->tokens, &vs->base.info);
+   tgsi_scan_shader(vs->base.state.tokens, &vs->base.info);
 
    vs->base.state.stream_output = state->stream_output;
    vs->base.draw = draw;