llvmpipe: fix no tokens detections.
authorDave Airlie <airlied@redhat.com>
Wed, 8 Apr 2020 05:44:15 +0000 (15:44 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 15 Apr 2020 04:26:14 +0000 (14:26 +1000)
this only applies to the TGSI path, fixes
KHR-GLES31.core.geometry_shader.api.program_pipeline_vs_gs_capture

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4560>

src/gallium/drivers/llvmpipe/lp_state_gs.c

index b2a918c..302d599 100644 (file)
@@ -57,7 +57,10 @@ llvmpipe_create_gs_state(struct pipe_context *pipe,
    }
 
    /* copy stream output info */
-   state->no_tokens = !templ->tokens;
+   if (templ->type == PIPE_SHADER_IR_TGSI)
+      state->no_tokens = !templ->tokens;
+   else
+      state->no_tokens = FALSE;
    memcpy(&state->stream_output, &templ->stream_output, sizeof state->stream_output);
 
    if (templ->tokens || templ->type == PIPE_SHADER_IR_NIR) {