summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <[email protected]>2016-03-16 09:46:05 +0100
committerIlia Mirkin <[email protected]>2016-03-20 18:01:53 -0400
commitb72156c8e0fe9dd2c4d9614f3f7d1e8bdea0e4dd (patch)
tree3bbd7a9b6dbee3ddd41ff274156310223c42b770
parentbbbdcdcf75f05f97ea346fd6d84ecc3d8ec61d24 (diff)
tgsi: Fix return of uninitialized memory in tgsi_*_instruction_memory
tgsi_default_instruction_memory / tgsi_build_instruction_memory were returning uninitialized memory for tgsi_instruction_memory.Texture and tgsi_instruction_memory.Format. Note 0 means not set, and thus is a correct default initializer for these. Fixes: 3243b6fc97 ("tgsi: add Texture and Format to tgsi_instruction_memory") Cc: Nicolai Hähnle <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index e5355f573bb..638730acf95 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -775,6 +775,8 @@ tgsi_default_instruction_memory( void )
struct tgsi_instruction_memory instruction_memory;
instruction_memory.Qualifier = 0;
+ instruction_memory.Texture = 0;
+ instruction_memory.Format = 0;
instruction_memory.Padding = 0;
return instruction_memory;
@@ -790,6 +792,8 @@ tgsi_build_instruction_memory(
struct tgsi_instruction_memory instruction_memory;
instruction_memory.Qualifier = qualifier;
+ instruction_memory.Texture = 0;
+ instruction_memory.Format = 0;
instruction_memory.Padding = 0;
instruction->Memory = 1;