Forums - Structs inside uniform blocks causing glLinkProgram to hang

1 post / 0 new
Structs inside uniform blocks causing glLinkProgram to hang
Maykin53
Join Date: 20 Jul 14
Posts: 10
Posted: Tue, 2014-09-23 07:17

Hi,

I've verified that on Nexus 5, using structs inside a uniform block, like this:
 

struct DirectionalLight
{
vec4 diffuse;
vec4 specular;
vec4 direction;
};
 
layout (std140) uniform LightBlock
{
DirectionalLight dLight0;
DirectionalLight dLight1;
}
causes glLinkProgram to hang.
Doing either of the following fixes the problem:

1. changing from a uniform block to just standard uniforms
2. removing the structs from the uniform block and defining the vec4s in the block directly

It appears that the compiler does not like structs inside uniform blocks.
Are you able to confirm if this is a known issue on Nexus 5?
  • Up0
  • Down0

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.