AnsweredAssumed Answered

Vertex shader stops passing unsigned byte color attribute

Question asked by fthiel on Mar 15, 2018
Latest reply on Jul 25, 2018 by xhuang


we are rendering large amounts of point cloud data and ran into an issue with our AMD GPU (R7 370).

While on the Nvidia GPU everything is fine, on the AMD GPU large parts of the point cloud flickers or is black. A closer examination with CodeXL and RenderDoc (awesome tools, by the way) surfaced that the data is correctly loaded in the memory and passed to the vertex shader, but the shader stops passing the colour values at the 4096th colour value in the memory. This means while rendering, the first 4096 vertices will be coloured correctly and everything beyond will flicker or is just black.

RenderDoc also discovers the following two warnings (VERTEX_ATTRIB[0] is the Colour attribute):

glDrawArrays uses input attribute 'VERTEX_ATTRIB[0]' which is specified as 'type = GL_UNSIGNED_BYTE size = 3'; this combination is not a natively supported input attribute type

glDrawArrays uses input attribute 'VERTEX_ATTRIB[0]' with stride '3' that is not optimally aligned; consider aligning on a 4-byte boundary


Neither of this, the warnings or the behaviour is present on the Nvidia GPU (gtx 980).

If we change stride and size to 4, the warnings and the flickering disappear, but increasing the already large data set with an extra byte per colour seems a bit excessive to me, especially as passing as colours as RGB888 shouldn't be too uncommon.


Are we doing something wrong on the OpenGL side and experiencing unspecified behaviour (that works on Nvidia GPUs by chance) or is this some driver issue? It sounds similar to this thread, but this issue was solved in 2012. Has anyone of you encountered something similar recently?


We assembled a small example program, so you can have a look into the code and build it yourself. You find it here.

If you see a flickering white dot, you have the same issue. If it stays stable it works correct.


Additional info:

GL_VENDOR:            ATI Technologies Inc.

GL_VERSION:           3.2.13507 Core Profile Forward-Compatible Context 23.20.15027.2002

GL_RENDERER:      AMD Radeon (TM) R7 370 Series

Operating System:    Win10 Pro x64