Hm, my post just got deleted, I think I'm not allowed to edit my post more than 2 times ? I was just refining the information and fixing typos though.
So using GL_INT in call to glVertexAttribPointer on Adreno 320/Nexus 4 (Android 4.4 drivers) results in a crash. This should be legal on GLES3.
Using GL_UNSIGNED_BYTE results in an undefined behavior. I'm trying to do skinning and my bone indices are GL_UNSIGNED_BYTE, it seems it doesn't get displayed right. I'm also using vec3 inside the shader, so I know it's getting converted to floats in shaders.
Next up is Transform feedback, after glEndTransformFeedback(), I get this error from glDrawElements()
01-14 16:21:23.629: W/Adreno200-ES20(22368): <core_glDrawElementsInstancedXXX:871>: GL_INVALID_OPERATION
While I only do Transform Feedback on one object it seems it doesn't stop at glEndTransformFeedback(). I also get 0 from a query on
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN .
Hi..
Any chance for a simple repro case or psuedo code for the transform feedback problem?
The Adreno SDK has a tutorial (22) on using transform feedback (drawing triangles) and includes a call to query GL_TRANSFORM_FEEDBACK.which might be worth comparing against...
glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, g_hQuery);
glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, g_hFeedbackName);
glBeginTransformFeedback(GL_TRIANGLES);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glEndTransformFeedback();
glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0);
glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
GLuint PrimitivesWritten = 0;
glGetQueryObjectuiv(g_hQuery, GL_QUERY_RESULT, &PrimitivesWritten);
I'll reiterate here since the last thread got deleted alongside my post.
I too am having issues with UNSIGNED_BYTE with glVertexAttribPointer giving me the wrong values in my shaders. Which I am converting to an integer and using as a index in a UBO array for a transformation matrix.
It would be much easier if I could just send a test APK with instructions (like touch button X). I have a large scene I use as the background for this test. I'm also rendering into a shadow map when doing the Transform Feedback and then using the streamed buffer in a normal pass. It's a lot of code. Should there be any problem though with indexing into a
from vertex data provided as GL_UNSIGNED_BYTE ? I know I read on this forum that someone said it's not mandatory in GLES2, but what about GLES3 ?
Side note, just installed the Adreno SDK, says "Emulator failure. Could not initialized ES11 entry point:__es11Initialize". I tried running "AdrenoShaders" in its Assets directory too and there it crashes unexpectedly.
I looked over the tutorial, it seems to me it just exports a single Attribute for Transform Feedback, I'm trying to export 3, I'll post my VS here :
We’ve typically seen this when the developer has an older version of the emulator libraries that their app is linking with.
Basically the error is caused by linking with older emulator libraries. We no longer distribute the ES11 libraries, so if these older emulator libraries are being linked against they’re going to try to load those ES11 libraries that no longer exist, causing the error.
Ok, but I never installed this SDK up until now, I just built with VS2012 and got this. The post link step kind of fails, and must be from Windows 8, you can't easily modify PATH in Win8. As I see it links with
libEGL_d.lib
libGLESv2_d.lib
DelayImp.lib
So it doesn't like with ES 1.1. Does it manually call LoadLibrary ?
Might need more information about which library needs to be loaded. There shouldn't be a reason to link to ES1.1 libraries anymore.
I looked a bit more into it and it seems it fails in
EGLDisplay eglDisplay = eglGetDisplay( EGL_DEFAULT_DISPLAY );
This is the stack for when I get the message "Emulator failure. Could not initialized ES11 entry pointL __es11Initialize" :
user32.dll!WaitMessage() + 12 bytes Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!EnumThreadWindows() + 543 bytes Unknown
user32.dll!DrawFocusRect() + 316 bytes Unknown
user32.dll!SoftModalMessageBox() + 1689 bytes Unknown
user32.dll!CheckRadioButton() + 3294 bytes Unknown
libEGL.dll!_eglDestroyImageKHR@8() + 4449 bytes Unknown
KernelBase.dll!LoadLibraryExA() + 50 bytes Unknown
libEGL.dll!_eglGetDisplay@4() + 103 bytes Unknown
> TransformFeedbackES3.exe!WinMain(HINSTANCE__ * __formal=0x00400000, HINSTANCE__ * __formal=0x00000000, char * __formal=0x002457be, int __formal=10) Line 817 C++
TransformFeedbackES3.exe!__tmainCRTStartup() Line 528 C
So basically nothing starts. VS tells me libEGL.dll and libGLESv2.dll have been loaded so no idea it's trying to load, maybe it tries to fetch some weird extension that doesn't exist on my AMD GPU ? Was this tested on Windows 8 + AMD GPUs ?
Ok, so I have found the issue. It's because I already have the PowerVR SDK installed, it installed libEGL.dll, libGLES_CM.dll and libGLESv2.dll to my C:\Windows\SysWOW64 directory so there was a chance that those were loaded instead of the ones from the Adreno SDK. The weird thing is that the Adreno SDK doesn't contain libGLES_CM.dll but it was being loaded anyway ! Because of that I think it was calling PowerVR code that failed.
Ok, so after about an hour spent into understanding the transform feedback sample I realize it doesn't even do what it's intended and is completely wrong !
First odd point is this : it tries to render to a transform feedback buffer set up with GL_STATIC_DRAW, this is incorrect as it only resides in GPU memory, GL_STATIC_COPY is the right parameter.
Secondly, the transform feedback buffer that is being outputted is NEVER USED. The demo just renders from In memory data and from buffer data (kinda weird too to mix them up) to the transform feedback buffer and then doesn't touch that buffer again, it could work well or it could not work at all you never know.
After reviewing the sample, we agree that the feedback buffer is not read and also that GL_STATIC_DRAW is not the correct parameter (GL_DYNAMIC_COPY is more appropriate). We'll be making changes to this sample in an upcoming SDK release.
Testing with the latest development drivers, there is still the issue of GL_UNSIGNED_BYTE producing undefined results with glVertexAttribPointer. Seems to have the same outcome with glVertexAttribIPointer as well.
Thanks again for reporting.
1) Is it just GL_UNSIGNED_BYTE - what about GL_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, or GL_INT
2) What feedback do you get to conclude undefined results? (is it crashing?)
3) Any glError returned?
4) Is there a simple test apk you can provide?
Thanks again for reporting.
1) Is it just GL_UNSIGNED_BYTE - what about GL_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, or GL_INT
2) What feedback do you get to conclude undefined results? (is it crashing?)
3) Any glError returned?
4) Is there a simple test apk you can provide?
Side note on this one, the official GLES3 specs say that glDrawElements is not supported when doing transform feedback, only glDrawArrays ( I was testing on Desktop AMD hardware where this works btw ).
And secondly, is dynamic uniform access fixed in qualcomm drivers ? like if I have
does it work as expected ? I know a moderator said it's optional in GLES2 but I think it should be mandatory in GLES3, is it not ?
Array indxing with uniforms using non-constant values should work in our current drivers. Let me know which driver it is failing on.