Marek Olšák
fb16a1121b
glapi: remove is_static_entry_point wrapper
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
20aadf4f64
glapi: use static_data.libgl_public_functions directly
...
also filter_entry_points is unused, so remove that
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
72db4a1e50
glapi: disable python escape sequences in strings that use invalid ones
...
We use invalid escape sequences in a few string.
r'...' disables escape sequences. This fixes validator errors:
/home/marek/dev/mesa/src/mapi/mapi_abi.py:45: SyntaxWarning: invalid escape sequence '\w'
'^(?P<type>[\w\s*]+?)(?P<name>\w+)(\[(?P<array>\d+)\])?$')
/home/marek/dev/mesa/src/mapi/glapi/gen/api_exec_init.py:43: SyntaxWarning: invalid escape sequence '\p'
header = """/**
/home/marek/dev/mesa/src/mapi/glapi/gen/gl_enums.py:64: SyntaxWarning: invalid escape sequence '\c'
print("""
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
1f75715dae
glthread: rename scripts to match the names of generated files
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
9a2974019b
glthread: handle glFlush with HasExternallySharedImages more efficiently
...
Doing finish without flush is more efficient because it executes the unflushed
batch immediately.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
2937d8a961
glapi: just use _gloffset_COUNT_ everywhere, which is always the function count
...
MAPI_TABLE_NUM_STATIC was just duplicated _gloffset_COUNT.
mesa/main no longer needs to specify the table size.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
057c7f0dd2
glapi: verify that aliased functions don't have entries in dispatch tables
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
02d22dd1f3
glapi: move legacy imaging functions to the end of dispatch tables
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
1fde49d50e
glapi: remove unused functions from dispatch tables
...
We also have to remove __indirect_glVertexAttribPointerNV because nothing
uses it after the removal from dispatch tables.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
c0b0ba1b77
glapi: generate static offsets from the list of GL functions automatically
...
Since glapi is part of libgallium.so, the offsets don't have to be immutable
anymore, but they still have to be fixed values within a build because both
gl_XML.py and genCommon.py use them and they should match AFAIK.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
e3f9848a5c
glapi: remove check_table tests
...
glapi is now statically built into libgallium or libGL and both must come
from the same Mesa version, so backward compatibility of dispatch tables
is no longer required.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
a8b18dce82
glapi: clarify the meaning of static_data.functions
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
6c39cc1cc3
glapi: use an assertion in SET_by_offset instead of doing nothing
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
49facd7d54
glapi: remove support for dynamically-registered functions
...
I think this was for when libglapi was older than DRI drivers and didn't
know all functions.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
3fc52ac0e0
glapi: fix build dependencies by putting all xml/py files into a single list
...
This fixes missing script dependencies that didn't trigger rebuilds when
those files were changed. To keep it simple stupid, all xml and python
files used by python scripts indirectly are now in a single global list.
All variables holding file names are also inlined, so that we use file
paths everywhere.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
11364cd133
mesa: remove a glapi workaround for Mesa 10.5 and older
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Marek Olšák
e4830d6e44
glapi: don't export always-private functions
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Marek Olšák
c13a3de924
glapi: inline functions or use equivalent alternatives
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Marek Olšák
142202cd00
glapi: remove dead code
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Marek Olšák
a22e50e6fe
mesa: don't build st_format_test on Windows
...
this is the easiest way to make it build with the glapi changes
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Caio Oliveira
dd1ca1588d
brw: Fix size in assembler when compacting
...
Calculation was wrongly walking uncompacted instructions, even if we had
some compacted in the middle, generating invalid size. Since we are
here just drop the instruction count, since in practice the caller will
have to walk the instruction stream anyway.
Fixes: 6267585778 ("intel/brw: Also return the size of the assembled shader")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33532 >
2025-03-03 20:43:56 +00:00
Lucas Fryzek
08483e9bfa
anv: Release correct bo for RT scratch
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33850 >
2025-03-03 20:13:38 +00:00
Martin Roukala (né Peres)
8fb80834ed
radv/ci: add hawaii to CI
...
This GPU is located in the same host as Tahiti, and was kindly donated
to the RADV project by Leonardo Frassetto (@DottorLeo).
It's good to finally making use of it, one year after receiving it \o/
On a side now, the skips are removed since they do not appear to be
reducing the chances of hanging once paired with the updated postamble
flushes.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563 >
2025-03-03 19:42:21 +00:00
Martin Roukala (né Peres)
f4b1d62f00
radv/ci: reduce the timeout of vkcts-tahiti to a more sensible time
...
The current runtime is just over 33 minutes, so no need for
multi-hour-long timeouts.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563 >
2025-03-03 19:42:21 +00:00
Timur Kristóf
3f3a5d8068
radv: Use flush postamble on GFX7 with different flags.
...
Flush caches at the end of each submission on GFX7.
This significantly improves stability on Hawaii
when running the CTS on multiple threads.
Keep previous behaviour on GFX6.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563 >
2025-03-03 19:42:21 +00:00
Samuel Pitoiset
7f6e28db26
radv: fix re-emitting fragment output state when resetting gfx pipeline state
...
When switching from pipeline to shader objects.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33840 >
2025-03-03 19:19:33 +00:00
Xaver Hugl
779c8d1669
vulkan/wsi: don't use sRGB if the compositor doesn't support it
...
This could realistically happen if the compositor doesn't support parametric image
descriptions at all, in which case we'd get a protocol error for trying to use it.
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33804 >
2025-03-03 18:55:29 +00:00
Gert Wollny
6da19eafd5
r600/sfn: gather info and set lowering 64 bit after nir_lower_io
...
After nir_lower_io we need to gather the info about 64 bit usage
to be up-to-date when deciding whether the remaining 64 bit IO ops
be lowered.
Before 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
the info was eventually updated to include the use of 64 bit values
also if only some IO was using this so that SFN was handling the code
correctly. As it seems with above patch this is not always the case
anymore, and we have to take care of it.
Fixes: 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32774 >
2025-03-03 18:35:45 +00:00
Sasha Finkelstein
1601668155
vtn_bindgen2: Fix memory corruption
...
This sometimes causes memory corruption, specifically on 32-bit x86
where it can result in a build failure
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33847 >
2025-03-03 17:25:58 +00:00
Mary Guillemard
7c12df63de
pan/bi: Add unit tests for FAU special page 3 and WARP_ID
...
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843 >
2025-03-03 17:04:04 +00:00
Mary Guillemard
ef0c7382c7
pan/bi: Disallow FAU special page 3 and WARP_ID on message instructions
...
This is a constraint that apply on Valhall and later, instructions
should not use FAU special page 3 or WARP_ID if running
on the message unit.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Fixes: fd1906afea ("pan/va: Add FAU validation")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843 >
2025-03-03 17:04:04 +00:00
Rob Clark
6df9591905
tu: Don't emit SP_PS_2D_WINDOW_OFFSET on a6xx
...
This register isn't there.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33823 >
2025-03-03 16:44:24 +00:00
Konstantin Seurer
4348253db5
llvmpipe: Skip draw_mesh if the ms did not write gl_Position
...
There is nothing to be done and the code will hit "assert(pos != -1);"
otherwise.
cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12684
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33812 >
2025-03-03 15:18:28 +00:00
Patrick Lerda
ee1cb894d6
r600: fix evergreen_emit_vertex_buffers() related cl regression
...
For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags":
Segmentation fault
Fixes: 81889f4d5c ("r600: ensure that the last vertex is always processed on evergreen")
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33351 >
2025-03-03 14:54:32 +00:00
Danylo Piliaiev
264d8a6766
ir3: Set need_full_quad depending on info.fs.require_full_quads
...
The info from NIR is more granular, so that we don't have to
enable full quad for coarse derivatives.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33801 >
2025-03-03 13:42:33 +00:00
Konstantin Seurer
6e3fc37d47
radv: Implement multidimensional ray query arrays
...
This is technically a bug fix, but no sane developer would use this.
It's still nice to implement all corner cases.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32334 >
2025-03-03 12:07:47 +00:00
Konstantin Seurer
febc923a46
radv: Lower ray query vars to structs
...
This is much cleaner than passing an index around it will allow
implementing multidimensional ray query arrays.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32334 >
2025-03-03 12:07:47 +00:00
Zan Dobersek
86456cf0e6
tu: support exposing derived counters through VK_KHR_performance_query
...
Turnip's current VK_KHR_performance_query implementation only exposed raw
perfcounters. These aren't exactly trivial to evaluate on their own.
This mode can still be used with the new TU_DEBUG_PERFCRAW flag. Existing
TU_DEBUG_PERFC now enables performance query mode where Freedreno's derived
counters are exposed instead. These default to using the command scope,
making them usable with RenderDoc's performance counter capture.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208 >
2025-03-03 11:38:28 +00:00
Zan Dobersek
27fd2d1ad1
freedreno: add common implementation of perfcntr-based derived counters
...
Freedreno's derived counters combine multiple perfcntrs into a more
sensible, human-friendly metric. This change picks up the counters
currently used in Freedreno's Perfetto producer and rolls them into a
more genericallly usable form.
First place of their use will be through VK_KHR_performance_query, but
the Perfetto producer should also be able to use this interface instead
of having the logic duplicated. For now the counters are available only
for a7xx devices.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208 >
2025-03-03 11:38:28 +00:00
Zan Dobersek
b8338dee39
tu/a7xx: disable preemption during performance query measurement
...
Use CP_SCOPE_CNTL to disable preemption when beginning performance query
and enable it back when that performance query is ended. This way the
collected perfcounter measurements will only cover work that's encompassed
by the query.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208 >
2025-03-03 11:38:28 +00:00
Zan Dobersek
c964a96ab2
tu: performance query result writes must use dedicated union type
...
When using vkGetQueryPoolResults for performance queries, the result of
each query is the VkPerformanceCounterResultKHR union, and the result of
each query should be written into that union according to the storage type
of the corresponding counter.
This fixes current behavior of using the generic write procedure, where
either 32-bit or 64-bit value is written depending on the specified query
result flags.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208 >
2025-03-03 11:38:28 +00:00
Zan Dobersek
1cf5cf6da3
tu: use query index when retrieving performance query iovas
...
Query index should be used to calculate the correct iova for various
performance query fields used to store counter values at the beginning
and ending of performance queries.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208 >
2025-03-03 11:38:28 +00:00
Emmanuel Gil Peyrot
b4a82110ce
panvk: Initialize out array with the correct length
...
This avoids reading past the buffer’s end in the client afterward, because the
drmFormatModifierCount hasn’t been changed from what the client passed, if it
wasn’t zero at first.
GTK triggers that bug by setting it to the length of the static array (see this
bug[0] though), but other Vulkan programs might have the same issue if they
don’t first query the count before allocating the array.
This has been tested on a Radxa ROCK 5B board running a Mali-G610 GPU.
[0] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8222
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com >
Fixes: 252ddaf51b ("panvk: fix VkDrmFormatModifierPropertiesListEXT query")
Fixes: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/issues/127
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33657 >
2025-03-03 11:09:14 +01:00
Julia Zhang
79bb8e3455
radv: advertise VK_EXT_device_memory_report
...
Signed-off-by: Julia Zhang <julia.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Julia Zhang
f504ed9e73
radv: emit device memory report for device memory events
...
Emit device memory report when radv create memory or free memory.
Signed-off-by: Julia Zhang <julia.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Julia Zhang
313aa44bf1
radv: add obj_id to radeon_winsys_bo
...
mem->bo->obj_id will be used by device memory report.
Signed-off-by: Julia Zhang <julia.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Julia Zhang
900be035c8
radv: add import and export handle_type in radv_alloc_memory
...
The import_handle_type and export_handle_type will be used to set the
memoryObjectId for memory report.
Signed-off-by: Julia Zhang <julia.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Julia Zhang
273e00bffe
vulkan: handle device memory report requests
...
Add memory_report to vk_device and init it when create vk
device to handle device memory report requests.
Signed-off-by: Julia Zhang <julia.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088 >
2025-03-03 08:26:51 +00:00
Job Noorman
c24373d907
ir3/sched: unblock a0.x/a1.x after last use
...
We currently keep a0.x/a1.x unnecessarily blocked until we have to spill
it, even if all its uses have been scheduled already. This causes
unnecessary spills and potentially schedules address writes later than
we'd like.
Fix this by keeping track of the number of uses that are still
unscheduled, unblocking address writes when it drops to zero.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33816 >
2025-03-03 07:48:16 +00:00
Job Noorman
9728b31e65
ir3: clear instruction uses when cloned
...
Clones do not share the uses of the cloned instruction.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33816 >
2025-03-03 07:48:15 +00:00