Marek Olšák
03da51eb07
glthread: inline SET_func and add -O1 to build _mesa_create_marshal_table faster
...
The compile time of marshal_generated.c improved from 30.1s to 12.4s.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270 >
2020-03-24 16:28:30 -04:00
Marek Olšák
11d3aa5e7b
glthread: remove the marshal_fail XML attribute
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
c02a1347e5
glthread: ignore vertex arrays with user pointers if they're disabled
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
0b1dd18591
glthread: track which vertex array attribs are enabled
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
c571dda1e0
glthread: rename non_vbo helper functions
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
bde4505f61
glthread: handle buffer unbinding via glDeleteBuffers
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
8a4114b929
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 >
2020-03-20 23:01:13 -04:00
Marek Olšák
37725e6c38
glthread: autogenerate prototypes for custom-marshalled functions
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
4ded23a4ad
glthread: simplify printing safe_mul in gl_marshal.py
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4124 >
2020-03-20 23:01:13 -04:00
Marek Olšák
b13d5265cc
glthread: don't declare unmarshal functions as inline
...
They are never inlined.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251 >
2020-03-20 00:00:22 +00:00
Marek Olšák
b00d219ec0
glthread: remove debug_print_marshal function
...
We don't need to print every function we execute.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251 >
2020-03-20 00:00:22 +00:00
Marek Olšák
951c6acb07
glthread: don't execute any custom VAO and BindBuffer code in the Core profile
...
It's not needed, because user pointers can never occur there.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251 >
2020-03-20 00:00:22 +00:00
Marek Olšák
87f6be4456
glthread: track VAOs created by CreateVertexArrays
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251 >
2020-03-20 00:00:22 +00:00
Marek Olšák
720f34d5eb
glthread: enable display lists
...
They seem to work fine.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4251 >
2020-03-20 00:00:22 +00:00
Marek Olšák
ff0881c686
mesa: remove redundant api_loopback functions
...
vbo_attrib_tmp.h implements them, so this loopback code isn't needed
and shouldn't be used.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4123 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4123 >
2020-03-19 23:24:08 +00:00
Marek Olšák
ed0bea4495
glthread: fall back if a param size is non-zero and a pointer param is NULL
...
So that we don't crash. This is a GL error anyway.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
c5825b7b6e
glthread: add custom marshalling for glNamedBuffer(Sub)DataEXT
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
93b2ee18a1
glthread: replace custom glBindBuffer marshalling with generated one
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
85276e2c1b
glthread: sync instead of disabling glthread for non-VBO pointers
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
28a2ad7ddf
glthread: track for each VAO whether the user has set a user pointer
...
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 <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
d510e652d4
glthread: add marshal_call_after and remove custom glFlush and glEnable code
...
Instead of implementing marshalling manually, this XML property allows us
to insert additional code into code-generated functions.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
4970199d11
glthread: don't insert an empty line after (void) cmd;
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
b9eef27920
glthread: add support for glMemoryObjectParameteriv, glSemaphoreParameterui64v
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
b5c58bbf6c
glthread: add support for glCallLists, glPatchParameterfv
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
1668a93903
glthread: add support for glClearNamedFramebuffer, glMaterial, glPointParameter
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
b0a20e7531
glthread: add support for glFog, glLight, glLightModel, glTexEnv, glTexGen
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
59e96bc513
glthread: add support for TexParameteri and SamplerParameteri functions
...
It's straightfoward except that I had to hack the python scripts to add
"marshal_count", which behaves just like "count" except that "variable_param"
is ignored. ("variable_param" changes the behavior of "count", which I don't
want)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
108fdb54c6
glthread: replace custom ClearBuffer marshalling with generated one
...
If the count attribute contains "enum", the count is evaluated only once.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
88b5fb18b3
glthread: check the size of all variable params and clean up the code
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
358d923c8b
glthread: handle complex pointer parameters and support GL functions with strings
...
The python changes add a local variable that computes the parameter size
only once.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
d00f36ac25
glthread: add/update count and marshal fields for many GL functions
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
fb95a4693f
glthread: add GL_DRAW_INDIRECT_BUFFER tracking and generator support
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
30b6e82364
glthread: don't increment variable_data if it's the last variable-size param
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
19dc528bbf
glthread: don't insert _mesa_post_marshal_hook into every function
...
Let the developer decide that in the python script.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
c920572f60
glthread: simplify repeated function sequences in marshal_generated.c
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
9dbf5ec9f7
glthread: use int instead of size_t where it's OK
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
19151e2605
glthread: inline _mesa_unmarshal_dispatch_cmd and convert the switch to a table
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
245f9593b7
glthread: don't prefix variable_data with const
...
Not all variable data that is constant is declared with const, such as
glDeletePerfMonitorsAMD.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:14 +00:00
Marek Olšák
d93f4faefb
glthread: don't generate the sync fallback if the call size is not variable
...
marshal_generated.c is 12% smaller.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948 >
2020-03-06 01:06:13 +00:00
Indrajit Kumar Das
18124d7278
glapi/copyimage: Implement CopyImageSubDataNV
...
Implement CopyImageSubDataNV from NV_copy_image spec.
This is derived out of the existing implementation of CopyImageSubData.
It differs from CopyImageSubData in accordance with the differences
laid down in the ARB_copy_image spec.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3649 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3649 >
2020-02-24 16:31:06 +00:00
Gurchetan Singh
b68ff2b873
glapi / teximage: implement EGLImageTargetTexStorageEXT
...
Check various parts of the EXT_EGL_image_storage spec, and add a
new vfunc for drivers implementing it.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2020-01-13 14:57:18 -08:00
Tapani Pälli
5d58fea660
mapi: add GetInteger64vEXT with EXT_disjoint_timer_query
...
From EXT_disjoint_timer_query spec:
"Interaction: This extension adds GetInteger64vEXT if
OpenGL ES 3.0 is not supported"
See https://github.com/KhronosGroup/OpenGL-Registry/issues/326 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2090
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-26 07:41:24 +02:00
Markus Wick
f4c61d422d
mesa/glthread: Implement ARB_multi_bind.
...
Signed-off-by: Markus Wick <markus@selfnet.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-22 15:29:07 -05:00
Markus Wick
b1156ecdf2
mapi/glapi: Generate sizeof() helpers instead of fixed sizes.
...
Generating a source code with a fixed size leads to issues with plattform dependent types.
We either hard code 4 or 8 bytes there, and both are wrong on the other plattform.
So this patch solves this issue by generating eg sizeof(GLsizeiptr), which is valid both
on 32 and on 64 bit plattforms.
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2019-11-21 22:52:55 -05:00
Timothy Arceri
906f1a2933
mesa: add ARB_shading_language_include stubs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
2019-11-20 05:05:55 +00:00
Pierre-Eric Pelloux-Prayer
1ef297645c
mesa: add ARB_sparse_buffer NamedBufferPageCommitmentEXT function
...
The spec is unclear on how to handle the buffer argument so we reuse
the logic from the EXT_direct_state_access spec.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-19 08:49:45 +01:00
Pierre-Eric Pelloux-Prayer
8b6d19413f
mesa: add ARB_vertex_attrib_binding glVertexArray* functions
...
We can't simply alias ARB_direct_state_access functions because
those fail if the vao has never been bound before.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-19 08:49:45 +01:00
Pierre-Eric Pelloux-Prayer
bb2241bf06
mesa: implement ARB_texture_storage_multisample + EXT_dsa functions
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-19 08:49:45 +01:00
Pierre-Eric Pelloux-Prayer
a0d667036d
mesa: add ARB_texture_buffer_range glTextureBufferRangeEXT function
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-19 08:49:45 +01:00
Pierre-Eric Pelloux-Prayer
b78e2a197a
mesa: add ARB_instanced_arrays EXT_dsa function
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-19 08:49:45 +01:00