Sign in to follow this  

Typed Buffer access range

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

Hey Guys,

 

I encountered a problem where I can't access all the data in my TypedBuffer, it behaved like my BufIdx is cut off at certain number:

 

float readVolume(uint3 u3Idx) {

     uint uBufIdx = u3Idx.x + u3Idx.y*reso.x + u3Idx.z*reso.x*reso.y;

     return tex_srvTSDFVol[uBufIdx];

}

 

it ok if tex_srvTSDFVol reso is 320x640x640 and the problem happens when the reso is 384x768x768 and higher. What's interested is that the cutoff happened in the same place no matter the volume format is R8 or R16 or R32. So I guess the problem is related to uBufIdx range, but uint is 32bit unsign integer so should be ok even for 1024x2048x2048.

 

Are there any other limitations about the size of typed buffer? or are there other silly bug in my code?

 

Thanks

Share this post


Link to post
Share on other sites

I kinda roughly figured out that when 'uBufIdx' is greater than 2^27 I can't get the correct data from my buffer volume. It maybe some silly bug in my program though.

 

I have checked the VSGD capture, the buffer have the right element size for my ps....

 

Any comments on using large TypedBuffer?

Share this post


Link to post
Share on other sites

Have you tried on more than one GPU/Vendor?

I tried on GTX 680m, GTX1080 they all behave the same...  It won't have any problem if this volume is a Texture3D (same reso, same format), so I guess the problem is related to indexing range.... Still trying to figure out why...

Share this post


Link to post
Share on other sites

I believe this isn't the first time I'm hearing about large indices being a problem on NVIDIA hardware. It seems like maybe we've got a gap in our conformance testing. Are you able to try it on AMD/Intel/WARP?

I will try to find a AMD graphics card or Intel chip to test, probably tomorrow, but thanks to let me know that hardware issues possibly relate to this.

Share this post


Link to post
Share on other sites

I kinda roughly figured out that when 'uBufIdx' is greater than 2^27 I can't get the correct data from my buffer volume. It maybe some silly bug in my program though.

The docs say that 2^27 is indeed a hard coded limit on the number of elements that a buffer can hold:

 

https://msdn.microsoft.com/en-us/library/windows/desktop/ff819065(v=vs.85).aspx

Number of texels (independent of struct size) in a buffer: D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP (2²?) texels.

 

 

How big is this resource of yours though?? A look-up-table of hundreds of megs of data?!

Share this post


Link to post
Share on other sites

 

I kinda roughly figured out that when 'uBufIdx' is greater than 2^27 I can't get the correct data from my buffer volume. It maybe some silly bug in my program though.

The docs say that 2^27 is indeed a hard coded limit on the number of elements that a buffer can hold:

 

https://msdn.microsoft.com/en-us/library/windows/desktop/ff819065(v=vs.85).aspx

Number of texels (independent of struct size) in a buffer: D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP (2²?) texels.

 

 

How big is this resource of yours though?? A look-up-table of hundreds of megs of data?!

 

 

Thanks Hodgman, you made my day!  I should have read those limitations before....

Share this post


Link to post
Share on other sites

This topic is 408 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.

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