Commit graph

2546 commits

Author SHA1 Message Date
Karol Herbst
9f67cc1510 libagx: fix heap argument type in libagx_draw_robust_index
Fixes: d339bf7a98 ("libagx: rename agx_geometry_state to agx_heap")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37690>
2025-10-03 18:44:30 +00:00
TellowKrinkle
e14adc5cb2 hk: Add non-cached memory type
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37655>
2025-10-01 13:26:51 +00:00
TellowKrinkle
05b927ac7e hk: Enable caching on memory marked with HOST_CACHED_BIT
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37655>
2025-10-01 13:26:51 +00:00
Mary Guillemard
2873f47aeb asahi: Add base expectation on VKCTS main
Seems we have new failures.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37632>
2025-09-30 20:31:27 +00:00
Sergio Lopez
2732837591 hk: fix instance reference in vk_free
In hk_create_drm_physical_device() we might call vk_free() passing
pdev->vk.instance->alloc as first argument, but if we've arrived there
via fail_pdev_alloc the instance has not yet been installed into the
physical device, potentially triggering a SIGSEGV.

Fix it by using a direct reference to the instance as first argument.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37642>
2025-09-30 08:24:26 +02:00
Simon Perretta
2a7ebf2ae0 nir/lower_alpha: extend to support dynamic a2c
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:53 +00:00
Emma Anholt
4531b8ace4 treewide: Make exported DRM FDs read-write.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this, somebody trying to map a buffer for write by the CPU would
fail.  This is not common to do in hardware driver environments, but it
shouldn't be disallowed, and there's no downside to allowing it.

I did skip virgl, because that's one where I don't know for sure if there
wouldn't be a downside to allowing RDWR (there are other virt exports
where RDWR is gated on a mappable flag).

This is a follow-up to !37088 to keep copy and paste from introducing the
same bug anywhere else.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37339>
2025-09-27 19:46:14 +00:00
Simon McVittie
9d36bf891b vulkan: Compute path to write into JSON manifests once, use it everywhere
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reduces duplication: we only need to distinguish between Windows
and Unix in one place.

The previous code was inconsistent about using either the `platforms`
option, or the `host_machine`. Following the logic described in
commit 94379377 "lavapipe: build "Windows" check should use the host machine, not the `platforms` option.",
I've assumed that checking the host machine is the more-correct version
and used that.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37576>
2025-09-26 10:47:31 +00:00
Simon McVittie
be8cac52d3 vulkan: Consistently form driver library names as prefix + name + suffix
This consistently uses `NAME.dll` on Windows, `libNAME.dylib` on Darwin
derivatives such as macOS, and `libNAME.so` on Linux, *BSD and so on.
It's also consistent about using the local variable name `icd_file_name`
for this name in every Vulkan driver, which was already the case in many
but not all drivers.

Some of these drivers probably don't make sense (or don't work) on
Windows and/or macOS, but if this is kept consistent for all drivers,
it should avoid the need for driver-specific commits like
commit 611e9f29e "lavapipe: fix icd generation for windows",
commit 951f3287 "lavapipe: set empty dll prefix",
commit 13e7a39f "lavapipe: fixes for macOS support",
commit 7008e655 "radv: Update JSON generator if Windows" and so on,
each time a driver is found to be relevant on more platforms than
previously believed.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37576>
2025-09-26 10:47:31 +00:00
Mario Kleiner
3c01205e32 asahi: Fix lseek failure error handling in agx_bo_import().
If bo->size = lseek(); would return a failure value of bo->size ==-1,
then current error handling would return while leaving the already
allocated and cached bo for the dmabuf fd in a half initialized "zombie"
state. On a successive call to agx_bo_import() for the same fd, the
assigned bo->size == -1 would mark the bo as "already initialized",
just bumping its reference count, and then returning a dysfunctional
bo to the caller, leasing to followup failures elsewhere.

Use goto error; instead, where "error:" handling will zero-out the bo,
marking it as effectively uninitialized, and hopefully causing proper
initialization on a successive call to agx_bo_import().

Fixes: df725d4f64 ("asahi: remove agx_bo::dev")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37538>
2025-09-24 15:14:42 +00:00
Alyssa Rosenzweig
5f5fda147a agx: use util_lut2
While Intel will use the full feature set of util_lut3 in the future, AGX can
use the cut down 2-source versions right now to get us an in-tree user.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37200>
2025-09-16 21:48:37 +00:00
Simon Perretta
672541d036 nir, asahi: commonize interleave_agx
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
2025-09-16 18:26:12 +00:00
Mary Guillemard
f7b953c916 hk: Advertise VK_KHR_maintenance9
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37380>
2025-09-16 17:36:58 +00:00
Mary Guillemard
7aaa5d94af hk: Rework queue creation logic
Follow what NVK does also fix order of cleanup in CreateDevice.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37380>
2025-09-16 17:36:58 +00:00
Mary Guillemard
3ec33e2629 hk: Add support for VK_QUERY_POOL_CREATE_RESET_BIT_KHR
Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37380>
2025-09-16 17:36:58 +00:00
Mary Guillemard
0aff4433e7 hk: Move query pool creation/destruction
We are going to wire VK_QUERY_POOL_CREATE_RESET_BIT_KHR next, let's move
things after host_zero_queries.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37380>
2025-09-16 17:36:58 +00:00
Alyssa Rosenzweig
2f7b1e8453 asahi: fix drm-shim
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Was trying to test a patch on my Intel box, seems asahi drm-shim bitrotted in
that time. Update the parameters to better match what I dumped off my m1
personal laptop and stub another ioctl. This gets shader-db ./run working on x86

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37382>
2025-09-15 22:46:21 +00:00
Georg Lehmann
687510495f nir: remove subgroup size related nir_shader_compiler_options members
This was added with the goal to eventually replace the per
pass subgroup/ballot size options, but that won't work because
some backends don't have a fixed subgroup size across the compilation
process.

It was also mostly added to hack around mesa state tracker behavior,
and we have a better solution there now.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37164>
2025-09-09 11:09:22 +00:00
Yonggang Luo
773a7f347a clang-format: Update the .clang-format files to conformance clang-format json-schema
The document is at
https://clang.llvm.org/docs/ClangFormatStyleOptions.html

The json-schema at
https://www.schemastore.org/clang-format.json

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37235>
2025-09-09 07:04:55 +00:00
Alyssa Rosenzweig
162f07f80c hk: assume largePoints always set
doesn't matter. this came from a Mesa audit around Vulkan features.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37240>
2025-09-08 21:56:30 +00:00
Faith Ekstrand
446d5ef103 vulkan: Drop the driver_internal from vk_image_view_init/create()
It alwways comes in through the create flags now.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36957>
2025-09-05 23:34:14 +00:00
Faith Ekstrand
42abf00f2b vulkan: Handle VK_IMAGE_VIEW_CREATE_DRIVER_INTERNAL_BIT_MESA automatically
This moves the bit into vk_image.h and handles it automatically in
vk_image_view_init() so drivers don't have to.

This also means that Meta is now hitting the driver_internal path for
all its images so we need to do the same format fixups there that we
sould normally do on the !driver_internal path.  We don't want to do
them unconditionally because v3dv and other drivers override
depth/stencil color formats and we don't want to break that.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36957>
2025-09-05 23:34:11 +00:00
Georg Lehmann
2725eaf9a2 nir/lower_subgroups: change filter to intrinsic callback
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37178>
2025-09-04 14:04:00 +00:00
Olivia Lee
554a0be553 hk: replace vk_conv_topology with vk_topology_to_mesa from vulkan/util
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37038>
2025-09-03 22:04:14 -07:00
Olivia Lee
9a03aee703 editorconfig: move OpenCL configuration to root
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All of the OpenCL files in mesa use 3-space indentation. Move the
editorconfig configuration for this to the root so that supported
editors will pick this up automatically.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37046>
2025-08-30 22:49:08 -07:00
Mary Guillemard
b7a0f0215f hk: Return 0 for opaque memory capture replay
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If implementation does not actually replay the VA, it must return 0
to not violate:

"If the memory object was allocated with a non-zero value of
opaqueCaptureAddress, the return value must be the same address."

Fixes RenderDoc capture replay, which asserts on the this spec rule
being followed.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37090>
2025-08-29 17:11:00 +00:00
Konstantin Seurer
9df7b48d2f nir: Use nir_def_as_* in more places
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36746>
2025-08-24 14:03:09 +00:00
Qiang Yu
a4b6e8b1aa mesa: implement mesh shader queries
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36751>
2025-08-22 10:01:57 +00:00
Yiwei Zhang
24f45dbc98 hk: no need to set DRI_CONF_VK_KHR_PRESENT_WAIT
..since the extensions are not advertised

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36835>
2025-08-21 07:53:15 +00:00
Alyssa Rosenzweig
9d7aaaa072 agx: drop bounds check optimize pass
It doesn't work properly and nobody's gonna fix it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:05 +00:00
Alyssa Rosenzweig
2610d2afaf asahi: implement KHR_shader_subgroup
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
70e3234570 agx: lower fmin/fmax scans
for GL.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
5b6ad73ac7 hk: reduce storage desc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
9aad6f005d hk: drop unused
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
ba00c87fdf hk: fix pathological RAM use for tess emulation
These * 32's got added when debugging this I guess and I never took them out.
Ouchie. Reduces memory footprint of tess by 32x. Geez.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
7eb7db3613 hk: clarify command pool types
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
e9bf1c59ed hk: fix todo
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
1ef97241d7 asahi: reduce ppp alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
8b96f66da6 agx: gate scratch opt on internal shaders
fixes a bunch of OpenCL CTS including test_basic vload_private due to failing
to relower the derefs but also lol.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36631>
2025-08-07 13:34:22 +00:00
John Anthony
a68a825aad nir,agx: unvendor core_id_agx
core_id will be used by SPV_ARM_core_builtins

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36019>
2025-08-07 11:46:33 +02:00
Alyssa Rosenzweig
20dab5f819 asahi: enable virtgpu support
this updates our virtgpu support to match the upstream protocol, and enables. it
is marked for backport since the older Mesa releases already had virtgpu
support, just gated off to allow for breaking wire protocol changes (of which
there was 1 at the last moment).

Upstream virglrenderer MR assigned to marge:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1541

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36580>
2025-08-06 11:11:06 +00:00
Qiang Yu
7a91473192 all: rename gl_shader_stage_is_compute to mesa_shader_stage_is_compute
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
f972e76148 all: rename pipe_shader_type to mesa_shader_stage
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\benum pipe_shader_type\b/mesa_shader_stage/g' {} +
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\bpipe_shader_type\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
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
Qiang Yu
07a3a54d37 all: rename PIPE_SHADER_TYPES to MESA_SHADER_STAGES
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/\bPIPE_SHADER_TYPES\b/MESA_SHADER_STAGES/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:39 +08:00
Qiang Yu
f60ea0a3cd all: rename PIPE_SHADER_COMPUTE to MESA_SHADER_COMPUTE
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/PIPE_SHADER_COMPUTE/MESA_SHADER_COMPUTE/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:39 +08:00
Qiang Yu
11027dd3f8 all: rename PIPE_SHADER_FRAGMENT to MESA_SHADER_FRAGMENT
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/PIPE_SHADER_FRAGMENT/MESA_SHADER_FRAGMENT/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:39 +08:00
Qiang Yu
cff8674fb4 all: rename PIPE_SHADER_VERTEX to MESA_SHADER_VERTEX
Use command:
  find . -type f -not -path '*/.git/*' -exec sed -i 's/PIPE_SHADER_VERTEX/MESA_SHADER_VERTEX/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:39 +08:00
Alyssa Rosenzweig
31ecf16428 asahi: inline UVS indices
this lets us optimize VS for linked shaders (across APIs). less indirection,
less ALU in the VS, less loads in the preamble (Vulkan) / USC uniform pushes
(OpenGL). not the most critical thing, this was already optimized to make
unlinked shaders fast, but it can't hurt ;)

also optimizing linked shaders is less objectionable from an ESO
perspective than optimizing static state.

GL:

   total instrs in shared programs: 2866067 -> 2778519 (-3.05%)
   instrs in affected programs: 1041399 -> 953851 (-8.41%)

   total threads in shared programs: 27802944 -> 27803648 (<.01%)
threads in affected programs: 1984 -> 2688 (35.48%)

   total uniforms in shared programs: 2064008 -> 2036112 (-1.35%)
uniforms in affected programs: 978997 -> 951101 (-2.85%)

Vulkan:

   Totals from 20408 (37.78% of 54019) affected shaders:
   MaxWaves: 20342464 -> 20342976 (+0.00%)
   Instrs: 7262316 -> 6958468 (-4.18%); split: -4.18%, +0.00%
   CodeSize: 53744780 -> 51480354 (-4.21%); split: -4.22%, +0.00%
   ALU: 5691626 -> 5385049 (-5.39%); split: -5.39%, +0.00%
   FSCIB: 5691626 -> 5385049 (-5.39%); split: -5.39%, +0.00%
   IC: 1210560 -> 1210512 (-0.00%)
   GPRs: 1231162 -> 1252219 (+1.71%); split: -0.58%, +2.29%
   Uniforms: 3854892 -> 3759804 (-2.47%); split: -2.47%, +0.00%
   Preamble instrs: 3390251 -> 3238677 (-4.47%); split: -4.47%, +0.00%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36501>
2025-08-03 21:57:26 +00:00
Alyssa Rosenzweig
8b5c800d1f asahi: use NIR gathered interpolation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36501>
2025-08-03 21:57:26 +00:00