[Mesa-dev] [PATCH 8/8] r600: add support for hw atomic counters. (v3)
Dave Airlie
airlied at gmail.com
Tue Nov 7 18:38:41 UTC 2017
On 8 November 2017 at 03:26, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 07.11.2017 07:31, Dave Airlie wrote:
>>
>> From: Dave Airlie <airlied at redhat.com>
>>
>> This adds support for the evergreen/cayman atomic counters.
>>
>> These are implemented using GDS append/consume counters. The values
>> for each counter are loaded before drawing and saved after each draw
>> using special CP packets.
>
>
> I admit I'm a bit confused by this at the hardware level.
>
> My understanding of GDS is that it's mostly another copy of LDS (but
> global), and all GDS instructions are atomic by default. There is extra
> append-consume hardware, but it's main point is to support use cases where
> operations have to be ordered by wave, or where a wave return is supposed to
> be blocked (for producer/consumer kernels and ring buffer management).
>
> So this should really work without the append/consume counters as well, just
> with regular GDS memory. Is there a particular reason why you haven't done
> that? I suppose it might require more stuff to manage GDS allocations in the
> kernel, and if it works with this approach...
Because this is what the closed source driver did. I've pretty much
had to program
this from traces I took from it.
I don't want to diverge too much from what it did as debugging gets harder.
The append/consume counters should be faster than GDS, and it looks to be why
this extension was created in the first place.
> Acked-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Thanks.
Dave.
More information about the mesa-dev
mailing list