st/mesa: don't pass NIR to draw module if IO is lowered
authorMarek Olšák <marek.olsak@amd.com>
Fri, 14 Aug 2020 05:30:49 +0000 (01:30 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 24 Aug 2020 19:07:18 +0000 (19:07 +0000)
The draw module can't handle it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>

src/mesa/state_tracker/st_program.c

index bfc6d90922a4fec629ec70e20e8238fd4fd36ea1..f968073cc595ae835b820de030afdf05945cb518 100644 (file)
@@ -546,7 +546,8 @@ st_translate_vertex_program(struct st_context *st,
          /* For st_draw_feedback, we need to generate TGSI too if draw doesn't
           * use LLVM.
           */
-         if (draw_has_llvm()) {
+         /* TODO: Draw can't handle lowered IO. */
+         if (draw_has_llvm() && !stp->Base.info.io_lowered) {
             st_prepare_vertex_program(stp);
             return true;
          }
@@ -731,7 +732,9 @@ st_create_vp_variant(struct st_context *st,
    state.stream_output = stvp->state.stream_output;
 
    if (stvp->state.type == PIPE_SHADER_IR_NIR &&
-       (!key->is_draw_shader || draw_has_llvm())) {
+       (!key->is_draw_shader ||
+        /* TODO: Draw can't handle lowered IO. */
+        (draw_has_llvm() && !stvp->Base.info.io_lowered))) {
       bool finalize = false;
 
       state.type = PIPE_SHADER_IR_NIR;