draw: sanitize llvm variant key
authorHui Qi Tay <tayhuiqithq@gmail.com>
Thu, 14 Oct 2010 13:04:39 +0000 (14:04 +0100)
committerKeith Whitwell <keithw@vmware.com>
Thu, 14 Oct 2010 21:34:10 +0000 (22:34 +0100)
Fixes recompilation, but seems to be broken with llvm 2.8.

src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/draw/draw_llvm.h

index 5f11b82bb997977fd7c5721bc471174f86e5d20f..1c18d9074346ddbe4ebaf30ebcb3e27db4c4d965 100644 (file)
@@ -1430,6 +1430,7 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
    key->enable_d3dclipping = (boolean)!llvm->draw->rasterizer->gl_rasterization_rules;
    key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? TRUE : FALSE);
    key->nr_planes = llvm->draw->nr_planes;
+   key->pad = 0;
 
    /* All variants of this shader will have the same value for
     * nr_samplers.  Not yet trying to compact away holes in the
index fc7885499ef4cdd74340fc56f343e1385ee2fe25..def068179fd98d25c4587c6a312d3f865d47918c 100644 (file)
@@ -168,7 +168,8 @@ struct draw_llvm_variant_key
    unsigned bypass_viewport:1;
    unsigned enable_d3dclipping:1;
    unsigned need_edgeflags:1;
-   unsigned nr_planes;
+   unsigned nr_planes:4;
+   unsigned pad:26;
 
    /* Variable number of vertex elements:
     */