I was making a new shader designed for just GLES3, it was supposed to copy color and depth through gl_FragDepth but I think I just stumbled upon a weird issue where if I compile and link the VS and PS I get a crash.
VS :
#version 300 es
uniform mat4 ProjectionMatrix;
uniform mat4 InvMVP;
uniform float Time;
uniform vec2 Resolution;
uniform vec3 SunPos;
uniform vec2 StretchRatio;
in vec4 POSITION;
in vec2 TEXCOORD;
out vec2 OutTexcoord;
void main()
{
vec2 Coef = StretchRatio;
if (Coef.x > 1.0)
Coef.x = 1.0;
if (Coef.y > 1.0)
Coef.y = 1.0;
vec2 InTexcoord = TEXCOORD;// * Coef;
InTexcoord *=Coef;
InTexcoord.y = Coef.y - InTexcoord.y;
gl_Position = POSITION;
OutTexcoord = InTexcoord;
}
PS :
#version 300 es
precision highp float;
uniform sampler2D Texture0;
uniform sampler2D Texture1;
in vec2 OutTexcoord;
layout(location = 0) out vec4 FragColor;
void main()
{
vec4 Color = texture( Texture0, OutTexcoord );
vec4 Depth = texture( Texture1, OutTexcoord );
FragColor = Color;//if I comment this, everything runs just fine !
//gl_FragDepth = Depth.x;
}
So basically if I comment out writting into FragColor it compiles/links ok and I get no issues, as it is, it compiles ok but crashes when it's linking.
Hi..
Thanks for reporting the crash. We've attempted to duplicate this on several devices here including a Nexus 4 and are unable to duplicate the crash. Can you provide a sample apk, information about the build loaded on your Nexus 4 (date, Android version) and also the shader log?
While I haven't resolved the above issue, I still see that my instanced tesselation shader is crashing on my Nexus 4. So there must be something wrong with UBOs that do random indexing/fetching.
I just made an apk that results in a crash. I'm not 100% sure it's the driver or what it is cause I can't put breakpoints in android as I found no IDE to easily do that but it crashes right before fetching the log after a glLinkProgram(). I'm currently using this particular CyanogenMod image/version:
11-20141008-SNAPSHOT-M11-mako
And it's Android 4.4.4 . I was wanting to test with the new 5.0 but looks like there's nothing official on that.
Here's the APK
https://drive.google.com/file/d/0B0P3ptcNhBGzRlRnQm44V1UzVUE/view?usp=sh...
Thanks for providing the apk. We've tried installing and running it on one of our 8084 devkits with a recent build, and it seems to run ok. Are there specific instructions to cause the crash?
Just pressing the "Start Benchmark" button without pressing any other buttons should cause the crash. I'm waiting for the official 5.0 images to try again, maybe something's changed. Is that devkit with an Adreno 320 though or your latest 420+ ?
The dev kit has an Adreno 420. The benchmark seems to run through ok when the "start benchmark" button is pressed.
What driver revision is on dev kit, is it v95?
Well, this has made me a quite curious. Since Qualcomm's latest chip is the Adreno 420, are the older chips like Adreno 320/330 still being worked on ? Like are you still fixing bugs & issues for those chips or you've just moved on and those chips are stuck with whatever drivers they currently have ?
I've installed the Android 5.0 AOSP on my Nexus 4 and while it doesn't crash anymore when it sees my Instance Tesselation shader, I don't see the expected results on it, rather chaotic triangles, about 1/4 of total.
Expected image : https://drive.google.com/file/d/0BwDjq7lQ5oRBNkFDYVMyZjFXZkU/view?usp=sh...
Nexus 4 Android 5.0 drivers : https://drive.google.com/file/d/0BwDjq7lQ5oRBYXRwUU5RekFub1k/view?usp=sh...
the GL_VERSION also says @95 AU@ (GIT@I4803bd6c29)
The issue isn't so much whether or not we're fixing bugs and addressing issues, it's whether or not our customers are willing to pick up those fixes and roll them out. Here's a simplified, high level view of how it works:
We're taking steps to improve this situation, but there is no easy fix, because there are legitimate reasons for things working the way they do currently.
Maybe you could ask google to include an extra option in the developer options for switching between driver versions similair to their dalvik / art switch, ie:
Current stable driver - Driver included in factory stock Android / OTAs.
Update to latest developerment driver - It checks Qualcomms site for a newer driver and downloads it the same way it would when it checks for a new ota update in a different folder / place to the stable driver so it doesn't overwrite it.
To me this makes far more sense than having to root and install custom recovery then having to check your website for a new development driver, if the development driver creates new issues you can always switchback to the stable driver without having to reflash the stock driver everytime.
Hi, I'm facing the same kind of issues.
v66 compiler/driver crashes, or stops compiling (for example reporting VS issues while compiling a PS), or produces bad code (gl_VertexId)
v95 compiler/driver solved so much of these issues, that I'm near to stop trying to make my code run on previous driver (I using in nearly 50% of my shaders gl_VertexID, so it's quite tons of code to have in 2 versions, the base one, and a hacked one without gl_VertexID)
(which nearly means at least Android 5.0 as target)
Is it possible to install a v95 compiler/driver on a device running v66 compiler/driver ?
I have a Samsung Galaxy Pro 8.4, running Android 4.4, that will be updated sometime in the future (...) by Samsung, and I would like to use it for development.
I also have a Kindle Fire HDX, running FireOS 4, and I believe it will never be updated by Amazon.
I understand that I can't ask end-user to patch his device, but as a developper, I wish I could :)
How did you solve this, I am having similar issue with Adreno 320 hanging when glFragDepth is used.
After digging through the forum, it seems using OpenGL ES extension library is one solution but including the glesextlib.h gives me redeclaration error for a lot of gl symbols like glReadBuffer etc.