Forums - GL_INFO_LOG_LENGTH returns 0 at all times.

4 posts / 0 new
Last post
GL_INFO_LOG_LENGTH returns 0 at all times.
Sonicadvance1
Join Date: 2 Nov 12
Posts: 51
Posted: Tue, 2013-06-18 08:12

So when debugging my shaders on my Galaxy S4, when it fails to compile, which I'm checking with a basic glGetShaderiv(shader, GL_COMPILE_STATUS, &compileStatus); I go to check how long the info log length is, so I can allocate a buffer for the result.

Using the following code to get the info log

glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);

On failure to compile, the length returned is always zero, So I'm currently working around this by forcing getting the infolog on compile failure with a set buffer size.

Then a issue is with glGetShaderInfoLogLength.

glGetShaderInfoLog(shader, 4098, &charswritten, (GLchar*)infolog);

Even with the overly large max set to 4098, your driver always maxes out at 1023(so 1023 characters and a null terminator).

due to a spam of text saying "WARNING: Creating/Delete Macro object," this easily exceeds the drivers set max of 1024 bytes that seems to be arbitrarily set. Thus it makes it quite difficult to debug the shaders I'm trying to compile.

  • Up0
  • Down0
Sonicadvance1
Join Date: 2 Nov 12
Posts: 51
Posted: Tue, 2013-10-08 06:34

Has either of these two issues been fixed on your end yet?

I've tested with V45 drivers on the LG G2 and it isn't yet fixed there.

  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Tue, 2013-10-08 13:54

The issues with reporting a zero length and the spammy error log were fixed a while ago, but it's always hard to say how long it'll take to make it into a commercial driver. That process is far more complicated than anyone realizes.

The 1024 character limit was set due to a customer request, but we're currently evaluating increasing it for everyone other than that customer.

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 56
Posted: Thu, 2013-10-10 14:40

"That process is far more complicated than anyone realizes."

Well, do tell, we're all ears, at least we know who to blame, right ?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.