KhronosGroup / OpenGL-API

OpenGL and OpenGL ES API Issue Tracker
34 stars 5 forks source link

GL 4.6: GL_PARAMETER_BUFFER and memory barriers #17

Closed NicolBolas closed 6 years ago

NicolBolas commented 6 years ago

ARB_indirect_parameters (and the equivalent GL 4.6 specification) does not define a glMemoryBarrier bit that allows writes from image load/store and SSBOs to be visible to parameter buffer reads. And none of the existing barriers are stated to provide this functionality.

So at present, it seems impossible to use image load/store or SSBOs to write indirect parameters. Only atomic counters can write to them from shaders, assuming that is the intent of the atomic counter feature.

nhaehnle commented 6 years ago

This only affects the drawcount. COMMAND_BUFFER_BARRIER_BIT should be extended to mention MultiDraw*IndirectCount.

While we're at it, the type of the maxdrawcount of MultiDrawArraysIndirectCount should be sizei (like MultiDrawElementsIndirectCount).

NicolBolas commented 6 years ago

I assume you mean GL_COMMAND_BARRIER_BIT.

nhaehnle commented 6 years ago

Yeah, obviously :)

pdaniell-nv commented 6 years ago

Discussed in the WG meeting today. We agree with Nicolai's suggestion. @nhaehnle can you make a proposed spec change here for Jon to incorporate? Thanks.

nhaehnle commented 6 years ago

Also sent a pull request for the spec internally. Not sure if that's the best procedure, but it's only a handful of words that change...

https://gitlab.khronos.org/opengl/API/merge_requests/4

oddhack commented 6 years ago

This will be fixed in the next public spec update.

oddhack commented 6 years ago

(Coming soon).