This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

is extension GL_OES_EGL_image_external_essl3 not working properly in compute shader on Mali G71 gpu?

I am trying to do some image processing on the camera feed using the compute shader on Android devices. However I am reading all black from the samplerExternalOES on the Samsung S8.

I bind the texture like so:

GLES31.glActiveTexture(GLES31.GL_TEXTURE0);
GLES31.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, mTextures[0]);
GLES31.glUniform1i(mCameraUniform[TEXTURE], 0);

My compute shader:
"#version 310 es\n"
+"#extension GL_OES_EGL_image_external_essl3 : enable\n"
+"uniform samplerExternalOES sTexture;\n"
+"uniform float width; \n"
+"uniform float height; \n"
+"layout (local_size_x = 4, local_size_y = 4, local_size_z = 1) in;\n"
+"void main()\n"
+"{\n"
+ " ivec2 storePos = ivec2(gl_GlobalInvocationID.xy);\n"
+ " vec4 cameraColor = texture(sTexture, vec2(float(gl_GlobalInvocationID.x)/width,float(gl_GlobalInvocationID.y)/height)).rgba;\n"


The code compiles and runs without throwing any errors, the shaders are computing. However the camera texture is returning all black (0, 0, 0, 1).
The code is working as intended on Adreno GPUs.

Is samplerExternalEOS not supported in compute shaders or am I doing it wrong?

Parents
  • Hi,

    Our driver team has reviewed this, and unfortunately it looks like a bug our side. It definitely is intended to work in compute shaders, but some of the required driver logic is missing when the extension is used on the compute shader path. Unfortunately it looks like all currently shipping drivers are impacted; I'll update this ticket when a DDK release with the fix is available (although updating any specific device is out of our control).

    Thanks for reporting, 
    Pete

Reply
  • Hi,

    Our driver team has reviewed this, and unfortunately it looks like a bug our side. It definitely is intended to work in compute shaders, but some of the required driver logic is missing when the extension is used on the compute shader path. Unfortunately it looks like all currently shipping drivers are impacted; I'll update this ticket when a DDK release with the fix is available (although updating any specific device is out of our control).

    Thanks for reporting, 
    Pete

Children