Experts, help! How can I get entrypoint functions names from the effect?

Started by
5 comments, last by Jolichat 14 years, 10 months ago
Guys, does anyone know how could I get entry points names from effect? I am writing a sample for shaders and effects profiling. If a user pass an HLSL effect to my sample I would like to provide him with as much as possible data about it. If it is possible to get information about effect entrypoins NAMES? I mean exactly NAMES, not a shader code, that is provided by ID3DBaseEfefct->GetPassDesc() function. Thanks a lot.
Advertisement
Get a handle to the function with ID3DXBaseEffect::GetFunction, then use ID3DXBaseEffect::GetFunctionDesc.
MJP: Thanks a lot for the reply!
Yes, I tried the variant you are talking about, but the problem is that I this functionality works for ALL functions in effect, not only for entrypoints. And I don't know how to realize if a function is an entrypoint or just some internal one :(
It would be great if it possible to somehow link function name (or handle, or index) with the pass or technique or shader pointer. But I don't see the way to do it. :((
When you call GetPassDesc, that gives you the index of the vertex shader and pixel shader entrypoint functions. I believe you can pass that index to GetFunction to get the handle you want.
Thanks again for the idea.

It would be great if GetPassDesc() provides function indices, but eh.... :( in reality GetPassDesc returns pointers to already compiled shaders code, not functions indices or handles :(

The problem seems to be unsolvable :((
Oh I see...sorry about that.

I'll leave a message on the DirectX MVP newsgroup, and see if anyone there knows.
Thank you for your help again. It is a real headache for me during last week.

I wonder how do PIX and other shader debuggers implement their functionality? I suppose they have to get such information to execise step-by-step debugging of HLSL code.
DX10 provides a lot of debugging informations for shaders (D3D10GetShaderDebugInfo() function), but DX9 no :(

This topic is closed to new replies.

Advertisement