Jump to content

  • Log In with Google      Sign In   
  • Create Account

D3D11ShaderReflection and Constant Buffer slot


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 judeclarke   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 July 2011 - 10:44 PM

I have been building a subsystem that sets my parameters via what is generated from ID3D11ShaderReflection , however, I seem to be over looking where the ConstantBuffer register slot can be found. The most obvious thing to me would be to have it in D3D11_SHADER_BUFFER_DESC , but I don't see it in there. How can I get the ConstantBuffer's register slot so I can then set it with the Set??ConstantBuffers ?

Sponsor:

#2 Jason Z   Crossbones+   -  Reputation: 5432

Like
0Likes
Like

Posted 25 July 2011 - 10:52 PM

I have been building a subsystem that sets my parameters via what is generated from ID3D11ShaderReflection , however, I seem to be over looking where the ConstantBuffer register slot can be found. The most obvious thing to me would be to have it in D3D11_SHADER_BUFFER_DESC , but I don't see it in there. How can I get the ConstantBuffer's register slot so I can then set it with the Set??ConstantBuffers ?


You are looking for the D3D11_SHADER_INPUT_BIND_DESC, which contains the information about where to bind the constant buffer resource. The reflection API can get a little confusing at times, but if you want to see a reference you can take a look at the RendererDX11::LoadShader() function in my engine (see link below for the project page).

#3 judeclarke   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 July 2011 - 11:23 PM

Oh I see, that was certainly a bit different than what I was expecting. So the BindPoint variable is the register index, right?

#4 Jason Z   Crossbones+   -  Reputation: 5432

Like
0Likes
Like

Posted 26 July 2011 - 12:30 PM

Yes, that is correct.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS