Quantcast
Channel: AMD Developer Forums: Message List - OpenGL & Vulkan
Viewing all articles
Browse latest Browse all 631

Re: glMultiDrawElementsIndirect() system hangs

$
0
0

Hi,

 

Yes it appears that I encountered two problems.  The main one is the indirect draw buffer with a count of zero (but not all elements were zero which I think is ok), and yes the second a glMultiDrawElementsIndirect() with a draw count of zero.  However I had to discover the second (and guard around it to stop the system hang) to discover the indirect draw buffer problem.  I am not sure if they were actually directly related in cause.

 

I had persistently mapped buffers for the indirect draw and the instance vertex stream (which consisted of 4 GL_INTs - one being used for the instanceID, and connected to vertex attribute 2).  The index and vertex buffers used were allocated with buffer storage and mapped per frame (The vertex format from here had a position and texture coordinates that were a compressed 8 bytes in size, 16 bit indices).

 

I posted some additional info in the related question top opengl.org here: https://www.opengl.org/discussion_boards/showthread.php/186128-glMultiDrawElementsIndirect%28%29-problems?p=1265880#post1265880

 

Since then I have moved a few things around as I am transitioning things to more modern OpenGL but I believe the problem is still happening - as all I have changed currently is using a persistent staging buffer to upload index/vertex data which is then copied to GPU only accessible buffers used for rendering (draw indirect and instance data still coming from a persistently mapped CPU accessible buffers).

 

Also it would be good to know while I am here if it is recommended against to use the same persistent staging buffer for both index and vertex data at the same time?  - I am writing a mix of index and vertex data in the stream together currently that then get copied out to their respective GPU side index/vertex buffers.

 

Thanks for your response!


Viewing all articles
Browse latest Browse all 631

Trending Articles