Jump to content

  • Log In with Google      Sign In   
  • Create Account

max343

Member Since 04 Nov 2012
Offline Last Active Apr 12 2016 11:41 PM

Posts I've Made

In Topic: [D3D12] Resource Barriers in Multiple Command Lists

12 April 2016 - 10:55 AM

A fence is sufficient to synchronize UAV access from different queues.

 

This is contradictory to what some NVIDIA engineers have been telling me. The procedure I described is not one I invented on my own but rather was given to me by NVIDIA with all the remarks.


In Topic: [D3D12] Resource Barriers in Multiple Command Lists

12 April 2016 - 10:11 AM

For the sake of completeness, number 2 is a bit more complicated than that for the case when A writes to UAV and B reads from it (which is the more widespread way to use async compute).

 

First things first, fences do not ensure UAV writes by themselves. In essence fence is just waiting for a counter to reach certain value, that counter is set on execution queue, while UAV writes happen elsewhere. So if you have your A (on compute queue), it most likely writes to UAV so it cannot be synchronized by a fence just like that.

Second thing to get out of the way is that while the dependency A->B is quite clear, the dependency of B->A is much less clear but it's there (WAR hazard). So you need to synchronize two things, A->B and B->A.

 

Starting from the easy one, B->A. If all B does is reading (SRV) then it's enough to use a fence to synchronize since all reads happen during or before execution. So when B finishes, the counter increments and that means you're free to write stuff to the buffer.

A->B is a bit more complicated since you need to ensure UAV writes. This can be done explicitly by putting a resource barrier of UAV type on the same queue A is executing on, but before incrementing (signaling) the fence. While the actual resource transition happens on queue that B is executed on (due to limitations mentioned in "1").

 

Remember that buffers are created with implicitly set D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS, so that means the hardware will not prevent access to the same buffer scheduled from two different queues. You need to ensure correctness on your own.


In Topic: Point inside convex polyhedron defined by planes

22 February 2013 - 03:15 PM

I don't have inequalities in my solution. What I suggested disregards direction because it already assumes that the feasible region of the half spaces defines a convex polyhedron. If we'd flip one of the inequalities, the feasible region would be empty.

In Topic: Point inside convex polyhedron defined by planes

22 February 2013 - 01:28 PM

But the simplex algorithm doesn't search through interior points, just through the boundary. Phase I just finds a boundary vertex of the feasible region or returns that the problem is infeasible.
OP wanted something close to the centroid, this is distinctly an interior point.

In Topic: Point inside convex polyhedron defined by planes

22 February 2013 - 03:53 AM

This sounds similar to finding a feasible solution to a linear-programming problem, so I am sure there is literature about it. This seems to be called "Phase I" in the simplex algorithm. I read the description in Wikipedia, but I am not sure I understand it.

I don't think that Simplex algorithm is the best choice here, since it searches for maximum on the boundary, while OP wanted some interior point.

PARTNERS