From: Jason Ekstrand Date: Thu, 14 May 2015 05:11:20 +0000 (-0700) Subject: vk/compiler: Zero the prog data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd197181f28d683b0032828f67fbeab768920789;p=mesa.git vk/compiler: Zero the prog data We use prog_data[stage] != NULL to determine whether or not we need to clean up that stage. Make sure it default to NULL. --- diff --git a/src/vulkan/compiler.cpp b/src/vulkan/compiler.cpp index f81008b8f72..bf3262fecd4 100644 --- a/src/vulkan/compiler.cpp +++ b/src/vulkan/compiler.cpp @@ -833,6 +833,11 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline) struct brw_context *brw = compiler->brw; struct anv_device *device = pipeline->device; + /* When we free the pipeline, we detect stages based on the NULL status + * of various prog_data pointers. Make them NULL by default. + */ + memset(pipeline->prog_data, 0, sizeof(pipeline->prog_data)); + brw->use_rep_send = pipeline->use_repclear; brw->no_simd8 = pipeline->use_repclear;