summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-07-25 12:58:59 -0700
committerEric Anholt <[email protected]>2019-07-29 12:50:49 -0700
commit65aeeae6708269081206624f75163c8df6ddd67c (patch)
tree2b90ba8a68ae933068bd355abed4af913e31bbf5
parentaac492901a9c717e1c667a5313fdf7ba1b750cf2 (diff)
freedreno: Fix helgrind complaint on shader-db key setup.
If the variable's going to be static, we shouldn't be memsetting it from every thread and instead just have it in the data section. Reviewed-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_gallium.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
index b94909bed16..48562965dc2 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
@@ -135,8 +135,7 @@ ir3_shader_create(struct ir3_compiler *compiler,
* (as otherwise nothing will trigger the shader to be
* actually compiled)
*/
- static struct ir3_shader_key key;
- memset(&key, 0, sizeof(key));
+ static struct ir3_shader_key key; /* static is implicitly zeroed */
ir3_shader_variant(shader, key, false, debug);
if (nir->info.stage != MESA_SHADER_FRAGMENT)