[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] GL_MAX_TEXTURE_SIZE power of two ?



Hi all,

Gecko is having a regression on the WebGL conformance test https://www.khronos.org/registry/webgl/conformance-suites/1.0.2/conformance/limits/gl-max-texture-dimensions.html because it return a non power of two MAX_TEXTURE_SIZE = 8191 because of a driver bug work around on Mac OS X (that is having bugs with 8k textures). And we have chosen to set MAX_TEXTURE_SIZE = 8191 instead of 4096 to allow bigger textures even we can't have 8192.

The problem is this WebGL test is assuming that MAX_TEXTURE_SIZE is a power of two because create a texture of size (MAX_TEXTURE_SIZE, 1) and try to generate its mipmap which fail because WebGL 1.0 is suppose to only support power of two texture mipmaps. But I can't see in any OpenGL (ES or not) specification that MAX_TEXTURE_SIZE have to be a power of 2. The only paragraph that is close and ambiguous to that issues is :

http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf (paragraphe 3.7 - Texturing - p69)
"The maximum allowable width and height of a two-dimensional texture image must be at least 2^(k-lod) for image arrays of level zero through k, where k is the log base 2 of MAX_TEXTURE_SIZE"
We don't know if this given k is only an integer, or can be a real.

Therefore, my question is : Does our WebGL API should always return a power of two value for MAX_TEXTURE_SIZE, or the test should handle this case ?

Thanks you !

Guillaume Abadie.
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------