Bug 1332 - Texture Mip Map count checking incorrect
Summary: Texture Mip Map count checking incorrect
Status: UNCONFIRMED
Alias: None
Product: Java3D
Classification: General
Component: core (show other bugs)
Version: tbd
Hardware: All all
: P4 normal
Assignee: Phil Jordan
URL:
Depends on:
Blocks:
 
Reported: 2016-10-20 00:23 CEST by Phil Jordan
Modified: 2016-10-20 00:23 CEST (History)
1 user (show)

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Jordan 2016-10-20 00:23:02 CEST
The TextureRetained code assume that all mipmap levels must be present, this is not in any manner correct at the OpenGL driver level



The wrong variable is used in TextureRetained.setLive and clearLive:
a mipmapped image has both how many mips it can have and how many it does have
for example DXT image don't bother with the last 0 sized (x or y) images, this is allowed

this
for (int i = 0; i < maxLevels; i++)
should be
for (int i = 0; i <= maximumLevel; i++)


This method is redundant and also demands every mip-map be present, which is not correct
checkSizes(ImageComponentRetained images[])
It should be removed .



Also relatedly:
TextureCubeMapRetained calls
TextureRetained.checkImageSize(int level, ImageComponent image)
But the maths is wrong for a cube map so it fails incorrectly. A new correct method for maps should be written