Forums - Adreno 220 GLSL Internal Error

7 posts / 0 new
Last post
Adreno 220 GLSL Internal Error
original_red
Join Date: 5 Feb 13
Posts: 5
Posted: Fri, 2013-03-29 07:19

I'm having a weird "Internal Error" from linking a GLSL program, strange that glGetShaderInfoLog isn't producing junk.

I'm using a shader generator (I know Uber shaders are discouraged, but i'm using a semi-deferred renderer (depth pass first, then texture & lighting)) Everything works fine (~20fps@720p) with multiple lights, until I insert the per pixel fog, then it all comes crashing down with a compile error. 

I've attached a sample fragment/vertex shader pair with the problem (sorry it seems obfuscated, it's been passed through https://github.com/aras-p/glsl-optimizer (which means there's nothing wrong with the code syntactically) - and it compiles with the PVR offline compiler without error). 

One question at the back of my mind is "Is there a hard instruction limit?".

 

P.s. Is there a way around the junk output from glGetShaderInfoLog, it works fine on other platforms.

 

  • Up0
  • Down0
original_red
Join Date: 5 Feb 13
Posts: 5
Posted: Fri, 2013-03-29 07:36

Oh, and the actual output is...

Quote:

--From Fragment Shader:
--From Vertex Shader:
Internal error

 

 

  • Up0
  • Down0
original_red
Join Date: 5 Feb 13
Posts: 5
Posted: Fri, 2013-03-29 08:12

Solved...

gl_FragCoord.z / gl_FragCoord.w

Was the culprit. Calculated depth differently and has fog.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Mon, 2013-04-01 12:43

Hi...

We took a look at the shaders with a different tool and got the following message:

Error: Symbol uEyePosition defined with different precision in vertex and fragment shaders.

Program object validation failed.

What seems to be happening is, the VS sets that uniform to high precision, while the FS forces medium precision. That’s not ok with uniforms. Note also that uEyePosition is the only uniform that’s common to the VS and FS, hence the InfoLog only has two error messages, one for the VS and another for the FS.

 

Not sure why you are seeing junk coming from the shader log, though.  Which driver and device are you using?

 

Also the Adreno 220 has a limit of 512 shader instructions (VS + FS)

 

 

  • Up0
  • Down0
original_red
Join Date: 5 Feb 13
Posts: 5
Posted: Tue, 2013-04-02 13:40
Thanks for the debug, the device i'm using is a Sony xperia s (lt26i I think) and the gl shader compile log usually doesn't return anything (i'm having to use the PVR offline glsl compiler to debug as it's the only tool I can find that runs under linux, doesn't find any problems tho) - the garbage i'm getting is from the program linking. I'll take a look at my code to see if it's anything to do with that (wrote the code 3 Months ago, so not fresh in memory). It doesn't help that the linux port of my engine (same codebase (gl3 tho), same shaders) doesn't produce errors either and runs fine (although the precision specifiers are #ifdef'd out, which'll be why that one slipped by). I suppose 'hard to debug' is one of the pitfalls of using a shader generator (very, very pretty gfx tho). On a side note... Most of your chips run a linux based operating system, yet no tools for linux????? (the adreno sdk runs very poorly, if at all under wine although the PVR toolkit wants root access to run (ack!)) - I don't think it'll take much to port the adreno sdk to Qt or gtk. Can someone look into it please.
  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Thu, 2013-04-04 07:50

Mac and Linux ports of our tools will be coming soon.

  • Up0
  • Down0
original_red
Join Date: 5 Feb 13
Posts: 5
Posted: Sat, 2013-04-06 04:44
Sorry, soon is a relative concept - for me, soon means "by the end of the day" (obviously not in this case). How 'soon' is soon, a week, a month, a year, before the turn of the century?
  • 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.