r600g: Use a fake reloc to sleep for fences
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>
Tue, 14 Feb 2012 12:06:20 +0000 (12:06 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Feb 2012 14:56:23 +0000 (09:56 -0500)
commit8cd03b933cf868ff867e2db4a0937005a02fd0e4
tree8051cbd2a351e56b423127c54c47a319c7aa590b
parent014198ec8860d8a0abfd6aa0ddd8db9d26febdbb
r600g: Use a fake reloc to sleep for fences

r300g is able to sleep until a fence completes rather than busywait because
it creates a special buffer object and relocation that stays busy until the
CS containing the fence is finished.

Copy the idea into r600g, and use it to sleep if the user asked for an
infinite wait, falling back to busywaiting if the user provided a timeout.

Note: this is a candidate for the stable branches.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h