Forums - GLSL 300 ES: 0U interpreted incorrectly as signed integer

6 posts / 0 new
Last post
GLSL 300 ES: 0U interpreted incorrectly as signed integer
harism
Join Date: 10 Nov 12
Posts: 4
Posted: Fri, 2014-07-11 15:31

Not sure is this correct place to share bugs but Adreno OpenGL ES driver shipping with Android L developer preview image (LPV79) seems to behave incorrectly with value 0U within shader code.

Device: Nexus 5 @ Android L developer preview image LPV79

Fragment shader code:

#version 300 es
out vec4 outColor;
void main() {
  uint value = 0U;
  if (value == 0U)
    outColor = vec4(1.0);
}

Error observed during GLES30.glCompileShader:

ERROR: 0:4: '=' :  cannot convert from 'const int' to 'uint'
ERROR: 0:5: '==' :  wrong operand types  no operation '==' exists that takes a left-hand operand of type 'uint' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 2 compilation errors.  No code generated.

This is easy to fix with using 0x0U instead for example but letting you know in any case.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Wed, 2014-07-30 11:02

Hi..

Thanks for reporting this issue with the 0U constant.  We think it's been fixed recently.  Do you have an apk that duplicates the problem?

 

 

  • Up0
  • Down0
harism
Join Date: 10 Nov 12
Posts: 4
Posted: Thu, 2014-07-31 12:02

I created a simple test application which pretty much prints shader compile log on LogCat only (produces same error as my original post). APK is created for Android-L due to my only device runs it at the moment. Adding links for pre-built debug APK and zipped Android Studio project for it.

https://www.dropbox.com/s/8qjf8y5w58dvvhu/SignedInt-debug.apk
https://www.dropbox.com/s/prs1g9ubm0zobu3/SignedInt.zip

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Thu, 2014-07-31 13:07

Appreciate getting the apk.  When we try installing, we're getting an "INSTALL_FAILED_OLDER_SDK" .  Can you lower the minSDKVersion if possible?  We want to check on several devices/API versions..

 

 

  • Up0
  • Down0
harism
Join Date: 10 Nov 12
Posts: 4
Posted: Thu, 2014-07-31 14:23

Ah, my bad, of course it's possible to build this test application using lower API. Here's same application built with SDK 19 (I do not have 18 installed) and minSDK is set to 18.

https://www.dropbox.com/s/s6aubz7v1by9hnr/SignedInt-v18-debug.apk

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Tue, 2014-08-19 13:31

Sorry for the delay.. We've confirmed this to be fixed in our current software and it should make its way to a commerical release eventually.

Appreciate the help in providing precision test cases.

 

  • 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.