Karol Herbst
1aefe78b47
mesa: fix enum value of VIEWPORT_SWIZZLE_POSITIVE_W_NV
...
Fixes: ff168b297d ("mesa: add GL_NV_viewport_swizzle support")
Reported-by: Roy Spliet <nouveau@spliet.org>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4567 >
2020-04-15 16:43:36 +02:00
Ilia Mirkin
ff168b297d
mesa: add GL_NV_viewport_swizzle support
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519 >
2020-04-12 12:01:46 -04:00
Jose Fonseca
2e92d33819
scons: Prune out unnecessary targets.
...
This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as
suggested by Marek Olšák.
libgl-xlib will be remove once I have had time to confirm no automated
tests we have rely upon it.
There are also a bunch of Makefile.sources which become orphaned as
result, that are not taken care of in this change.
v2: Prune remainders of swr support.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348 >
2020-03-30 13:38:01 +00:00
Marek Olšák
e5339fe4a4
Move compiler.h and imports.h/c from src/mesa/main into src/util
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324 >
2020-03-27 21:00:09 +00:00
H.J. Lu
e352e7e792
x86: Add ENDBR at function entries
...
Intel Control-flow Enforcement Technology (CET):
https://software.intel.com/en-us/articles/intel-sdm
contains shadow stack (SHSTK) and indirect branch tracking (IBT).
When IBT is enabled, all indirect branch targets must start with
ENDBR instruction which is a NOP on non-CET processors.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2538
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Ben Widawsky <ben.widawsky@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3865 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3865 >
2020-03-26 16:38:46 -07:00
Marek Olšák
8a3e2cd9b2
glthread: compile marshal_generated.c faster by breaking it up into 8 files
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270 >
2020-03-24 16:28:30 -04:00
Marek Olšák
cadddbd269
glthread: declare marshal and unmarshal functions as non-static
...
Declare them in the header file. Then we can split marshal_generated.c
into multiple files.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270 >
2020-03-24 16:28:30 -04:00
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