Yonggang Luo
1ee21139e8
gallium: delete graw
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7017
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19099 >
2022-10-18 01:57:27 +00:00
Simon Zeni
25f569f58a
gallium: track if st_egl_image was created by a dmabuf
...
This is required by GL_EXT_EGL_image_storage to verify if the image is valid
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18673 >
2022-09-22 01:44:32 +00:00
Jesse Natalie
91b14d4a77
gallium: Add a 'name' field to winsys_handle
...
Win32 memory objects can be imported by name (const void *
that will be interpreted as const wchar_t *)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Marek Olák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446 >
2022-07-14 03:45:16 +00:00
Timothy Arceri
5f686bfc85
util: add dri config option to disable GL_MAP_UNSYNCHRONIZED_BIT
...
GL_MAP_UNSYNCHRONIZED_BIT depends on the app having its threading
handled correctly. This allows us to force disable the bit when
they get it wrong.
CC: 22.1 22.0 <mesa-stable>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17199 >
2022-06-24 00:29:24 +00:00
Andres Calderon Jaramillo
cd04679a08
mesa/st: Account for YUV color space and range.
...
This patch plumbs the YUV color space and range provided through
EGL_EXT_image_dma_buf_import all the way to nir_lower_tex().
NIR already accounts for the YUV color space courtesy of commit
d8fdb8da . However, the color space was wired only for i965/i915 (see
6c11a799 ) and not for Gallium.
Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16651 >
2022-06-17 17:25:44 +00:00
Pierre-Eric Pelloux-Prayer
8c07d7cbdd
gallium: add size attribute to winsys_handle
...
This is needed at least for the VA-API frontend where the exporter
needs to know the total size of the object.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813 >
2022-06-08 09:42:42 +02:00
Pierre-Eric Pelloux-Prayer
baf0e66dae
gallium: update winsys_handle documentation
...
The function names are resource_***_handle, not textures_***_handles.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813 >
2022-06-08 09:42:26 +02:00
Adam Jackson
d760a9151b
gallium: Learn about kopper
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Timothy Arceri
f225e0679a
util: add dri config option force_compat_shaders
...
This allows us to force all shaders to offer shader features only
provided to compatibility shaders.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14040 >
2021-12-07 02:53:04 +00:00
Marek Olšák
6c78ec4eac
mesa: add allow_glsl_compat_shaders for shader-db
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13870 >
2021-11-24 10:28:15 +00:00
Jesse Natalie
2771fd4a3f
gallium, windows: Use HANDLE instead of FD for external objects
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13054 >
2021-11-19 22:54:46 +00:00
Pierre-Eric Pelloux-Prayer
f5dc334b6d
drirc: add mesa_extension_override option
...
This allows specific per-application override.
The existing MESA_EXTENSION_OVERRIDE env variable is kept.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364 >
2021-11-04 14:16:55 +00:00
Pierre-Eric Pelloux-Prayer
95ded68984
glsl/drirc: add an option for gl_ClipVertex / gl_CullDistance checks
...
The GLSL spec says it's an error if a shader statically writes to these
2 variables.
Until this commit, Mesa refused to link a shader if it had an unused
function writing to one of these variables while another (used) function
wrote to the other.
This commit adds an option to perform dead function elimination after
the intra-stage linking step but before performing these checks.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12897 >
2021-10-28 18:01:04 +00:00
Marek Olšák
c14d755f3d
glthread: add an option to make glCheckFramebufferStatus a no-op
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13403 >
2021-10-27 01:24:03 +00:00
Vadym Shovkoplias
36c241be01
driconf, glsl: Add a vs_position_always_precise option
...
This is basically the same workaround as in 9b577f2a88 (driconf, glsl: Add a
vs_position_always_invariant option) commit but for tesselation evaluation
shaders. Some applications do not mark outputs as precise in tesselation
evaluation shaders which can lead to different results in case some
optimizations were applied.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com >
Fixes: 09705747d7 ("nir/algebraic: Reassociate fadd into fmul in DPH-like pattern")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13027 >
2021-09-30 10:46:39 +00:00
Marek Olšák
921c770d49
driconf: remove leftover code for allow_incorrect_primitive_id
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Qiang Yu
4145532671
gallium/api: add validate_egl_image interface
...
For being used by mesa state tracker.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Rob Clark
7094cc78a4
driconf: Add force_gl_renderer override
...
Allow driconf to also override GL_RENDERER string.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135 >
2021-08-02 16:37:26 -07:00
Dave Airlie
75a8246563
gallium/sw: add sw_vk bit to avoid having to futz with env vars for lavapipe
...
lavapipe really only currently works with llvmpipe, and likely for the forseeable
future.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11643 >
2021-07-01 10:27:44 +00:00
Timothy Arceri
a73e7305e9
util/driconf: add new ignore_write_to_readonly_var workaround
...
This forces the GLSL compiler to ignore writes to readonly vars
rather than throwing an error.
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11602 >
2021-06-29 02:59:28 +00:00
Adam Jackson
291aff3fcb
gallium: Remove unused st_visual::render_buffer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10675 >
2021-05-07 16:47:30 -04:00
Jason Ekstrand
91cbe8d855
gallium: Add a transcode_astc driconf option
...
This is similar to the transcode_etc flag in that it changes the ASTC
fallback (when present) to use DXT5 instead of RGBA8888. This reduces
the memory footprint of the app at the expense of a bit of correctness.
Because it's not quite correct, it's hidden behind a driconf option.
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Marek Olšák <maraeo@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10476 >
2021-04-27 14:16:03 -05:00
Adam Jackson
6d81b9c972
gallium: Remove curious st_visual::no_config
...
The gallium context creation API embeds storage for a whole st_visual
even if the context is to have no config. no_config was being used to
signal this, but we can just as easily check that the color format is
non-NONE.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:10 -04:00
Adam Jackson
95be3c9b6d
mesa/st: Remove unused ST_ATTACHMENT_SAMPLE
...
Not sure what this was supposed to do, but whatever it did, it doesn't.
Reviewed-by: Eric Faye-Lund <kusmabite@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9956 >
2021-04-01 18:14:33 +00:00
Marek Olšák
0bbae3139e
st/mesa: add a driconf option to transcode ETC2 to DXTC
...
for performance analysis
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9357 >
2021-03-17 23:33:09 +00:00
Rob Clark
e6f2e8b3fc
driconf: Add ignore_map_unsynchronized option
...
Add an option to workaround incorrect unsynchronized VBO updates in
Dead-Cells.
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4337
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9316 >
2021-03-03 22:47:59 +00:00
Marek Olšák
a93ca3be01
gallium/api: add state invalidate interface as alternative to cso_save/restore
...
Some cso_context save/restore capabilities will be removed to decrease
CPU overhead. This is the alternative solution that e.g. the HUD will use.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Jesse Natalie
8fc2676e47
winsys_handle: Change D3D12 resource handle type to void*
...
This lets us include it in Linux builds as well, without needing
to pull in IUnknown.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937 >
2020-12-16 16:25:54 +00:00
Pierre-Eric Pelloux-Prayer
34b08a298d
driconf: add allow_incorrect_primitive_id option
...
And enable it for SPECviewperf.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078 >
2020-12-08 10:17:32 +01:00
Jesse Natalie
60454a4e99
gallium: Remove unnecessary forward declaration of swrast_driver_descriptor
...
MSVC complains that the definition has __declspec(dllexport) but the
forward declaration doesn't. I can't find any users of this decl in
the header.
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680 >
2020-12-02 10:12:27 -08:00
Erik Faye-Lund
7145cd6e73
mesa/st: Introduce WINSYS_HANDLE_TYPE_D3D12_RES
...
This is analogous to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
from Vulkan, and GL_HANDLE_TYPE_D3D12_RESOURCE_EXT from
GL_EXT_external_objects_win32.
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:12:42 +01:00
Timothy Arceri
ea83fd9124
glsl: drop NMS OpenGL workarounds
...
No Mans Sky dropped its OpenGL backend on April 16, 2019 in favour
of its Vulkan backend. So here we drop the old OpenGL workarounds.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7362 >
2020-11-01 05:57:35 +00:00
Timothy Arceri
a09717c4de
glsl: add extra pp tokens workaround and enable for CoR
...
The CTS now tests to make sure these are not allowed. However, previously
drivers (including Mesa) would allow them to exist and just issue a
warning. Some old applications such as Champions of Regnum seem to
depend on this.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/422
Fixes: 43047384c3 ("glsl/glcpp: Promote "extra token at end of directive" from warning to error")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7361 >
2020-10-29 23:35:58 +00:00
Eric Anholt
8a05d6ffc6
driconf: Make the driver's declarations be structs instead of XML.
...
We can generate the XML if anybody actually queries it, but this reduces
the amount of work in driver setup and means that we'll be able to support
driconf option queries on Android without libexpat.
This updates the driconf interface struct version for i965, i915, and
radeon to use the new getXml entrypoint to call the on-demand xml
generation. Note that our loaders (egl, glx) implement the v2 function
interface and don't use .xml when that's set, and the X server doesn't use
this interface at all.
XML generation tested on iris and i965 using adriconf
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916 >
2020-10-02 23:59:52 +00:00
Eric Anholt
974981c4e6
gallium/drm: Make the pipe loader handle the driconf merging.
...
We can pretty easily handle merging the driver's driconf with the common
driverconf right there, rather than pushing that to each driver.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6751 >
2020-09-24 16:35:17 -07:00
Eric Anholt
87392385b5
gallium/drm: Define the DRM entrypoints in drm_helper.h
...
This cuts even more code duplication.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6751 >
2020-09-24 16:35:17 -07:00
Marek Olšák
22253e6b65
gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*
...
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749 >
2020-09-22 03:20:54 +00:00
Pierre-Eric Pelloux-Prayer
265a3b9624
driconf: add option to reuse GL names
...
Fix apps expecting name recycling.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3144 is an example
of such issue, SPECviewperf13 has this problem too.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600 >
2020-09-10 09:09:34 +02:00
Marek Olšák
ca719c6e30
glsl,driconf: add allow_glsl_120_subset_in_110 for SPECviewperf13
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5459 >
2020-06-23 09:25:24 +00:00
Marek Olšák
8c9b9aac7d
gallium: change comments to remove 'state tracker'
...
Acked-by: Eric Anholt <eric@anholt.net >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902 >
2020-05-13 13:47:27 -04:00
Marek Olšák
d6287a94b6
gallium: rename 'state tracker' to 'frontend'
...
Acked-by: Eric Anholt <eric@anholt.net >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902 >
2020-05-13 13:46:53 -04:00