diff options
author | Maciej Cencora <[email protected]> | 2009-12-07 22:24:41 +0100 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2009-12-07 22:33:11 +0100 |
commit | 9921b3048e611398460ef774355b7515bc901240 (patch) | |
tree | 9e0cbcbad950292b30f95460d503a58c67fbbf14 /src | |
parent | 013cf1d63deb9c33089777afbdea85013fd46b49 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 00e0658dc54..28690325d12 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -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 && |