Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, given the pass

pass p0
    SetVertexShader(CompileShader(vs_4_0, VSFunction()))
    SetPixelShader(CompileShader(ps_4_0, PSFunction()))

Ss it possible to retrieve the names VSFunction and PSFunction? It doesn't look like any of the associated shader descriptors actually contain the name of the entry point.

share|improve this question
up vote 1 down vote accepted

When an HLSL effect is compiled, the entry point names don't show up anywhere in the bytecode (you can check it yourself using fxc.exe and a hex editor). Since the bytecode is the input to the Effect API, I don't believe there's any way to extract the entry point names.

The entry point names do appear in the debug information (which is included in the bytecode if you ask for it with a compiler flag). If the shader was compiled with debug information, it can be extracted using D3DGetDebugInfo, but as far as I know, the format of this information is undocumented.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.