Skip to content

gallium/util: Fix leak in the live shader cache

Axel Davy requested to merge axeldavy/mesa:live_cache_nir_leak_fix into master

When the nir backend is used, the create_shader call is supposed to release state->ir.nir. When the cache hits, create_shader is not called, thus state->ir.nir should be freed.

There is nothing to be done for the TGSI case as the tokens release is done by the caller.

This fixes a leak noticed in: #2931 (closed)

I'm not proposing stable for this patch as I'm not confident enough the patch would not cause possible regressions. However I can add it if some people think it should be fine (and please tell me how, I'm not used to the new system).

Merge request reports

Loading