I went the same way, and this is what I fought with. Because DirectX10 made a lot of changes to the interface, allowing more general control.
Sooner or later you will get used to the buffers and find that they are actually pretty neat.
Here are some benefits and tips:
Now there is a single way to link vertex, index, and persistent data to the pipeline, namely the Buffer class.
The buffer does not care about the data layout. You can write any combination of floats, not just matrices and vectors. I usually combine all the constants of one buffer into float[] and then use a loop to write it to the stream.
Constants are packed into registers, each of which supports up to four 32-bit components.
You can manually set constants using the packoffset() function of HLSL. There are some rules you should consider.
Since you can link multiple constant buffers in one step, it is recommended that you separate your constants by the frequency of their updates. For example, representation and projection matrices are usually updated after each frame, while the world matrix will change for each grid. To ensure optimal performance, you must create two buffers, one of which contains the data of each frame, and the other for the data in the cell.
Finally, the limitations for persistent buffers are :
Each persistent buffer can contain up to 4096 vectors; each vector contains up to four 32-bit values. You can bind up to 14 constant buffers to one stage of the pipeline (2 additional slots are reserved for internal use).
source share