Faith Ekstrand
59f85e678f
vulkan/wsi: Take a vk_queue in wsi_common_queue_present()
...
The common entrypoint wrapper already depends on vk_queue, as do all the
drivers that implement drv_QueuePresentKHR() so there's no point in
passing through Vulkan API types anymore.
The one functional change here is that ANV is no longer forcing the
queue index to be zero, which I suspect was a mistake in the first
place.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:02 +00:00
Qiang Yu
c135ed1eb9
all: rename gl_shader_stage_name to mesa_shader_stage_name
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:41 +08:00
Qiang Yu
196569b1a4
all: rename gl_shader_stage to mesa_shader_stage
...
It's not only for GL, change to a generic name.
Use command:
find . -type f -not -path '*/.git/*' -exec sed -i 's/\bgl_shader_stage\b/mesa_shader_stage/g' {} +
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36569 >
2025-08-06 10:28:40 +08:00
Samuel Pitoiset
07fe297a3e
vulkan: fix missing presentId2/presentWait2 enable features
...
Fixes recent VKCTS changes for dEQP-VK.info.device_mandatory_features.
Fixes: 07881b085e ("vulkan: Enable PresentWait2 on many physical devices")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36547 >
2025-08-05 08:06:43 +00:00
Marek Olšák
5531f01326
nir: move list.h outside the glsl directory
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36425 >
2025-07-31 20:23:02 +00:00
Antonio Ospite
ddf2aa3a4d
build: avoid redefining unreachable() which is standard in C23
...
In the C23 standard unreachable() is now a predefined function-like
macro in <stddef.h>
See https://android.googlesource.com/platform/bionic/+/HEAD/docs/c23.md#is-now-a-predefined-function_like-macro-in
And this causes build errors when building for C23:
-----------------------------------------------------------------------
In file included from ../src/util/log.h:30,
from ../src/util/log.c:30:
../src/util/macros.h:123:9: warning: "unreachable" redefined
123 | #define unreachable(str) \
| ^~~~~~~~~~~
In file included from ../src/util/macros.h:31:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:456:9: note: this is the location of the previous definition
456 | #define unreachable() (__builtin_unreachable ())
| ^~~~~~~~~~~
-----------------------------------------------------------------------
So don't redefine it with the same name, but use the name UNREACHABLE()
to also signify it's a macro.
Using a different name also makes sense because the behavior of the
macro was extending the one of __builtin_unreachable() anyway, and it
also had a different signature, accepting one argument, compared to the
standard unreachable() with no arguments.
This change improves the chances of building mesa with the C23 standard,
which for instance is the default in recent AOSP versions.
All the instances of the macro, including the definition, were updated
with the following command line:
git grep -l '[^_]unreachable(' -- "src/**" | sort | uniq | \
while read file; \
do \
sed -e 's/\([^_]\)unreachable(/\1UNREACHABLE(/g' -i "$file"; \
done && \
sed -e 's/#undef unreachable/#undef UNREACHABLE/g' -i src/intel/isl/isl_aux_info.c
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437 >
2025-07-31 17:49:42 +00:00
Antonio Ospite
b4c7d3a08e
build: stop calling unreachable() without arguments
...
The unreachable(str) macro defined in src/util/macros.h is defined to
accept a literal string as an argument.
However the way it checks that the argument is a string literal, by
prepending an empty string where the argument is used, i.e.:
#define unreachabel(str) assert(!"" str)
still allows users to call the macro with no arguments.
This is confusing, so pass an empty string to all invocations of
unreachable() for consistency.
This is done with the following command:
git grep -l '[^_]unreachable();' -- "src/**" | sort | uniq | \
while read file; \
do \
sed -e 's/\([^_]\)unreachable();/\1unreachable("");/g' -i "$file";
done
This should not change the behaviour of the callers of unreachable() in
a meaningful way, but there will be some cosmetic consequence.
The changed invocations will now print:
Assertion `!"" ""' failed.
instead of
Assertion `!""' failed.
But this is also what happens for the invocations that do pass an
argument, for instance `unreachable("Invalid type")` currently prints:
Assertion `!"" "Invalid type"' failed.
So all invocations now also have the same output style.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437 >
2025-07-31 17:49:40 +00:00
Marek Olšák
8d3e76c250
nir: split nir_move_load_frag_coord from nir_move_load_input
...
It's a pure system value on AMD, not an input.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357 >
2025-07-29 16:20:48 -04:00
Georg Lehmann
e8ebc40f22
pvr/rogue: replace NIR_PASS_V with NIR_PASS(_, ...)
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36312 >
2025-07-23 14:00:51 +00:00
Georg Lehmann
83945e2247
pvr/rogue: return progress in rogue_nir_pfo
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36312 >
2025-07-23 14:00:51 +00:00
Marek Olšák
6286c1c66f
nir/opt_vectorize_io: optionally vectorize loads with holes
...
e.g. load X; load W; ==> load XYZW. Verified with a shader test.
This will be used by AMD drivers. See the code comments.
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36098 >
2025-07-15 16:29:30 +00:00
Simon Perretta
ad66ebb686
pvr: enable partial vertex input dmas
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:59 +00:00
Simon Perretta
043e05768a
pco: add support for more pack/unpack ops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:59 +00:00
Simon Perretta
2983d23e63
pvr: reorder device setup to create the compiler context earlier
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:59 +00:00
Simon Perretta
ba4628a094
pco: allow empty/nop vertex shaders
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:59 +00:00
Simon Perretta
f06e14cc6c
pvr: setup vk pipeline cache
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:59 +00:00
Simon Perretta
a4500abc75
pvr: store device uuid and build sha
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:59 +00:00
Simon Perretta
0751eb576d
pco: enable translation of vs sysvals
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:58 +00:00
Simon Perretta
410bba0463
pco: support flat interpolation varyings
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:58 +00:00
Simon Perretta
c386c2f9e8
pvr, pco: point size handling
...
Clamp point size to limits.
Emit default point size if required but none is provided.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:57 +00:00
Simon Perretta
dc6ea99fde
pco, pygen: add f{min,max} support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:57 +00:00
Simon Perretta
1cd2bb58fb
pco: skip vector coalescing if ssa srcs are repeatedly referenced
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:57 +00:00
Simon Perretta
9d23d92afa
pco: handle frag/point coords sysvals
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:56 +00:00
Simon Perretta
74d50d7720
pco: add support for load_ubo
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:56 +00:00
Simon Perretta
d17d97a867
pco: remove per-device specialization of SPIR-V/NIR options
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:55 +00:00
Simon Perretta
6ff964dd03
pvr, pco: initial descriptor rework
...
Use more Vulkan runtime/common functions.
Properly use the descriptor pool.
Start to remove legacy/unused constructs from PDS generation.
Support for UBO descriptors.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:55 +00:00
Simon Perretta
38d581d842
pvr: drop pvr_lower_nir
...
This pass can now remain in the compiler as Vulkan-specific data will be
abstracted into the compiler-driver interface.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:54 +00:00
Frank Binns
08222dc461
pvr: add missing refcounting for descriptor set layouts
...
Do this by switching to vk_descriptor_set_layout and making use of the helper
functions. This also has the bonus of less code in the driver.
Fixes a segfault seen when running glmark2-es2-wayland.
Signed-off-by: Frank Binns <frank.binns@imgtec.com >
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:54 +00:00
Simon Perretta
51a3372ff2
pvr: clarify image/sampler state word packing
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:53 +00:00
Simon Perretta
8b8e33106d
pco: additional helper functions for address refs
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:53 +00:00
Simon Perretta
e7d50a6781
pco: add pco nir algebraic pass boilerplate and basic lowering/opts
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:53 +00:00
Simon Perretta
087d439a52
pco: run dce pass until no more progress is made
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:52 +00:00
Luigi Santivetti
6ad0b59cc8
Revert "pvr: Implement VK_EXT_memory_budget"
...
This reverts commit 97efa57531 .
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:52 +00:00
Simon Perretta
a22ad99bdd
pvr: set device features/props/extensions to Vulkan 1.0 minimums (unless implemented)
...
The KHR_shader_expect_assume dEQP tests use dynamic rendering without
first checking that the driver supports 1.3 or the
KHR_dynamic_rendering extension
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:52 +00:00
Simon Perretta
ac2460bb3c
pvr: commonize limits
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:51 +00:00
Simon Perretta
b13fe4e7a7
pco: commonise pass macro, use on opt subpasses
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:51 +00:00
Simon Perretta
765e9d837d
pco, pygen: validate phases and io allocations for ops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:50 +00:00
Simon Perretta
c201332fff
pco, pygen: iterators for igrps and the instrs they contain
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:50 +00:00
Simon Perretta
04f3b3a5c9
pco, pygen: track valid phases and io allocations for ops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:49 +00:00
Simon Perretta
05912bcb60
pco: initial legalize pass/validation to handle hw restrictions
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:49 +00:00
Simon Perretta
4402649b01
pco, pygen: track which hw srcs map to op srcs/dests
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:49 +00:00
Simon Perretta
4e171bcf89
pco, pygen: further abstract src/dest references
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:48 +00:00
Simon Perretta
d552d5b278
pco, pygen: add support for bitwise logical ops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:48 +00:00
Simon Perretta
c2787d1d12
pco, pygen: add support for unpck and conversions
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:47 +00:00
Simon Perretta
8c379b0c3e
pco, pygen: add support for dma ld and add64_32
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:47 +00:00
Simon Perretta
ff51ba7e43
pco, pygen: add support for tst, movc instructions and s{lt,ge,eq,ne} ops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:47 +00:00
Simon Perretta
f1b63fe3f9
pco, pygen: add fdiv/frcp support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:46 +00:00
Simon Perretta
7fb0223c93
pco, pygen: support enum mappings for instances of two bitsets
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:46 +00:00
Simon Perretta
88ac50cbb2
pco, pygen: amend translation of srcs/dests with no mods
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:45 +00:00
Simon Perretta
e9c7afc217
pco, pygen: rework isa gen to support multi-instruction groups
...
- Split encode and group mappings to allow the former to be re-used.
- Add custom zero value mapping for bitset enums.
- Enable optional enum mapping for ref mods (previously just op mods).
- Commonize nop/nop.end.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998 >
2025-07-08 23:10:45 +00:00