I use compute shaders to compute a triangle list and to store it in a RWStructuredBuffer
. For testing I read this buffer and pass it to the IA via context.InputAssembler.SetVertexBuffers (…)
. This approach works, but is valid only for testing the data for correctness.
Now I want to bind the (already existing) buffer to the IA stage using a resource view (aka without passing a pointer to the vertex buffer).
I am reading some good books (Frank D. Luna, Jason Zink), but they never mention this case.
=============== EDIT:
The syntax I am using here in imposed by the SharpDX wrapper.
I can bind the buffer to the vertex shader via
context.VertexShader.SetShaderResource(...)
, bindig a ResoureceView. In the VS I useSV_VertexID
to access the buffer. So I HAVE a working solution for moment, but there might be cases in the future where I must bind the buffer to the input assembler.