aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
* glthread: rename marshal.h/c to glthread_marshal.h and glthread_shaderobj.cMarek Olšák2020-03-201-123/+0
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* glthread: move buffer functions into glthread_bufferobj.cMarek Olšák2020-03-201-277/+0
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
* glthread: autogenerate prototypes for custom-marshalled functionsMarek Olšák2020-03-201-4/+4
| | | | | 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-15/+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: remove debug_print_marshal functionMarek Olšák2020-03-201-2/+0
| | | | | | | We don't need to print every function we execute. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251>
* glthread: fix a crash with incorrect glShaderSource parametersMarek Olšák2020-03-061-1/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: add custom marshalling for glNamedBuffer(Sub)DataEXTMarek Olšák2020-03-061-8/+48
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: merge glBufferSubData and glNamedBufferSubData into 1 set of functionsMarek Olšák2020-03-061-73/+51
| | | | | | | | This is a big cleanup. GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD also doesn't sync anymore. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: merge glBufferData and glNamedBufferData into 1 set of functionsMarek Olšák2020-03-061-92/+71
| | | | | | | | This is a big cleanup. GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD also doesn't sync anymore. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: replace custom glBindBuffer marshalling with generated oneMarek Olšák2020-03-061-52/+2
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: track for each VAO whether the user has set a user pointerMarek Olšák2020-03-061-1/+1
| | | | | | | | | | | | 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 marshal_call_after and remove custom glFlush and glEnable codeMarek Olšák2020-03-061-68/+0
| | | | | | | | Instead of implementing marshalling manually, this XML property allows us to insert additional code into code-generated functions. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: replace custom ClearBuffer marshalling with generated oneMarek Olšák2020-03-061-223/+0
| | | | | | | If the count attribute contains "enum", the count is evaluated only once. 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/+3
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: don't insert _mesa_post_marshal_hook into every functionMarek Olšák2020-03-061-0/+11
| | | | | | | Let the developer decide that in the python script. 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-2/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* glthread: inline _mesa_unmarshal_dispatch_cmd and convert the switch to a tableMarek Olšák2020-03-061-1/+0
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
* mesa/main: cast away constnessErik Faye-Lund2019-08-081-1/+1
| | | | | | | | This avoids a warning about implicitly casting away the constness of the pointer. Signed-off-by: Erik Faye-Lund <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* 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/marshal: fix glNamedBufferData with NULL dataGrigori Goronzy2017-07-141-4/+13
| | | | | | | The semantics are similar to glBufferData. Tested-by: Marc Dietrich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/marshal: add marshalling for glClearBuffer*Grigori Goronzy2017-07-141-1/+132
| | | | | | | | | Add async marshalling/unmarshalling for all glClearBuffer variants. These entry points are commonly used in general and Alien Isolation specifically uses glClearBufferiv. Slightly reduces the number of thread synchronizations with glthread in that game. Reviewed-by: Marek Olšák <[email protected]>
* mesa/marshal: extract ClearBuffer helpersGrigori Goronzy2017-07-141-27/+47
| | | | | | | | | Extract clear buffer helper functions in preparation for adding marshal/unmarshal functions for the various glClearBuffer variants. v2: Fix command size. Reviewed-by: Marek Olšák <[email protected]>
* mesa/glthread: remove HAVE_PTHREAD guardsMarek Olšák2017-06-261-4/+0
| | | | | | we are switching to util_queue. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/marshal: add custom marshalling for glNamedBuffer(Sub)DataGrigori Goronzy2017-06-261-0/+108
| | | | | | | | | | | | | These entry points are used by Alien Isolation and caused synchronization with glthread. The async marshalling implementation is similar to glBuffer(Sub)Data. However unlike Buffer(Sub)Data we don't need to worry about EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, as this isn't applicable to these DSA variants. Results in an approximately 6x drop in glthread synchronizations and a ~30% FPS jump in Alien Isolation (Medium preset, Athlon 860K, RX 480). Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove unused _mesa_unmarshal_BindBufferBase()Samuel Pitoiset2017-04-131-8/+0
| | | | | | | | | | | | | Fixes the following Clang warning. main/marshal.c:209:1: warning: unused function '_mesa_unmarshal_BindBufferBase' [-Wunused-function] _mesa_unmarshal_BindBufferBase(struct gl_context *ctx, const struct marshal_cmd_BindBufferBase *cmd) ^ 1 warning generated. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: disable glthread when DEBUG_OUTPUT_SYNCHRONOUS is enabledTimothy Arceri2017-04-031-0/+37
| | | | | | | | | | | | | We could re-enable it also but I haven't tested that yet, and I'm not sure we care much anyway. V2: don't disable it from with the call itself. We need a custom marshalling function or we get stuck waiting for thread to finish. V3: tidy up redundant code copied from generated version. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: simplify code around 'variable_data' in marshal.cBrian Paul2017-03-271-12/+7
| | | | | | | Remove needless pointer increments, unneeded vars, etc. Untested. Plus, fix a couple comments. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: add custom marshalling for ClearBufferfv()Timothy Arceri2017-03-251-0/+74
| | | | | | This is one of the main causes of syncs in Civ6. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/marshal: add custom BufferData/BufferSubData marshallingTimothy Arceri2017-03-241-0/+125
| | | | | | | | | | GL_AMD_pinned_memory requires memory to be aligned correctly, so we skip marshalling in this case. Also copying the data defeats the purpose of EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD. Fixes GL_AMD_pinned_memory piglit tests when glthread is enabled. Acked-by: Edward O'Callaghan <[email protected]>
* mesa: fix glthread marshal build issues on platforms without PTHREADTimothy Arceri2017-03-161-0/+3
|
* mesa: Track the current vertex/element array buffers for glthread.Eric Anholt2017-03-161-0/+103
| | | | | | | | | | | | 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: Custom thread marshalling for Flush.Paul Berry2017-03-161-0/+33
| | | | | | | 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: Custom thread marshalling for ShaderSource.Paul Berry2017-03-161-0/+123
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]>