Buffer writes are only allowed in pixel and compute shaders as far as I know.Why not write the size out during the stream out to an indirect buffer? then call compute indirect.
Buffer writes are only allowed in pixel and compute shaders as far as I know.
I would like to use the tesselation unit. Emulating that in a compute shader would certainly possible, but not very performant. Using the pixel shader is costly as I said, but I didn't yet try to disable color writes. But I doubt that will make much of a difference.Hmm tough problem. Here's a crazy question... is this output something that you could easily generate in a compute shader yourself, or are you using tessellation or something in the fixed-function pipeline to generate the triangle stream
Well make sure to render point primitives - one per polygon that you want to output - and disable color writes. The key here is to just invoke a pixel shader 1:1 with the geometry shader (and try to avoid the rasterizer as much as possible) so you can use UAVs. Silly and not really the best performance but it should work.Using the pixel shader is costly as I said, but I didn't yet try to disable color writes. But I doubt that will make much of a difference.