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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement