summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_llvm.h
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2016-01-12 18:47:44 +0100
committerRoland Scheidegger <sroland@vmware.com>2016-01-13 02:43:04 +0100
commit9422999e4041d4e984acbd2f44813d5928d20f18 (patch)
tree5ecb3dd529bc6aef99b465bd519058327ba9c88d /src/gallium/auxiliary/draw/draw_llvm.h
parent6143e2d65168a628aeb54db4cfecd1bb1d53b8aa (diff)
downloadexternal_mesa3d-9422999e4041d4e984acbd2f44813d5928d20f18.zip
external_mesa3d-9422999e4041d4e984acbd2f44813d5928d20f18.tar.gz
external_mesa3d-9422999e4041d4e984acbd2f44813d5928d20f18.tar.bz2
draw: fix key comparison with uninitialized value
Discovered by accident, valgrind was complaining (could have possibly caused us to create redundant geometry shader variants). v2: convinced by Brian and Jose, just use memset for both gs and vs keys, just as easy and less error prone.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
index f617a29..271433c 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -311,12 +311,8 @@ struct draw_llvm_variant_key
unsigned need_edgeflags:1;
unsigned has_gs:1;
unsigned num_outputs:8;
- /*
- * it is important there are no holes in this struct
- * (and all padding gets zeroed).
- */
unsigned ucp_enable:PIPE_MAX_CLIP_PLANES;
- unsigned pad1:24-PIPE_MAX_CLIP_PLANES;
+ /* note padding here - must use memset */
/* Variable number of vertex elements:
*/
@@ -332,6 +328,7 @@ struct draw_gs_llvm_variant_key
unsigned nr_samplers:8;
unsigned nr_sampler_views:8;
unsigned num_outputs:8;
+ /* note padding here - must use memset */
struct draw_sampler_static_state samplers[1];
};