mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
i915tex: Better attempt to release miptree when overriding texture image.
The previous approach could lead to crashes in FBO code that dereferences the miptree struct pointer unconditionally.
This commit is contained in:
parent
4f0e92d07c
commit
a8964ca89e
1 changed files with 3 additions and 3 deletions
|
|
@ -378,9 +378,6 @@ intelTexImage(GLcontext * ctx,
|
|||
assert(!intelObj->mt);
|
||||
}
|
||||
|
||||
if (!pixels)
|
||||
return;
|
||||
|
||||
if (!intelObj->mt) {
|
||||
guess_and_alloc_mipmap_tree(intel, intelObj, intelImage);
|
||||
if (!intelObj->mt) {
|
||||
|
|
@ -682,6 +679,9 @@ intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
|
|||
if (!intelObj)
|
||||
return;
|
||||
|
||||
if (intelObj->mt)
|
||||
intel_miptree_release(intel, &intelObj->mt);
|
||||
|
||||
intelObj->imageOverride = GL_TRUE;
|
||||
intelObj->depthOverride = depth;
|
||||
intelObj->pitchOverride = pitch;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue