Closed GoogleCodeExporter closed 9 years ago
Was a bit wrong... level > gl::MAX_TEXTURE_LEVELS is actually the correct
check...
But then array "Image mImageArray[MAX_TEXTURE_LEVELS];" declared in Texture.h
is too small, if you specify level as MAX_TEXTURE_LEVELS, the array will be
accessed out of bounds
Original comment by tom...@gmail.com
on 9 Sep 2010 at 1:29
One more thing, MAX_TEXTURE_LEVELS must be 13, not 12... because 2^13 is 8192
which is the max texture size.
Original comment by tom...@gmail.com
on 9 Sep 2010 at 1:55
I can't reproduce this. glTexImage2D returns GL_INVALID_VALUE, as demanded by
the spec, because the "width > (gl::MAX_TEXTURE_SIZE >> level)" parameter check
fails.
ANGLE's MAX_TEXTURE_SIZE is currently limited to 2048 to support a maximum
range of devices. So MAX_TEXTURE_LEVELS is 12 (don't forget to count 2^0).
Did you encounter this crash after increasing MAX_TEXTURE_SIZE to 8192 without
increasing MAX_TEXTURE_LEVELS to 14?
Original comment by nicolas....@gmail.com
on 24 Sep 2010 at 12:56
My bad... this is related to issue Issue 29, I just removed that weird
restriction (width > (gl::MAX_TEXTURE_SIZE >> level) ---> width >
gl::MAX_TEXTURE_SIZE, same for height), after removing it opened path to this
new bug...
Because level checking is performed like this
if (level < 0 || width < 0 || height < 0)
{
return error(GL_INVALID_VALUE);
}
it wasn't checking for max value.
Anyways this should be reviewed after Issue 29 is resolved
Original comment by tomas%un...@gtempaccount.com
on 24 Sep 2010 at 9:18
closing as I don't think there is anything to do here in light of the status of
Issue 29
Original comment by dan...@transgaming.com
on 27 Oct 2010 at 4:00
Original issue reported on code.google.com by
tom...@gmail.com
on 9 Sep 2010 at 12:38