Forums - Adreno 330 GLES3 [email protected] compiler issue - corrupted textures when using gl_PointCoord

2 posts / 0 new
Last post
Adreno 330 GLES3 [email protected] compiler issue - corrupted textures when using gl_PointCoord
sinisterchipmunk
Join Date: 3 Oct 14
Posts: 2
Posted: Fri, 2014-10-03 14:36

I'm testing code that runs fine on a Samsung Galaxy Note 10.1" 2014 (Mali-T628) on a Samsung Galaxy S5 (Adreno 330) for the first time and am experiencing a few GLSL (ES 3.0) issues. I'll post different issues to different topics. Note that these are up-to-date production devices I am testing on; I'm unaware if these issues have been resolved in unreleased drivers.

I'm rendering points with GL_POINTS, using gl_PointCoord for texture coordinates. I've been experiencing garbled and corrupted-looking results. Finally by reading numerous posts on this forum, I found that there have been compiler issues relating to expression complexity. My code isn't terribly complex:

#version 300 es

precision mediump float;
uniform sampler2D frame0;

in vec4 color;

layout(location = 0) out vec4 o_fragColor;

void main(void) {
  vec4 tex;
  tex = texture(frame0, gl_PointCoord);
  o_fragColor = color * tex;
}

I (eventually) decided to simplify it according to the other forum posts in the only way I could see. It worked. My workaround is incredibly simple:

#version 300 es

precision mediump float;
uniform sampler2D frame0;

in vec4 color;

layout(location = 0) out vec4 o_fragColor;

void main(void) {
  vec4 tex;
  vec2 coords = gl_PointCoord.xy;
  tex = texture(frame0, coords);
  o_fragColor = color * tex;
}

 

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Fri, 2014-10-17 13:42

We've been able to both duplicate your problem on an Adreno 330 driver, and also confirm that the problem is fixed in our newer drivers, without the need for the workaround.

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