Forums - v53 driver textureSize abort

6 posts / 0 new
Last post
v53 driver textureSize abort
Sonicadvance1
Join Date: 2 Nov 12
Posts: 51
Posted: Wed, 2013-12-18 20:27

Using a call to textureSize(sampler2D, 0) in either pixel shaders or vertex shaders causes the drivers to throw a SIGABRT signal.

No need for an example on this one, just use the function.

This is in the latest v53 drivers used on a Nexus 5. Have fun.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Thu, 2014-01-02 09:05

Thanks for reporting this.  Could you provide any of your source code, an apk  and any logs that are generated?

Also want to exactly understand the api call that "textureSize" is referring to.

  • Up0
  • Down0
Sonicadvance1
Join Date: 2 Nov 12
Posts: 51
Posted: Thu, 2014-01-02 16:45

Sure, I've got two shaders here that use textureSize, one is a vertex shader and the other a fragment shader.

Vertex Shader: http://pastie.org/8594908

Fragment Shader: http://pastie.org/8594912

There is a define on line 19 of each of those shaders that wipes out the real textureSize function usage. This method is enough just to get the shader compiler to not crash out, it isn't a fix. I can't be arsed to provide a real fix for every single bug in these drivers. To exhibit the bug in those shaders, one would just need to comment out line 19.

If you want a live application that exhibits the issue, just visit https://play.google.com/store/apps/details?id=org.dolphinemu.dolphinemu

Which would require a bit of settings changes and homebrew to run, I personal prefer http://wiibrew.org/wiki/Starfield for testing purposes.

If you're looking for a test APK that all it does is compile a simple shader that crashes, I don't have one. But here is the most simple shader I can think of that'll hit the issue.

uniform sampler2D samp;

void main()

{

    ivec2 tmp = textureSize(samp, 0);

}

Just go ahead and run with that if you want.

Here is a logcat result of the abort in my application: http://pastie.org/8594927

As to what exactly the api call that textureSize is. If you download the GLSL ES 3.0 shading language specification from http://www.khronos.org/registry/gles/ and review the PDF provided(GLSL_ES_Specification_3.00.4.pdf). You'll see that on page 95, or digital page 101, It has a list of textureSize functions for all of the sampler types. The one in particular that we are looking at here is the sampler2D type. So of course it should return a highp ivec2 that contains the dimensions of the texture bound to the sampler.

I'm expecting a ivec2 to be returned from the function call, not an abort()

  • Up0
  • Down0
Sonicadvance1
Join Date: 2 Nov 12
Posts: 51
Posted: Thu, 2014-01-02 17:42

Sure, I've got two shaders here that use textureSize, one is a vertex shader and the other a fragment shader.

Vertex Shader: http://pastie.org/8594908

Fragment Shader: http://pastie.org/8594912

There is a define on line 19 of each of those shaders that wipes out the real textureSize function usage. This method is enough just to get the shader compiler to not crash out, it isn't a fix. I can't be arsed to provide a real fix for every single bug in these drivers. To exhibit the bug in those shaders, one would just need to comment out line 19.

If you want a live application that exhibits the issue, just visit https://play.google.com/store/apps/details?id=org.dolphinemu.dolphinemu

Which would require a bit of settings changes and homebrew to run, I personal prefer http://wiibrew.org/wiki/Starfield for testing purposes.

If you're looking for a test APK that all it does is compile a simple shader that crashes, I don't have one. But here is the most simple shader I can think of that'll hit the issue.

uniform sampler2D samp;

void main()

{

    ivec2 tmp = textureSize(samp, 0);

}

Just go ahead and run with that if you want.

Here is a logcat result of the abort in my application: http://pastie.org/8594927

As to what exactly the api call that textureSize is. If you download the GLSL ES 3.0 shading language specification from http://www.khronos.org/registry/gles/ and review the PDF provided(GLSL_ES_Specification_3.00.4.pdf). You'll see that on page 95, or digital page 101, It has a list of textureSize functions for all of the sampler types. The one in particular that we are looking at here is the sampler2D type. So of course it should return a highp ivec2 that contains the dimensions of the texture bound to the sampler.

I'm expecting a ivec2 to be returned from the function call, not an abort()

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Wed, 2014-01-15 10:47

I've successfully duplicated this problem on a current driver release, and will investigate further.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Wed, 2014-01-15 11:31

I also confirmed that textureSize seems to work ok in a new kit kat build we have internally (Jan 2014), and presuming that the fix will proprogate into released builds in the near future.

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