Jump to content
  • Advertisement
Sign in to follow this  
NiteLordz

D3DCompile Error

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

I have an offline compiler for my shaders. It works fine when i don't use the D3D10_SHADER_DEBUG flag. When i use my production flags
D3D10_SHADER_OPTIMIZATION_LEVEL3 | D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_WARNINGS_ARE_ERRORS it compiles, saves out to file and i can load them into my engine, compile them with

device->CreateVertexShader(byteCodeVS_, byteCodeSizeVS_, &vertexShader_)

and have no problem. When i set the debug flag, i get the following error from the d3d console

D3D10: ERROR: ID3D10Device::CreateVertexShader: Encoded Vertex Shader size doesn't match specified size. [ STATE_CREATION ERROR #166: CREATEVERTEXSHADER_INVALIDSHADERBYTECODE ]

Inside my compiler, i have checked that shaderBuf->GetBufferSize() returns 10164 and that is what is written to file. when read back i have verified that the size i am reading is 10164 and try to compile but recieve the above error message.

my goal is to get a debug shader that i can use inside of Parellel NSight so i can debug my shader(s).

Thanks much for any help

Share this post


Link to post
Share on other sites
Advertisement
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!