diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 333cbd67add..7943199dd32 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -701,11 +701,10 @@ lvp_pipeline_compile(struct lvp_pipeline *pipeline, struct pipe_shader_state shstate = {0}; fill_shader_prog(&shstate, stage, pipeline); - nir_xfb_info *xfb_info = NULL; if (stage == MESA_SHADER_VERTEX || stage == MESA_SHADER_GEOMETRY || stage == MESA_SHADER_TESS_EVAL) { - xfb_info = nir_gather_xfb_info(pipeline->pipeline_nir[stage], NULL); + nir_xfb_info *xfb_info = nir_gather_xfb_info(pipeline->pipeline_nir[stage], NULL); if (xfb_info) { uint8_t output_mapping[VARYING_SLOT_TESS_MAX]; memset(output_mapping, 0, sizeof(output_mapping)); @@ -731,6 +730,8 @@ lvp_pipeline_compile(struct lvp_pipeline *pipeline, shstate.stream_output.output[i].start_component = ffs(xfb_info->outputs[i].component_mask) - 1; shstate.stream_output.output[i].stream = xfb_info->buffer_to_stream[xfb_info->outputs[i].buffer]; } + + ralloc_free(xfb_info); } }