summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/linker.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 6ddf0cbb0c..b4784c5119 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3732,7 +3732,10 @@ create_shader_variable(struct gl_shader_program *shProg,
bool use_implicit_location, int location,
const glsl_type *outermost_struct_type)
{
- gl_shader_variable *out = ralloc(shProg, struct gl_shader_variable);
+ /* Allocate zero-initialized memory to ensure that bitfield padding
+ * is zero.
+ */
+ gl_shader_variable *out = rzalloc(shProg, struct gl_shader_variable);
if (!out)
return NULL;