- write a simple vertex shader
- compile it using fxc to a file (with /T vs_5_1)
- then load that using ID3D11Device3::CreateVertexShader, it reports: D3D11 ERROR: ID3D11Device::CreateVertexShader: Shader must be vs_4_0, vs_4_1, or vs_5_0. Shader version provided: UNRECOGNIZED [ STATE_CREATION ERROR #167: CREATEVERTEXSHADER_INVALIDSHADERTYPE]
Direct3D 11.3 and SM 5.1?
Long shot: Try creating the device with D3D_FEATURE_LEVEL_11_3; if the enumeration is not present in your headers use the value 0xb300
There is no feature level 11.3, but FL12 and FL12.1 exist. I don't think that D3D11.3 actually supports SM5.1, despite what the docs say. Let me double-check...
Edit: Just confirmed:
// SM 5.1 becomes available via the DX12 API only
Cheers Jesse :)
I found dxcapsviewer.exe in the Windows SDK which has also clarified a few things -
Direct3D 11.3 > FL_11_1, FL_12_0 and FL_12_1 = Shader Model 5.0
Direct3D 12 > FL_11_0, FL_11_1, FL_12_0 and FL_12_1 = Shader Model 5.1
Guess it's time to bite the bullet and do the big upgrade to 12 :o
Why do you need dynamic indexing? Most of the time you can get away with indexing const/Tex buffers and texture arrays. Is there something in particular you want to achieve?
I've packed all my various textures that are used in my 3d scene into a set of texture arrays. A texture array (in D3D11) requires they be the same width, height and format, so I 'group by' those values, then copy all the textures into texture arrays and create a lookup table. When it comes time to render, I now bind my texture arrays (currently about 20 of them) and draw all my geometry in a single draw call - this approach is probably a bit overboard I'll admit, but it sure is fast :)
Using dynamic indexing would allow me to index into one of the 20 bound texture arrays.
Just bind a descriptor table of all textures and buffers, and there's no longer a need to split draws according to which resources they require.