draw/gs: don't bind the tgsi state if we're using llvm paths
authorZack Rusin <zackr@vmware.com>
Fri, 3 May 2013 16:22:08 +0000 (12:22 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 14 May 2013 07:08:56 +0000 (03:08 -0400)
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_gs.c

index fcd6e2ddfdb581262cf1bac39ecf150adc3d4ef1..fa0981ee10e8bf6417f4c9864b8b8143643dab2d 100644 (file)
@@ -661,7 +661,12 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader,
 void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
                                   struct draw_context *draw)
 {
-   if (shader && shader->machine->Tokens != shader->state.tokens) {
+#ifdef HAVE_LLVM
+   boolean use_llvm = draw_get_option_use_llvm();
+#else
+   boolean use_llvm = FALSE;
+#endif
+   if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) {
       tgsi_exec_machine_bind_shader(shader->machine,
                                     shader->state.tokens,
                                     draw->gs.tgsi.sampler);