Module: Mesa
Branch: master
Commit: 26ff7523b69ddb377ade29296d20abfc46e69489
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=26ff7523b69ddb377ade29296d20abfc46e69489

Author: Hui Qi Tay <[email protected]>
Date:   Thu Oct 14 14:04:39 2010 +0100

draw: sanitize llvm variant key

Fixes recompilation, but seems to be broken with llvm 2.8.

---

 src/gallium/auxiliary/draw/draw_llvm.c |    1 +
 src/gallium/auxiliary/draw/draw_llvm.h |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_llvm.c 
b/src/gallium/auxiliary/draw/draw_llvm.c
index 5f11b82..1c18d90 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -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
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h 
b/src/gallium/auxiliary/draw/draw_llvm.h
index fc78854..def0681 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -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:
     */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to