Sign in to follow this  

Direct3D 11.3 and SM 5.1?

This topic is 478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

tldr; Shouldn't a ID3D11Device3 be able to load a vs_5_1 shader?
 
I'd like to make use of Dynamic Indexing which was made possible in SM5.1 - https://msdn.microsoft.com/en-gb/library/windows/desktop/mt186614(v=vs.85).aspx
 
As far as I can tell SM5.1 is available (at least partially?) in D3D11.3 - https://msdn.microsoft.com/en-us/library/windows/desktop/dn933277(v=vs.85).aspx
 
However if I 
  • 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]
I'm using; Windows SDK 10.0.14393, d3dcompiler_47, fxc 10.1, D3D_FEATURE_LEVEL_11_1, 970GTX with driver 372.54, VC++ 14

Share this post


Link to post
Share on other sites

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
Edited by Jesse Natalie

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

This topic is 478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this