Forums - table doesn't upload

2 posts / 0 new
Last post
table doesn't upload
kturkowski
Join Date: 3 Aug 12
Posts: 5
Posted: Tue, 2014-01-28 18:01
I am having problems with a shader that makes use of tables. It appears that the tables are not being uploaded. Only the first element of the array seems to be transferred -- the others seem to be zero. This happens in the Adreno 200, 205, 220 and 225. The shader woks fine on GPUs from other manufacturers. Is there any way that I can get this to work, or do I need to blacklist Adreno?
 
Setting table:
glUniform1fv(gidDelta, 16, delta);
glUniform1fv(gidCoeff, 16, coeff);
Fragment shader
uniform mediump float delta[16];
uniform mediump float coeff[16];
uniform highp vec2 dir;
uniform lowp int rad;
uniform lowp sampler2D srcBM;
varying highp vec2 srcCoord;
void main() {
    mediump vec4 acc = texture2D(srcBM, srcCoord) * coeff[0];
    highp vec2 d;
    for (lowp int i = 1; i <= rad; ++i) {
        d = dir * delta[i];
        acc += (texture2D(srcBM, srcCoord + d) + texture2D(srcBM, srcCoord - d)) * coeff[i];
    }
    gl_FragColor = acc;
}
 
 
  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Wed, 2014-01-29 08:42

Thanks for reporting this problem.  We've had some recent fixes to our shader compiler that might address this.

1) Could you let us know the most current device and update you see this problem occuring in?  It would be good to get the OS and build information from the about device screen.

2) Is there an apk you could share which duplicates the problem?

thanks

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