llvmpipe: Fix llvmpipe_create_gs_state.
authorZack Rusin <zackr@vmware.com>
Wed, 26 Mar 2014 16:08:25 +0000 (16:08 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 26 Mar 2014 16:11:28 +0000 (16:11 +0000)
Revert unintended behaviour change from commit
b995a010e688bc4d4557e973e5e28091c378e881.

Tested-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_state_gs.c

index c94afeddd1639273044c32314816b6c4500afd34..7ea7a3906697e67df30040342db81a7524fa39de 100644 (file)
@@ -60,9 +60,11 @@ llvmpipe_create_gs_state(struct pipe_context *pipe,
    state->no_tokens = !templ->tokens;
    memcpy(&state->stream_output, &templ->stream_output, sizeof state->stream_output);
 
-   state->dgs = draw_create_geometry_shader(llvmpipe->draw, templ);
-   if (state->dgs == NULL) {
-      goto no_dgs;
+   if (templ->tokens) {
+      state->dgs = draw_create_geometry_shader(llvmpipe->draw, templ);
+      if (state->dgs == NULL) {
+         goto no_dgs;
+      }
    }
 
    return state;