diff options
author | Tim Rowley <[email protected]> | 2016-02-19 17:55:23 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-03-25 14:26:17 -0500 |
commit | 45f0ce168ce21a7a95f48d3164e42a947732b896 (patch) | |
tree | 91b6f713406ae956674a91c42aab0ffaa104abbc /src/gallium/drivers/swr/Makefile.sources-arch | |
parent | dd0f9eed8cda45ed1373abebad7dd2398a16e9a7 (diff) |
swr: [rasterizer core] RingBuffer class for DC/DS
Use head/tail ring buffer indices for thread synchronization.
1. SwrWaitForIdle loops until ring is empty. (head == tail)
2. GetDrawContext waits until ring is not full. (head - tail) == Ring Size
3. Draw enqueues by incrementing head.
4. Last worker thread to move past a DC dequeues by incrementing tail.
Todo: To reduce contention we can cache the tail in the API thread. For
example, if you know you have 64 free entries in the ring then you don't
need to keep checking the tail until you used those 64 entries.
Diffstat (limited to 'src/gallium/drivers/swr/Makefile.sources-arch')
-rw-r--r-- | src/gallium/drivers/swr/Makefile.sources-arch | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/Makefile.sources-arch b/src/gallium/drivers/swr/Makefile.sources-arch index 6c105f46199..7544f8efccc 100644 --- a/src/gallium/drivers/swr/Makefile.sources-arch +++ b/src/gallium/drivers/swr/Makefile.sources-arch @@ -83,6 +83,7 @@ CORE_CXX_SOURCES := \ rasterizer/core/rasterizer.h \ rasterizer/core/rdtsc_core.cpp \ rasterizer/core/rdtsc_core.h \ + rasterizer/core/ringbuffer.h \ rasterizer/core/state.h \ rasterizer/core/threads.cpp \ rasterizer/core/threads.h \ |