We use prog_data[stage] != NULL to determine whether or not we need to
clean up that stage. Make sure it default to NULL.
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;