mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 01:00:25 +01: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
89f070b3bb
commit
08a2cc2d23
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