Jump to content
  • Advertisement
Sign in to follow this  

append/consume buffers, speed penalty?

Recommended Posts

I was wondering if there is a speed penalty for using a append or consume buffer instead of a structured buffer?  How are they implemented?  I don't really have any experience with them and was basically wondering if I should design around a structured buffer with an extra pass to get rid of "empty entries" or just use an append buffer?

Share this post


Link to post
Share on other sites
Advertisement

They're basically the same as having one structured buffer, plus one RW buffer that contains a single integer. When you append into the buffer you're actually doing an atomic increment on that integer to find out which index to write into the structured buffer.

Share this post


Link to post
Share on other sites

The dx11 version usually implement the counter in the global data storage, it is like the local data storage of your computes, limited to 64K. (You can access it with cuda/opencl i believe but not direct x).

 

The dx12 version is explicit, you create the counter buffer yourself, so in theory, no GDS for you, but the driver is still free to sneak in between, but who knows if it does it or not:)

Share this post


Link to post
Share on other sites
11 hours ago, galop1n said:

The dx12 version is explicit, you create the counter buffer yourself, so in theory, no GDS for you, but the driver is still free to sneak in between, but who knows if it does it or not:)

Is there a resource where I can read up on this?  Is this SM5.1/6.0?  I have a resource describing the basics of the dx11 version.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!