Jump to content
  • Advertisement
Sign in to follow this  
janta

[D3D10] Validating an InputLayout against a compiled vertex shader

This topic is 3991 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

Hi everyone, I am making a tool which takes a vertex shader, a pixel shader and an input layout description and packages that into what I call a "Material". I got the shaders bytecode and their length, and I got an array D3D10_INPUT_ELEMENT_DESC and its length. But since this happens in a tool, I don't have a device available (I don't need to render anything) Do you know a way to validate that the vertex shader and the InputLayout are compatible, without actually creating the vertex shader and the InputLayout, which both require a D3D10 device instance? Since I use a console application, I think I can't create a device, because it requires a valid HWND. Or maybe I could create a fake window and not even show it... This sounds hacky though. I wouldnt like to resort to such things as parsing the shader source code to find out, and I would neither like to wait until runtime in my engine to find out there's an issue. I couldn't find any clean anough solution so far, so I thought asking you wouldn't hurt [smile] regards JA

Share this post


Link to post
Share on other sites
Advertisement
Not sure if this will work, but call

D3D10CreateDevice

with

D3D10_DRIVER_TYPE_NULL

to get a device without a window/swap chain.

Share this post


Link to post
Share on other sites
Damn I was looking at D3D9's documentation... old habit I guess.
Thanks Quat, exactly what i needed!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!