Closed aconstlink closed 1 year ago
The error was due to a wrong setting in the D3D11_SHADER_RESOURCE_VIEW_DESC
s buffer field, where the number of elements needed to be set to the number of elements in the streamout buffer times the number of layout elements.
res_desc.Buffer.NumElements = UINT( obj.size() * obj.get_buffer(i).get_num_layout_elements() ) ;
When reading from a
streamout_object
bound as a buffer to a HLSL shader for data access, there seems to be missing some data. This is not the case when using a buffer from anarray_object
. The image is from a more complex test that uses nsl and performs a particle simulation loop using a streamout/feedback shader.The left side shows the d3d11 version where some particles(points) are missing as the data is rendered using quads and read from a buffer.
This should be fixed immediately due to the streamout techniques central usability.