st_translate_stream_output_info(stvp->glsl_to_tgsi,
stvp->result_to_output,
&stvp->tgsi.stream_output);
+
+ free_glsl_to_tgsi_visitor(stvp->glsl_to_tgsi);
+ stvp->glsl_to_tgsi = NULL;
} else
error = st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_VERTEX,
}
}
- if (stfp->glsl_to_tgsi)
+ if (stfp->glsl_to_tgsi) {
st_translate_program(st->ctx,
TGSI_PROCESSOR_FRAGMENT,
ureg,
NULL,
fs_output_semantic_name,
fs_output_semantic_index);
- else
+
+ free_glsl_to_tgsi_visitor(stfp->glsl_to_tgsi);
+ stfp->glsl_to_tgsi = NULL;
+ } else
st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_FRAGMENT,
ureg,
st_translate_program_common(st, &stgp->Base.Base, stgp->glsl_to_tgsi, ureg,
TGSI_PROCESSOR_GEOMETRY, &stgp->tgsi);
+
+ free_glsl_to_tgsi_visitor(stgp->glsl_to_tgsi);
+ stgp->glsl_to_tgsi = NULL;
return true;
}
st_translate_program_common(st, &sttcp->Base.Base, sttcp->glsl_to_tgsi,
ureg, TGSI_PROCESSOR_TESS_CTRL, &sttcp->tgsi);
+
+ free_glsl_to_tgsi_visitor(sttcp->glsl_to_tgsi);
+ sttcp->glsl_to_tgsi = NULL;
return true;
}
st_translate_program_common(st, &sttep->Base.Base, sttep->glsl_to_tgsi,
ureg, TGSI_PROCESSOR_TESS_EVAL, &sttep->tgsi);
+
+ free_glsl_to_tgsi_visitor(sttep->glsl_to_tgsi);
+ sttep->glsl_to_tgsi = NULL;
return true;
}