Sign in to follow this  
Mike.Popoloski

ID3D11DeviceContext::CSSetUnorderedAccessViews

Recommended Posts

I ran across this method for the first time today, and was wondering about the usage of the last parameter. The documentation and header seem to imply that it's an array of lengths, but if so what exactly are these lengths? Looking at the samples seems to tell a completely different story; I see these two usages:
pd3dImmediateContext->CSSetUnorderedAccessViews( 0, 1, &pUnorderedAccessView, (UINT*)&pUnorderedAccessView );

ID3D11UnorderedAccessView* ppUAViewNULL[1] = { NULL };
pd3dImmediateContext->CSSetUnorderedAccessViews( 0, 1, ppUAViewNULL, (UINT*)(&ppUAViewNULL) );

These seem quite confusing to me. What exactly is getting passed, and why?

Share this post


Link to post
Share on other sites
The docs should be fixed for the next SDK release.

The 3rd parameter is an initial count offset that will be given to the corrisponding UAV with the COUNTER or APPEND flag set during creation. Other UAV's ignore this value. -1 can be used to keep the current count value associated with the UAV.

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