draw/llvm: another quick hack for drawing with no position output
authorRoland Scheidegger <sroland@vmware.com>
Mon, 11 Mar 2013 16:03:55 +0000 (17:03 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 11 Mar 2013 16:07:51 +0000 (17:07 +0100)
Also need to skip things if we have no cv value but pos value
(happens with geometry shaders enabled).
Needs a round of cleanup, though.

src/gallium/auxiliary/draw/draw_llvm.c

index f1c1f55a58681144901c5aa3fd87b8dfc1ffd4ff..20c9b7981aea3ff4adfa91c56d6bb8ff49235859 100644 (file)
@@ -1354,7 +1354,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
                   sampler,
                   variant->key.clamp_vertex_color);
 
-      if (pos != -1) {
+      if (pos != -1 && cv != -1) {
          /* store original positions in clip before further manipulation */
          store_clip(gallivm, vs_type, io, outputs, 0, cv);
          store_clip(gallivm, vs_type, io, outputs, 1, pos);