Jump to content
Posted 11 February 2014 - 05:51 PM
Posted 11 February 2014 - 06:27 PM
I don't think there's a limit, aside from how much memory that the driver can allocate. For reading a buffer in a compute shader you're probably going to want to use a structured buffer. Unfortunately D3D11 has a silly restriction that you can't create a buffer with both D3D11_BIND_VERTEX_BUFFER and D3D11_BIND_SHADER_RESOURCE, so if you want to read from a buffer in a shader then it can't be a vertex buffer. However if you create the buffer as a structured buffer and you need to rasterize it with the graphics pipeline, you can always just directly read from the buffer a shader resource view in your vertex shader using SV_VertexID.
Posted 12 February 2014 - 03:26 AM
The resource limits can be found here: http://msdn.microsoft.com/en-us/library/windows/desktop/ff819065(v=vs.85).aspx. Generally speaking the maximum size of any resource is 1/4 the total video ram, with a minimum of 128MB, up to a max of 2GB. As MJP pointed out a structured buffer is the best thing to use for passing the data.