mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
i915tex: Unreference texture buffers on context destruction.
Not doing this could cause the buffers to leak under some circumstances.
This commit is contained in:
parent
c48efb1dbe
commit
09dd25b5d1
2 changed files with 20 additions and 0 deletions
|
|
@ -519,6 +519,16 @@ i830_emit_state(struct intel_context *intel)
|
|||
static void
|
||||
i830_destroy_context(struct intel_context *intel)
|
||||
{
|
||||
GLuint i;
|
||||
struct i830_context *i830 = i830_context(&intel->ctx);
|
||||
|
||||
for (i = 0; i < I830_TEX_UNITS; i++) {
|
||||
if (i830->state.tex_buffer[i] != NULL) {
|
||||
driBOUnReference(i830->state.tex_buffer[i]);
|
||||
i830->state.tex_buffer[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
_tnl_free_vertices(&intel->ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -430,6 +430,16 @@ i915_emit_state(struct intel_context *intel)
|
|||
static void
|
||||
i915_destroy_context(struct intel_context *intel)
|
||||
{
|
||||
GLuint i;
|
||||
struct i915_context *i915 = i915_context(&intel->ctx);
|
||||
|
||||
for (i = 0; i < I915_TEX_UNITS; i++) {
|
||||
if (i915->state.tex_buffer[i] != NULL) {
|
||||
driBOUnReference(i915->state.tex_buffer[i]);
|
||||
i915->state.tex_buffer[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
_tnl_free_vertices(&intel->ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue