Jump to content
  • Advertisement
Sign in to follow this  
Jolichat

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

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

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.

Share this post


Link to post
Share on other sites
Advertisement
Get a handle to the function with ID3DXBaseEffect::GetFunction, then use ID3DXBaseEffect::GetFunctionDesc.

Share this post


Link to post
Share on other sites
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. :((

Share this post


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

Share this post


Link to post
Share on other sites
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 :((

Share this post


Link to post
Share on other sites
Oh I see...sorry about that.

I'll leave a message on the DirectX MVP newsgroup, and see if anyone there knows.

Share this post


Link to post
Share on other sites
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 :(

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!