glthread: don't use atomics for refcounting to decrease overhead on AMD Zen Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4314>
glthread: do glBufferSubData as unsynchronized upload + GPU copy 1. glthread has a private upload buffer (as struct gl_buffer_object *) 2. the new function glInternalBufferSubDataCopyMESA is used to execute the copy (the source buffer parameter type is struct gl_buffer_object * as GLintptr) Now glthread can handle arbitrary glBufferSubData sizes without syncing. This is a good exercise for uploading data outside of the driver thread. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4314>
glthread: handle buffer unbinding via glDeleteBuffers Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
mesa: put gl_thread_state inside gl_context to remove pointer indirection Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
glthread: rename marshal.h/c to glthread_marshal.h and glthread_shaderobj.c Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>
glthread: move buffer functions into glthread_bufferobj.c Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124>