Imagination PowerVR SDK Blog

PVRVFrame - bug - ES2 - glActiveTexture

pvrvframe

#1

Using PVRFrame 2.9.29.0649, OpenGL ES 2.0, on Windows (libGLESv2.dll)…
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS return 32, but glActiveTexture starts failing with texture unit >= GL_TEXTURE0 + 8.

Code to reproduce the issue:

GLuint nTexUnits = 8;
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, (GLint*)&nTexUnits); // nTexUnits=32, err=GL_NO_ERROR
for (GLuint i = 0; i < nTexUnits; i++)
    glActiveTexture(GL_TEXTURE0 + i); //err=GL_INVALID_ENUM when i >= 8 !!!
// PVRVFrame: “In glActiveTexture error: 500 (GL_INVALID_ENUM) : texture number is out of range (min: GL_TEXTURE0), max: GL_TEXTURE0 + 7, given: GL_TEXTURE0 + 8)”
[/CODE]

This bugs was not present in PVRFrame 2.8 .*.

<br>GLuint nTexUnits = 8;<br>glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, (GLint*)&amp;nTexUnits); <font color="#006600">// nTexUnits=32, err=GL_NO_ERROR</font><br>for (GLuint i = 0; i &lt; nTexUnits; i++)<br>&nbsp;&nbsp;&nbsp; glActiveTexture(GL_TEXTURE0 + i); <font color="#006600">//err=GL_INVALID_ENUM when i &gt;= 8 !!!</font><br><font color="#006600">// PVRVFrame: "In glActiveTexture error: 500 (GL_INVALID_ENUM) : texture number is out of range (min: GL_TEXTURE0), max: GL_TEXTURE0 + 7, given: GL_TEXTURE0 + 8)"</font></font><font face="Courier New, Courier, mono" size="1"><br></font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><font face="Courier New, Courier, mono" size="1">

This bugs was not present in PVRFrame 2.8 .*.




#2

Hi diafera,

Thank you for your bug report! This bug was unfortunately brought on when attempting to fix a similar bug. We’ve caught this one already, but slightly too late for the release unfortunately. A fix for this should make it into the next release.

Thanks,

Tobias




#3

Hi Tobias,





We are currently being blocked by this issue, do you have a date for this next release that should fix this bug?





Thanks,





Benoît.


#4

Hi Benoît,

Our next release won't be until sometime early next year now. If this is proving to be a major barrier for you, if you can email us at devtech@imgtec.com I should be able to provide you with drop of the tool where this has been resolved.

Thanks,

Tobias



Tobias2011-12-14 17:21:46

#5

ok, thanks!





Benoit


#6

The bug is still present in PVRFrame 2.10@812485…
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS now returns 160 Shocked

Also in PVRFrame 2.10@812485, the Windows dlls for GLES-2.0 and GLES-3.0 reports as being “OpenGL ES-CM 1.1” instead of being “OpenGL ES 2.0”. The ones for Linux/MacOS seems to report fine.