Marek Olšák
83278b5661
glx: add a workaround to glXDestroyWindow for Viewperf2020/Sw
...
This fixes:
X Error of failed request: GLXBadWindow
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 32 (X_GLXDestroyWindow)
Serial number of failed request: 9667
Current serial number in output stream: 9674
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13611 >
2021-11-17 21:26:54 +00:00
Connor Abbott
b8fc7a08f9
util/dag: Add dag_add_edge_max_data
...
This will be useful for when the edge data represents a delay of some
sort, like it will with ir3.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13722 >
2021-11-17 13:41:47 +00:00
Connor Abbott
508f917d8c
util/dag: Make edge data a uintptr_t
...
Nobody was actually using it as a pointer, and I'm going to introduce a
shared function which relies on it not being a pointer so let's fix this
once and for all.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13722 >
2021-11-17 13:41:47 +00:00
Jason Ekstrand
f3843b11c9
c11/threads: Re-align return values for timed waits
...
They're supposed to return thrd_timedout (which we mistakenly named
thrd_timeout), not thrd_busy.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427 >
2021-11-16 10:02:08 -06:00
Mike Blumenkrantz
97ba2f2fd4
move util/indices to core util
...
these are useful tools to have outside of gallium
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13741 >
2021-11-16 14:12:03 +00:00
Dave Airlie
4b27ebee7f
util/vl: move gallium vl_vlc.h and vl_rbsp.h to shared code.
...
For vulkan video I need these to parse slice headers, so move
them somewhere easier to get at them.
drops pointer_to_uintptr in favour of a cast.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13768 >
2021-11-15 21:57:28 +00:00
Qiang Yu
aa2f5cd1a3
driconf: support META application
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13686 >
2021-11-12 09:01:58 +00:00
Emma Anholt
2e6810a06a
util/format: Add G8_B8R8_420_UNORM to match Vulkan.
...
turnip was playing fast and loose with the name, using the R8_G8B8 format
name but actually setting the descriptors up to read G8_B8R8 like Vulkan
(sensibly) wants. This caused trouble when trying to make freedreno and
turnip share code. By having both orderings as format names, we can share
the descriptor code and also confuse readers less.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443 >
2021-11-11 00:10:57 +00:00
Emma Anholt
271b6cb981
util: Rename PIPE_FORMAT_G8_B8_R8_420_UNORM.
...
The only user, turnip, was actually treating it as this layout, matching
vulkan's specification of how the planes map to RGB values. (Y=G means
that Cb=B and Cr=R).
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443 >
2021-11-11 00:10:57 +00:00
Caio Oliveira
6eb86efe91
util/ra: Fix deserialization of register sets
...
Set ra_class::regset and ra_class::index when deserializing.
Fixes: 95d41a3525 ("ra: Use struct ra_class in the public API.")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13728 >
2021-11-10 22:57:57 +00:00
Caio Oliveira
ac416ce07b
util/ra: Add simple test for register set serialization
...
Marked as DISABLED since it currently fails.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13728 >
2021-11-10 22:57:57 +00:00
Ryan Houdek
0ae1231879
util/xmlconfig: Allow DT_UNKNOWN files
...
Some filesystems don't fill in d_type in dirent. Resulting in
DT_UNKNOWN. Pass this entry through to the next step and use stat on the
full filepath to determine if it is a file.
sshfs is known to not fill d_type.
This resolves an issue where driconf living on an sshfs path wasn't
working.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13697 >
2021-11-09 23:25:32 +00:00
Bas Nieuwenhuizen
aad80e47d8
util: Add support for clang::fallthrough.
...
Looks like the __attribute__ version doesn't work for C++ in the
Android build. Only found now because we don't enable
-Wimplicit-fallthrough by default project wide for C++. Only
ACO enables it.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13164 >
2021-11-09 20:51:14 +00:00
Jesse Natalie
df92a13a27
util/libsync: Fix timeout handling if poll() wakes up early
...
Check how long poll waited, and use a smaller timeout on the next
iteration through the loop.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12268 >
2021-11-09 04:05:55 +00:00
Caio Oliveira
75161e6f3d
util: Change blob_test to use macro from mesa-gtest-extras.h
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13672 >
2021-11-08 17:42:18 +00:00
Marek Olšák
10ee261c38
driconf: disallow 10-bit pbuffers for viewperf2020/maya due to X errors
...
Cc: 21.2 21.3 <mesa-stable@lists.freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13472 >
2021-11-08 14:00:45 +00:00
Kostiantyn Lazukin
78b613db23
util/u_trace: Replace Flag with IntEnum to support python3.5
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5586
Fixes: cefaa73909
Signed-off-by: Kostiantyn Lazukin <kostiantyn.lazukin@globallogic.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13643 >
2021-11-05 11:54:30 +00:00
Marek Olšák
3f997bccc6
radeonsi: increase tc_max_cpu_storage_size
...
Viewperf benefits. The number is only slightly above the size we need.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13603 >
2021-11-04 17:36:26 +00:00
Pierre-Eric Pelloux-Prayer
ff981a7e79
drirc: add options for BETA CAE Ansa application.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13364 >
2021-11-04 14:16:55 +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
a21c0f531e
mesa: enable force_direct_glx_context for DiscoveryStudio2020
...
This app uses Qt4.8 which uses an indirect context to save a GL scene to
a pixmap.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246 >
2021-11-04 13:59:00 +01:00
Pierre-Eric Pelloux-Prayer
fc3ef76eec
glx/drirc: add a force_direct_glx_context option
...
Some applications may request an indirect context but this feature is
disabled by default on Xorg and thus context creation will fail.
This commit adds a drirc setting to force the creation of direct glx
context, regardless of what the app is requesting.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246 >
2021-11-04 13:59:00 +01:00
Marek Olšák
118f2952b6
driconf: set vblank_mode=0 for viewperf2020
...
It doesn't disable vsync. Reported internally.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13612 >
2021-11-04 11:04:35 +00:00
Marek Olšák
81d35c8d48
util: add a util_bitcount variant that selects POPCNT through C++ template arg
...
Moved from radeonsi. st/mesa will use it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13512 >
2021-11-03 23:22:31 +00:00
Jesse Natalie
ffd4157b1c
util/hash_table: Clear special 0/1 entries for u64 hash table too
...
Fixes: e532a47f ("util/hash_table: do not leak u64 struct key")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13390 >
2021-11-02 11:02:18 -07:00
Gert Wollny
634e2353a0
virgl: Add driconf tweak to force-enable reading back R8_SRGB textures
...
In the menu of CS:GO R8_SRGB textures are uploaded and read back, and
since R8_SRGB can't be read back on GLES, because it is not a rendertarget
format and glGetTexImage and siblings don't exists, we can't default to
enabling reading back this format. This leads to an emulation of the
glGetTexImage calls issued by CS:GO, and this slows down the menus a lot
(below 1 fps on Intel XE hosts).
So add this driconf tweak and enable it for CS:GO to work around the issue.
It can be done safely, because in this case we actually can use the data
that is stored on the host in the backing IOV.
This tweak lets the CS:GO menu run at around 60 FPS when run with virgl
on a Intel XE host when it would run with less than 1 FPS without the tweak.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: John Bates <jbates@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13572 >
2021-11-02 10:22:52 +00:00
Qiang Yu
4098607870
xmlconfig_test: add unit test for executable_regexp
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13304 >
2021-11-02 02:21:00 +00:00
Qiang Yu
c7f481c615
drirc: add Mari application workaround
...
To allow using non-constant sampler array index. This prevent
Mari render fail for any scene.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13304 >
2021-11-02 02:21:00 +00:00
Qiang Yu
9a24de9aa7
driconf: add executable_regexp application attribute
...
For matching executable with variable names like Mari which
append version string to its executable like: Mari4.5v2, Mari4.7v4.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13304 >
2021-11-02 02:21:00 +00:00
Marek Olšák
a4e0b02f85
mesa: skip strlen when hashing strings for ProgramResourceHash
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507 >
2021-10-29 07:19:20 -04:00
Greg V
98dbd01a96
util: make util_get_process_exec_path work on FreeBSD w/o procfs
...
sysctl is the correct way of getting the current executable's path.
procfs is not mounted by default.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598 >
2021-10-29 06:06:05 +00:00
Greg V
1d9eda1b57
util: __getProgramName: remove check for ancient FreeBSD versions, simplify ifdefs
...
FreeBSD 5.0 was released in 2003.
We really do not need to check that we're on >= 4.4.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598 >
2021-10-29 06:06:05 +00:00
Pierre-Eric Pelloux-Prayer
cf76247f38
drirc: enable do_dce_before_clip_cull_analysis for ANSA
...
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
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
Thomas Wagner
4856586ac6
util: use anonymous file for memory fd creation
...
The original implementation in os_memory_fd.c always uses memfds.
Replace this by using the already existing os_create_anonymous_file in
order to support older systems or systems without memfd.
Fixes: 1166ee9caf ("gallium: add utility and interface for memory fd allocations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13331 >
2021-10-27 15:26:52 +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
Matt Turner
e0a74c7cad
util/format: Add PIPE_FORMAT_Y8_UNORM as an "other" layout format
...
freedreno has a different layout for tiled Y8 planes from normal R8
textures, so we need to be able to talk about them separately.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6792 >
2021-10-22 11:25:30 +00:00
Emma Anholt
68f8bbb37e
util: Move freedreno's snorm-to-unorm to util/, adding remaining cases.
...
I want it in turnip too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13379 >
2021-10-21 08:46:31 +00:00
Caio Marcelo de Oliveira Filho
9a32a7fdfe
util: Move test sources to tests/ directory
...
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
abf2af64ac
util: Convert sparse array multithread test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
213c9e944c
util: Convert roundeven_test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
83449f61ba
util: Convert rb_tree_test to gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
0d36ea7d58
util: Convert mesa-sha1_test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
89eebca057
util: Convert blob_test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
d4c536d3d9
util: Convert u_atomic_test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
1d78a31bec
util: Move tests in single file directories to tests/
...
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
2209f5794d
util: Consolidate existing gtests in a single binary
...
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Marek Olšák
d29e507adc
radeonsi: don't set inline_uniforms for viewperf because it's enabled by default
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
9f2a97e9df
radeonsi: add an option to use CPU storage uploads for threaded context
...
It's only enabled for viewperf for now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
cbcdcd42fc
radeonsi: enable shader culling on Navi1x consumer SKUs as well
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00