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 b2a918ca957dd3e0f990078ab4145cf6f2d5eefe..302d599024dfe5c22610af012e4a91143245b679 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) {