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

Uniform blocks : Optimal qualifiers

Greetings,

I'm currently playing with OpenGL ES 3.0 and I'm wondering if Mali (>= T6xx) drivers can perform interesting optimisations based on the chosen layout qualifier applied to Interface Blocks  ? (shared, packed, std140, row_major, column_major)

The fact that Std140 avoids pinging the OpenGL implementation, about the data layout, makes me wonder if there's any reason to choose another layout qualifier.

  • If a uniform block is shared between multiple programs, is it useful to choose shared ? Even though the uniform block will just get its data from a Uniform Buffer Object ?
  • Does packed really provides useful memory optimisations for OpenGL programs ?
Parents
  • The explicit locations set in the shader define the bind point name used for each symbol; without this explicit setting they can be set arbitrarily by the driver and different drivers will do different things with them. All the explicit location support means is that if you set the location in the shader you no longer need to call glGetUniformLocation at run-time, you can just use the pre-defined location value set in the shader source code. 

    HTH, 
    Pete

Reply
  • The explicit locations set in the shader define the bind point name used for each symbol; without this explicit setting they can be set arbitrarily by the driver and different drivers will do different things with them. All the explicit location support means is that if you set the location in the shader you no longer need to call glGetUniformLocation at run-time, you can just use the pre-defined location value set in the shader source code. 

    HTH, 
    Pete

Children