Jump to content
  • Advertisement
Sign in to follow this  
JB2009

DirectCompute: How to get the thread group size of an Effects11 compute shader?

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

Is there a way to get the thread group size (i.e. from the "numthreads" hlsl attribute) of an Effects11 compute shader?

The ID3D11ShaderReflection->GetThreadGroupSize(...) method gives this information, but I can't find a way to get the ID3D11ShaderReflection interface for Effects11 compute shaders (even though Effects11 uses D3DReflect internally).

JB.

[Edited by - JB2009 on October 11, 2010 9:56:24 AM]

Share this post


Link to post
Share on other sites
Advertisement
The function ID3DX11EffectPass::GetComputeShaderDesc() fills in a D3DX11_PASS_SHADER_DESC structure. This structure contains a shader index D3DX11_PASS_SHADER_DESC::ShaderIndex and a ID3DX11EffectShaderVariable. Use these variables to get the shader description that contains the shader byte code with ID3DX11EffectShaderVariable::GetShaderDesc(). From there you can use normal reflection on the byte code to proceed as usual.

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!