[Mesa-dev] [PATCHv3] r600g: Use a fake reloc to sleep for fences
simon.farnsworth at onelan.co.uk
Fri Feb 10 02:25:49 PST 2012
On Thursday 9 February 2012 20:31:18 Marek Olšák wrote:
> 2012/2/9 Simon Farnsworth <simon.farnsworth at onelan.co.uk>:
> > On Wednesday 8 February 2012 18:28:05 Michel Dänzer wrote:
> >> On Fre, 2012-02-03 at 17:32 +0000, Simon Farnsworth wrote:
> >> > --- a/src/gallium/drivers/r600/r600_hw_context.c
> >> > +++ b/src/gallium/drivers/r600/r600_hw_context.c
> >> > @@ -1623,6 +1623,13 @@ void r600_context_emit_fence(struct
> >> > +
> >> > + /* Create a dummy BO so that fence_finish without a timeout
> >> > can sleep waiting for completion */ + *sleep_bo = (struct
> >> > r600_resource*) +
> >> > pipe_buffer_create(&ctx->screen->screen, PIPE_BIND_CUSTOM, +
> >> > PIPE_USAGE_STAGING, 1); + /*
> >> > Add the fence as a dummy relocation. */
> >> > + r600_context_bo_reloc(ctx, *sleep_bo, RADEON_USAGE_READWRITE);
> >> Sorry for only thinking of this now, but what's the advantage of doing
> >> this here, rather than in r600_create_fence()? Seems like that would
> >> be
> >> simpler and cleaner.
> > I've done it here because this is the bit of code that deals with all
> > the
> > hardware-related stuff, and it already knows about writing out
> > relocations. I have no particular opinion either way, though, and
> > wouldn't get upset about moving it. Thoughts?
> FWIW, the "hw_context" files are there for historical reasons only. There is
> nothing wrong with adding relocations and emitting commands from the other
> places of the driver. Eventually, r600.h, r600_pipe.h, and
> r600_hw_context_priv.h will be merged together.
OK, so when I rebase this onto master (which will be v4), I should move the
sleep_bo into r600_create_fence.
Is there anything else that needs to be done before this can be considered
for merging to master?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 490 bytes
Desc: This is a digitally signed message part.
More information about the mesa-dev