Marek Olšák
98a0e8c908
glthread: make marshal functions for glBegin/End attribs non-static
...
for a future commit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824 >
2023-01-20 21:34:09 -05:00
Marek Olšák
a4d813ba54
glapi: autogenerate function parameters with no space between * and variable
...
print "int *v" instead of "int * v".
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824 >
2023-01-20 21:34:09 -05:00
Dylan Baker
bab3e2fbd9
meson: use the same workaround for setting 'lib' on windows
...
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752 >
2023-01-19 23:06:07 +00:00
Pierre-Eric Pelloux-Prayer
ddc721e15c
glthread: fix glArrayElement handling
...
This must be marshalled synchronously or the attrib pointers' content
might change by the time we use them.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8068
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748 >
2023-01-19 09:42:34 +00:00
Pierre-Eric Pelloux-Prayer
1ab80eb061
mesa: add missing count_scale attributes
...
The EXT_gpu_program_parameters spec says:
<params> points to an array of 4*<count> values
for both functions.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20603 >
2023-01-10 23:14:54 +00:00
Pierre-Eric Pelloux-Prayer
37dcd18331
mesa: add missing count_scale attribute
...
The EXT_gpu_program_parameters spec says:
<params> points to an array of 4*<count> values
Fixes: a4e935f2d7 ("mesa: add EXT_dsa + EXT_gpu_program_parameters functions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7943
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8025
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20603 >
2023-01-10 23:14:54 +00:00
Adam Jackson
fe1294e17a
glx: Remove the GetProcAddress special case for indirect rendering
...
Some GL entrypoints would be aliased in an API sense but have different
GLX protocol. The only one that matters to us is EXT_texture_object,
which is the pre-GL-1.1 API. We're just going to drop support for that
and assume you have 1.1 or better, since 1.0 + EXT_texture_object is a
vanishingly rare combo at this point.
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20300 >
2023-01-03 23:36:26 +00:00
Yusuf Khan
0803e39b71
mapi: update gles 1.1 extention packet link
...
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19874 >
2022-11-20 15:14:01 +00:00
Yonggang Luo
f03421702c
meson: Refactoring shared gen_vs_module_defs_normal_command out
...
Cc: mesa-stable
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19610 >
2022-11-11 05:38:19 +00:00
Yonggang Luo
38b2402b5f
meson: Use deps_for_libmesa_util for idep_mesautil instead hand crafted list
...
Now the idep_mesautilc11 have no need reference when idep_mesautil is referenced
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19526 >
2022-11-10 11:57:22 +08:00
Timothy Arceri
e295ee778b
mesa: fix typo from adding glGetObjectLabelEXT
...
Fixes: 675bcbb7a1 ("mesa: add EXT_debug_label support")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19607 >
2022-11-10 01:07:45 +00:00
Yonggang Luo
cdc1abad7b
util: include gles header instead of hand crafted macros
...
Now the glapi/glapi_dispatch.c are cleaned up because of this
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19509 >
2022-11-04 19:28:19 +00:00
Yonggang Luo
de53069af6
mapi: #include "util/glheader.h" instead of #include "GL/gl.h"
...
Also add macro to guard windows.h won't be included
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472 >
2022-11-03 16:07:31 +00:00
Yonggang Luo
2c89401f75
glapi: #include "util/glheader.h" in glapi_priv.h and glapitable.h directly
...
So that we do not need define GLAPIENTRY repeatedly, always using the
GLAPIENTRY macro comes from GL/gl.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472 >
2022-11-03 16:07:31 +00:00
Yonggang Luo
bfa3ce44a6
mesa: Move glheader.h from mesa/main/glheader.h to util/glheader.h
...
So it's can be accessed in broader places
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472 >
2022-11-03 16:07:31 +00:00
Yonggang Luo
afc3d5eff3
glapi: Remove duplicated #include "main/glheader.h"
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472 >
2022-11-03 16:07:31 +00:00
Yonggang Luo
ccf6dfedbc
mapi: Remove the need of _MTX_INITIALIZER_NP by using simple_mtx_t/SIMPLE_MTX_INITIALIZER in stub.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154 >
2022-10-20 01:32:47 +00:00
Yonggang Luo
1411d79e24
mapi: Use util_call_once to init exec_mem and mutex instead _MTX_INITIALIZER_NP
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154 >
2022-10-20 01:32:47 +00:00
Marek Olšák
513ac52e47
glthread remove the unused *last pointer from unmarshal functions
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
6e6245f189
glthread: merge and collapse glBindBuffer calls that unbind and then bind
...
This is a small optimization for viewperf. See the comment in the code.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
9b6e2783eb
gl_marshal.py: C style fixups
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
6f8cbbfce2
glthread: demystify Draw function names
...
Since we had the freedom to write our own marshal and unmarshal Draw
functions, we turned it into a mess by doing whatever we want in those
functions. For example, DrawElementsInstancedBaseVertex actually
implemented DrawArraysInstancedBaseInstanceBaseInstance.
Add 4 internal GL functions that pass user buffers through marshal
/unmarshal functions, and clean up the other names to match their
behavior.
The new functions don't need any parameters in their definitions because
we don't call them directly.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
5679ef99b8
glapi: remove EXT and ARB suffixes from Draw functions
...
This swaps the function names with aliased names that don't have those
suffixes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
b09a88fb72
gl_marshal.py: simplify print_sync_call and rename to print_call
...
no spaces around = is a python convention for implicit arguments only
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
05dddaeb80
gl_marshal.py: inline functions for readability
...
All functions have only one use. Jumping constantly between functions
in the file is confusing.
No spaces around = is a python convention for implicit arguments only.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
146836f4ba
gl_marshal.py: remove the -O1 hack and manual SET_* inlining
...
The compile times aren't so bad anymore now that the initialization is
split among all 8 files.
Also add one assertion.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
67c7260571
gl_marshal.py: rework how the marshal dispatch table is initialized
...
Instead of setting all function pointers in marshal_generated0.c,
set the function pointers in the file that contains the functions,
and remove all the forward declarations of marshal functions
in marshal_generated.h.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
5e66e26998
gl_marshal.py: move the unmarshal table into a separately generated file
...
It's unrelated to the rest of the script and it's in the way of bigger
changes.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Marek Olšák
5c65a3a98f
gl_marshal.py: remove/simplify parameters
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199 >
2022-10-19 04:23:05 +00:00
Timothy Arceri
675bcbb7a1
mesa: add EXT_debug_label support
...
KHR_debug provides the same functionality but this extension is
still in use and adding support for it seems fairly harmless.
For example its used by Unity and without it we keep
getting given apitraces from Unity games that just spew out
unsupported function errors due to the missing support.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19029 >
2022-10-17 08:53:20 +11:00
Marek Olšák
01c481335a
glthread: skip glMultMatrixf if it's identity
...
This is common with viewperf and it helps.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
cd30f044ae
glthread: use GLenum16 for enums, but clamp it to 0xffff to get correct errors
...
0xffff is an invalid enum.
This was initially implemented without clamping and then reverted because
of the concern that we would randomly get correct enums and not report
errors if we just dropped the high bits.
This packs calls better in glthread_batch.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
b7ba29cbf6
mesa: rename GL dispatch initialization functions to make the intent clear
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
34356c009c
api_hw_select_init_h.py: simplify the code
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
3c621f8a2a
glapi: rename 'vtxfmt' to 'beginend' to make it clear
...
These are really just the functions that execute between Begin/End.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
684dae9e64
mesa: initialize OutsideBeginEnd directly instead of through Exec
...
Exec is just a mutable pointer to one of the dispatch tables.
OutsideBeginEnd is what we are actually initializing here. This makes
the original intention clear.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
4ff207b47b
glthread: execute glSignalSemaphoreEXT synchronously
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223 >
2022-09-21 14:54:50 +00:00
Marek Olšák
7c1f8b63ad
glthread: work around GL_INVALID_OPERATION with OpenGL ES 1.x draws
...
GLES1 only has (Multi)Draw{Array,Elements}, but glthread converts them
to the more complicated versions and then calls them through the dispatch,
which generated GL_INVALID_OPERATION.
Luckily, we can export them with the Internal prefix, so they are unlikely
to be used by apps by accident.
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223 >
2022-09-21 14:54:50 +00:00
Marek Olšák
97891087b5
glthread: always sync for glShaderSource because invalid params can crash
...
If an invalid parameter is received along with an invalid pointer and we
ignore the invalid parameter and dereference the pointer, we crash.
Since we can't fully validate all parameters (such as whether "shader"
is a valid object ID), remove the custom code.
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223 >
2022-09-21 14:54:49 +00:00
Marek Olšák
6b6f862170
glthread: generate errors for glGet functions between glBegin/End
...
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223 >
2022-09-21 14:54:49 +00:00
Marek Olšák
355d575820
mesa: fix glDrawRangeElementsBaseVertex should be compiled into display list
...
It's defined in terms of glDrawRangeElements, which is compiled into display
lists.
Cc: stable
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223 >
2022-09-21 14:54:49 +00:00
Jesse Natalie
d0a1c1a37d
mesa: Expose GL_NV_ES1_1_compatibility
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18217 >
2022-08-25 10:17:10 -07:00
Yonggang Luo
7981936e46
mapi: Improve comment about _glapi_tls_Dispatch and _glapi_tls_Context
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814 >
2022-08-22 21:32:09 +00:00
Yonggang Luo
78ba0eb633
mapi: Access _glapi_tls_Dispatch directly without need of macro
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814 >
2022-08-22 21:32:09 +00:00
Yonggang Luo
8e8a231a07
mapi: Move shared stub into u_current.c
...
These stub are:
_glapi_Dispatch
_glapi_Context
_glapi_destroy_multithread
_glapi_check_multithread
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814 >
2022-08-22 21:32:09 +00:00
Yonggang Luo
7f49abbdc0
mapi: Move shared _glapi_set_context and _glapi_set_dispatch into u_current.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814 >
2022-08-22 21:32:09 +00:00
Yonggang Luo
01d6ae536b
mapi: Remove reference to unused _gl_DispatchTSD
...
The last usage of _gl_DispatchTSD is at commit:
df98423f24 ("mapi: Prefix functions in u_current.h by u_current.")
Wow it's 12 years ago
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814 >
2022-08-22 21:32:09 +00:00
Yonggang Luo
a5b463742c
mapi: Remove unused ENTRY_CURRENT_TABLE_GET
...
The last commit that use ENTRY_CURRENT_TABLE_GET is:
62a68481fa ("mapi: Remove usage of USE_ELF_TLS")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814 >
2022-08-22 21:32:09 +00:00
Marek Olšák
983684d763
glthread: track glBindFramebufferEXT, not just glBindFramebuffer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00
Marek Olšák
f9b0dc9377
glthread: track GL_READ_FRAMEBUFFER bindings too
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17976 >
2022-08-12 06:06:48 +00:00