Summary: | memory leak with glDeleteProgram for shader program type GL_COMPUTE_SHADER | ||
---|---|---|---|
Product: | Mesa | Reporter: | adam <adambarta> |
Component: | Drivers/DRI/i965 | Assignee: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | critical | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | fix |
Description
adam
2017-09-18 17:44:04 UTC
Leak happens because of reference count increment during _mesa_update_state in glDispatchCompute (if glDispatchCompute is commented out, there is no leak). Will try to understand why this is never decremented. Thanks for the heads up. Stepping through the code it seems _mesa_update_state_locked updates the fixed function vertex and fragment shaders for the compute shader program is this necessary? (In reply to adam from comment #2) > Thanks for the heads up. Stepping through the code it seems > _mesa_update_state_locked updates the fixed function vertex and fragment > shaders for the compute shader program is this necessary? Only the active/existing programs get updated, in your case ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE] should be the only one. will send a fix soon .. Created attachment 134352 [details] [review] fix https://lists.freedesktop.org/archives/mesa-dev/2017-September/170206.html Nice, a one liner, thanks for the fix! commit 589457d97fa8e95f227e7179e9c89a01dff495a0 Author: Tapani Pälli <tapani.palli@intel.com> Date: Wed Sep 20 09:29:16 2017 +0300 mesa: free current ComputeProgram state in _mesa_free_context_data This is already done for other programs stages, fixes a leak when using compute programs. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102844 Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.