summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glthread.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa/glthread: don't include pthread.hMarek Olšák2017-06-261-1/+0
| | | | Not needed. This fixes the Windows build.
* mesa/glthread: decrease the batch size for better perf scalingMarek Olšák2017-06-261-3/+11
| | | | | | This is the key to better performance. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák2017-06-261-0/+3
| | | | | | | | | | | for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: switch to u_queue and redesign the batch managementMarek Olšák2017-06-261-58/+30
| | | | | | | This mirrors exactly how u_threaded_context works. If you understand this, you also understand u_threaded_context. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: remove HAVE_PTHREAD guardsMarek Olšák2017-06-261-30/+0
| | | | | | we are switching to util_queue. Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix glthread marshal build issues on platforms without PTHREADTimothy Arceri2017-03-161-4/+10
|
* mesa: fix glthread build issues on platforms without PTHREADTimothy Arceri2017-03-161-1/+1
|
* mesa/glthread: restore the dispatch table when incompatible gl calls are ↵Gregory Hainaut2017-03-161-0/+7
| | | | | | | | | | | | | | | | | | | detected While a context only has a single glthread, the context itself can be attached to several threads. Therefore the dispatch table must be updated in all threads before the destruction of glthread. In others words, glthread can only be destroyed safely when the context is deleted. Fixes remaining crashes in the glx-multithread-makecurrent* tests. V2: (Timothy Arceri) updated gl_API.dtd marshal_fail description. Signed-off-by: Gregory Hainaut <[email protected]> Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Track the current vertex/element array buffers for glthread.Eric Anholt2017-03-161-0/+12
| | | | | | | | | | | | We want to support glthread on GLES contexts with reasonable apps, and on desktop for apps that use VBOs but haven't completely moved to core GL. To do so, we have to deal with the "the user may or may not pass user pointers to draw calls" problem. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Statically allocate glthread command buffer in the batch struct.Eric Anholt2017-03-161-4/+4
| | | | | | | | | | | This avoids an extra pointer dereference in the marshalling functions, which, with the instruction count doing in the low 30s, could actually matter for main-thread performance. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Add infrastructure for a worker thread to process GL commands.Eric Anholt2017-03-161-0/+130
v2: Keep an allocated buffer around instead of checking for one at the start of every GL command. Inline the now-small space allocation function. v3: Remove duplicate !glthread->shutdown check, process remaining work before shutdown. v4: Fix leaks on destroy. V5: (Timothy Arceri) fix order of source files in makefile Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>