summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glthread.h
Commit message (Collapse)AuthorAgeFilesLines
* glthread: ignore vertex arrays with user pointers if they're disabledMarek Olšák2020-03-201-2/+3
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* glthread: track which vertex array attribs are enabledMarek Olšák2020-03-201-0/+5
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* glthread: handle buffer unbinding via glDeleteBuffersMarek Olšák2020-03-201-12/+9
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* mesa: put gl_thread_state inside gl_context to remove pointer indirectionMarek Olšák2020-03-201-0/+3
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* glthread: remove _mesa_post_marshal_hook, because it's not very usefulMarek Olšák2020-03-201-1/+0
| | | | | | | and also remove the useless forward declaration of enum marshal_dispatch_cmd_id. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* glthread: align the batch buffer to 8 bytes for pointers and doubles againMarek Olšák2020-03-201-0/+5
| | | | | | | This was changed when I switched to types from size_t to int. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251>
* glthread: track for each VAO whether the user has set a user pointerMarek Olšák2020-03-061-1/+21
| | | | | | | | | | | | This commit mainly adds basic infrastructure for tracking vertex array state. If glthread gets a non-VBO pointer, this commit delays disabling glthread until glDraw is called. The next will change that to "sync" instead of "disable". Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: add GL_DRAW_INDIRECT_BUFFER tracking and generator supportMarek Olšák2020-03-061-0/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: simplify repeated function sequences in marshal_generated.cMarek Olšák2020-03-061-0/+2
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: use int instead of size_t where it's OKMarek Olšák2020-03-061-1/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* mesa/glthread: pass the function name to _mesa_glthread_restore_dispatchMarek Olšák2018-11-201-1/+1
| | | | | | If you insert printf there, you'll know why glthread was disabled. Reviewed-by: Timothy Arceri <[email protected]>
* mesa: include mtypes.h lessMarek Olšák2018-04-121-2/+1
| | | | | | | | | | - remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <[email protected]>
* 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]>