Jump to content
  • Advertisement
Sign in to follow this  
newMe

RWByteAddressBuffer strange behavior

This topic is 1246 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. I noticed some strange behavior of RWByteAddressBuffer. First it was like i could not initilize it when created. Then i noticed that a value put in it with the Store function does not stay there after the dispatch call and on top of it  there are actually only two functions i can operate with - Store and Load. InterlockedAdd does not seem to have any affect on it. Whatever value is put there i can retrieve only zero. Moreover, when called between  Store and  Load it erases the value put there with Store.

To sum up, 

 

Accum.Store(0, 901);

var = Accum.Load(0); 

 

works. Nothing else does. Even

 

Accum.Store(0, 901);

Accum.InterlockedAdd(0, 0, dummy);

var = Accum.Load(0);

 

would produce 0. Is it worth changing the driver for the graphic card? Maybe i do something incorrectly. I tried different variations, nothing works, now i have run out of options, but i would not want to change the driver if it cannot help.  As a topic with a little generality it probably deserves deletion after somebody answers it and all the more so if nobody does.

 

Share this post


Link to post
Share on other sites
Advertisement

I really doubt that you have driver issue here. How exactly is it that you're determining that your value is getting written into the buffer?

Share this post


Link to post
Share on other sites

I have another buffer that is coupled with a staging resource, i can write to it and read any result by cpu. It is working, i have no doubt about it, it is checked with other buffers, so i can read pretty much any value from any variable at any point. All the other buffers work as expected, i have no problem with them. The byte buffer gives me a hard time with everything but store and load, i cannot initilaze it, a value does not stay there, the member functions do not work. It behaves more like a shared memory than buffer. That is why i thought that maybe there was something wrong with  implementation. I know there are some issues regarding writing and reading from the byte buffer, an attention to the interpretation of the data should be paid, still i think that is not the problem.

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.

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

Sign me up!