I use reflection to get the named parameters
ex.
cbuffer PerFrame {
float4 something;
}
I get the name something back, and then i can use that name ( stringhash ) to set my shader constants. Now i have moved onto using StructuredBuffers as they give me a little more speed, however, all the examples i have seen that use StructuredBuffers, when they set hte shader resource, they set it as an index value
ex.
pd3dImmediateContext->CSSetUnorderedAccessViews( 0, 1, ppUAViewNULL, NULL );
ex.
pd3dImmediateContext->CSSetShaderResources( 0, 2, ppSRVNULL );
inside my offline compiler, when i step thru, and examine the refection code, i notice that the buffer is named "$Element", which doesn't do me any good for the most part.
My question is, is it possible to name StructuredBuffers and be able to gain access to that name thru reflection?
if not, i am afraid that hardcoding the startSlot of the buffers will become troublesome, if i start adding in additional buffers, and then manipulate the shader, but forget to change the start slot numbers
Thanks much for any help