Jump to content
  • Advertisement
Sign in to follow this  

Compute shader and nr of threads, typo or misunderstanding?

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

Hi all,

I'm currently working my way through luna's d3d11 book.
Now arrived in the chapter on compute shaders.

What I've learned/ understood:
- in the CS you can create the shader from x*y*z threads, where the result is ideally a multiple of 32 (cuda) or 64 (wavefront ATI)
- in the application you create A thread groups, if for example you want to compute/ process 1000 pixels of a texture, you'll need this number of groups: A = ceil(1000 / x*y*z).
- the final number is the number of disparch thread ID's (summed up for all thread groups)
- a multiprocessor can handle x thread groups, to fully use available computing power, create x*2 groups, so a stalled multiprocessor can fall back to the other thread group. With 16 multiprocessors, this would be (max) 32 thread groups
- shared memory can be max 32kb, so 16kb per thread group, because if you have 2 per multiprocessor, there wouldn't be enough with >2*16kb

My question;
In the book it says that with a 3x2 grid of thread groups, with 10x10 threads per group, you will get a total of 60 dispatch thread ID's.

Is this a typo? The reason I ask is that I think it should be 600 (3*2*100).

Share this post

Link to post
Share on other sites
Thanks, this clears things up.
From your explanation on the multiprocessors I read that it's a good idea to create a scalable approach to be better ready for the future

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!