mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
radeon: fix cases when only first image where put directly into miptree.
Make sure that minimal width, height and depth of texture image is 1.
This commit is contained in:
parent
013cf1d63d
commit
9921b3048e
1 changed files with 3 additions and 3 deletions
|
|
@ -524,9 +524,9 @@ static int image_matches_texture_obj(struct gl_texture_object *texObj,
|
|||
return 0;
|
||||
|
||||
const unsigned levelDiff = level - texObj->BaseLevel;
|
||||
const unsigned refWidth = baseImage->Width >> levelDiff;
|
||||
const unsigned refHeight = baseImage->Height >> levelDiff;
|
||||
const unsigned refDepth = baseImage->Depth >> levelDiff;
|
||||
const unsigned refWidth = MAX2(baseImage->Width >> levelDiff, 1);
|
||||
const unsigned refHeight = MAX2(baseImage->Height >> levelDiff, 1);
|
||||
const unsigned refDepth = MAX2(baseImage->Depth >> levelDiff, 1);
|
||||
|
||||
return (texImage->Width == refWidth &&
|
||||
texImage->Height == refHeight &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue