Forums - Adreno 530 and multiple render targets (MRT) with GL ES 3.0

3 posts / 0 new
Last post
Adreno 530 and multiple render targets (MRT) with GL ES 3.0
tomana
Join Date: 26 Jan 15
Posts: 2
Posted: Sun, 2017-09-10 10:34

Hi,

I'm experiencing an error on Adreno 530 when using multiple render targets (MRT) using GL ES 3.0 and GLSL #version 300 es on Android 7 devices. I've observed the behaviour specifically on the Google Pixel, Google Pixel XL, LG V20 and Samsung S7 (Snapdragon 820 version). I have not seen this on any other GPU, and I have tested Adreno 4xx, Adreno 3xx, Mali, PowerVR, Tegra, on Android 4.4 up to Android 7.

The fragment shader code in question is as follows:

#version 300 es
precision highp float;

layout(location = 0) out vec4 out_a;
layout(location = 1) out vec4 out_b;

When linking this shader program I get this error in 50-60% of cases:

Adreno   Error: Output out_b location or component exceeds max allowed

If I try the array declaration on out, like below:

#version 300 es
precision highp float;

out vec4 out_buffers[2];
The Adreno 530 still fails to link the shader program, but with this output message, in 50-60% of the cases:
Adreno   Error: Output out_buffers cannot find a suitable location/component.

A similar error as the above is reported here: https://tracker.dev.opencascade.org/bug_revision_view_page.php?rev_id=16888

To debug this problem, I've verified that GL_MAX_DRAW_BUFFERS and GL_MAX_COLOR_ATTACHMENTS are both 4 before the shader linking. I've also bound a non-default framebuffer with multiple color attachements and set glDrawBuffers to multiple combinations of GL_COLOR_ATTACHMENTi, GL_NONE, but none of this has eliminated the error.

The specific version of the Adreno driver on the Google Pixel XL causing this error:
Vendor:     Qualcomm
Renderer:  Adreno (TM) 530
Version:     OpenGL ES 3.2 [email protected] (GIT@Idb2b4cb785)

 

What leaves me a bit flustered is that this error happens when linking the shader program. With the exception of the Adreno 530, every other GPU is perfectly fine with compiling and linking my fragment shader, even with the default framebuffer with no addtional color attachement. I cannot see the GL ES 3.0 specification mandating such a check when linking shader programs (but I could be wrong).

Is this a known problem with the Adreno 530 or 5xx series drivers? Or is there something required for using MRT in fragment shaders in GL ES 3.0 that I'm missing?

*/
  • Up0
  • Down0
csmartdalton
Join Date: 3 Jan 18
Posts: 1
Posted: Wed, 2018-01-03 22:48

Same issue here! Have you found a workaround?

  • Up0
  • Down0
tomana
Join Date: 26 Jan 15
Posts: 2
Posted: Thu, 2018-01-11 04:54

Hi, csmartdalton!

Nope, the only workaround I've found is to not use MRT at all. Have had to split up shaders into multiple passes. Basically we are at OpenGL 1.x feature level wrt. MRT (i.e no MRT). Really hoping for a solution/workaround here, so if you find something, please let me know!

Regards,
Tom

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