softpipe: add check for DO_PSTIPPLE_IN_HELPER_MODULE
authorBrian Paul <brianp@vmware.com>
Tue, 4 Oct 2011 20:45:13 +0000 (14:45 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 4 Oct 2011 21:04:41 +0000 (15:04 -0600)
We only want to generate the fragment shader variant that does
stippling if DO_PSTIPPLE_IN_HELPER_MODULE is being used.

src/gallium/drivers/softpipe/sp_state_shader.c

index d7d05990c07e6058b2dc2a6d33ceed0df1d3f577..3dd1f9eafaedd9330df5a026c12a8f5324c62da9 100644 (file)
@@ -55,12 +55,14 @@ create_fs_variant(struct softpipe_context *softpipe,
    struct pipe_shader_state *stipple_fs = NULL, *curfs = &fs->shader;
    unsigned unit = 0;
 
+#if DO_PSTIPPLE_IN_HELPER_MODULE
    if (key->polygon_stipple) {
       /* get new shader that implements polygon stippling */
       stipple_fs = util_pstipple_create_fragment_shader(&softpipe->pipe,
                                                         curfs, &unit);
       curfs = stipple_fs;
    }
+#endif
 
    /* codegen, create variant object */
    var = softpipe_create_fs_variant_sse(softpipe, curfs);