Commit graph

189224 commits

Author SHA1 Message Date
Aaron Ruby
2e15763686 gfxstream: Full emulation support for VK_EXT_image_drm_format_modifier
- Fix the checks for emulation (based on presence of the extension
on the host)
- Add flag in gfxstream_vk_physical_device, otherwise the real device
extensions are not properly filtered when communicating with the host.
- The "function" version of the check in ResourceTracker can eventually
just check the flag once mesa and gfxstream objects are combined
- Remove the duplicate getPhysicalDeviceFormatProperties2 impl, this is
covered by the ResourceTracker impl
- Add ResourceTracker impl for getImageDrmFormatModifierPropertiesEXT
- Remove isDmaBufImage flag from VkImage_info, and clean up all the code
associated with this flag. In on_vkCreateImage, all required info is
avaialble from the extMemImageCi::handleType. In on_vkAllocateMemory,
this is all associated with the tiling of the dedicatedImage for the
allocation

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
4197081329 gfxstream: Remove vkGetImageSubresourceLayout ResourceTracker entry
... and the linearPeerImage that was backing emulated drmFmtMod images.

With proper drmFmtMod emulation, the VkImage itself will be
linear-tiled.

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
9447de5dc4 gfxstream: Downgrade log severity when enabling params in LinuxVirtGpu
Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:33 +00:00
Alyssa Rosenzweig
cdd7b36faa tu: use the stats framework
This doesn't "go all the way", ideally we'd plumb stats into ir3
compiler and then reuse the generated code for GL. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921 for an
example of that. But this is a step in the right direction by itself.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33923>
2025-03-11 19:35:50 +00:00
Yiwei Zhang
5badd0d101 venus: sync protocol for accel struct indirect build encoding fix
ppMaxPrimitiveCounts also requires the same nested dynamic array special
treatment.

Fixes: 6bac77b75c ("venus: sync protocol for ray tracing support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33995>
2025-03-11 19:14:23 +00:00
Yiwei Zhang
9fb149d4fe venus: sync protocol support for maint7
make a separate sync mainly to isolate the next fix

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33995>
2025-03-11 19:14:23 +00:00
Maíra Canal
7775c79035 v3dv: don't overwrite the primary fd if it's already set
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If a valid primary file descriptor is already set (e.g. from vc4),
don't overwrite it with -1.

This prevents losing a valid primary fd and resolves issues arising
when vc4 is the first node returned by `drmGetDevices2()` and v3d is
the second.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12777
Fixes: 188f1c6cbe ("v3dv: rewrite device identification")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33958>
2025-03-11 18:31:58 +00:00
Dave Airlie
2983ca0d20 loader/nouveau: load zink as the GL driver for turing and above.
If the kernel supports modifiers and the GPU is a Turing+ then
force using zink instead of nvc0.

Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29232>
2025-03-11 17:39:14 +00:00
Samuel Pitoiset
d1a2ba57f9 radv: fix a GPU hang with inherited rendering and HiZ/HiS on GFX1201
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With secondary command buffers, inherited rendering can be used but
it's basically impossible to know if the depth/stencil attachment
enabled HiZ/HiS. But it's required to disable WALK_ALIGN8 to avoid
GPU hangs.

This assumes that HiZ/HiS is enabled for inherited rendering as long
as a depth/stencil attachment is used. It's not the most optimal
approach but it's not supposed to hurt either.

This fixes a GPU hang with
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_cmdbuffers
and friends.

GFX1200 isn't affected because it doesn't support HiZ/HiS.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33986>
2025-03-11 14:14:25 +00:00
Erik Faye-Lund
c34c7b1f3b panvk: correct VkPhysicalDeviceProperties::deviceName
We currently report a deviceName as e.g. "Mali-G610 (Panfrost)", but
panfrost has nothing to di with the physical device, and the suffix
doesn't belong there at all.

So let's remove that suffix from PanVK. This results in output like this
from vulkaninfo:

---8<---
VkPhysicalDeviceProperties:
---------------------------
        apiVersion        = 1.1.305 (4198705)
        driverVersion     = 25.0.99 (104857699)
        vendorID          = 0x13b5
        deviceID          = 0xa8670000
        deviceType        = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName        = Mali-G610
        pipelineCacheUUID = <snip>
---8<---

We already sort of namedrop Panfrost in the driver properties:

---8<---
VkPhysicalDeviceDriverPropertiesKHR:
------------------------------------
        driverID        = DRIVER_ID_MESA_PANVK
        driverName      = panvk
        driverInfo      = Mesa 25.1.0-devel (git-136dd9f985)
        conformanceVersion:
                major    = 1
                minor    = 4
                subminor = 1
                patch    = 2
---8<---

While this might techically speaking be a regression, PanVK has been
marked as experimental until Mesa 25.0. But to reduce the risk of people
starting to depend on this behavior, let's also backport this change to
the 25.0 release.

The patch looks a bit funny, because we add the " (Panfrost)"-suffix in
common code, and this moves it to the Gallium driver. But effectively,
this means PanVK is the only driver that sees a change of behavior.

Backport-to: 25.0
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33972>
2025-03-11 13:50:05 +00:00
Daniel Stone
69cc8762f0 ci/panfrost: Move G610 testing to pre-merge
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33431>
2025-03-11 12:59:17 +00:00
Karmjit Mahil
80e90150e9 tu: Fix Perfetto build error with vk_buffer
Fixes: 68bbc87063 ("tu: Switch to device address from vk_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33997>
2025-03-11 12:29:59 +00:00
Erik Faye-Lund
f6112a26c5 panvk: expose EXT_display_control
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We have a common implementation for this, let's just use that.

Similar to the previous commit, this is a bit silly. But if we ever get
in a situation where VK_EXT_display actually makes sense, this stuff
should "just work", so let's enable it for good measure.

Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33916>
2025-03-11 11:42:08 +00:00
Erik Faye-Lund
8aae7d153d panvk: expose VK_KHR_display
It seems the common WSI code does all that's really needed here for us
already. Enabling this lets me run vkmark on PanVK.

This is a bit silly, because what actually happens here is that we end
up passing -1 as the display_fd to wsi_device_init(). This in turn leads
us to returning zero usable displays, which renders the extension
somewhat useless. But it is better than not supporting the extension, and
not supporting applications who have a hard depdendency on it fail, like
is the case with vkmark.

Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33916>
2025-03-11 11:42:08 +00:00
Erik Faye-Lund
10cbd4f211 panvk: rework how we deal with extension-reqs
We're currently exposing a bunch of extensions that requiring Vulkan
1.1, and we'll soon enough do the same for Vulkan 1.2. Instead of having
to update each of these extensions separately once we add new Vulkan
version support for some gens, let's use a single variable for this
instead.

And while we *could* query the exposed vulkan version and do this a bit
more "automatically", this makes it easy to leave some needless checks
behind if the baseline version changes. Leaving this as a arch check in
this function should make it a bit more obvious when the check can be
removed.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33971>
2025-03-11 11:20:27 +00:00
Erik Faye-Lund
43799d6dcb panvk: fix extension requirement
This extension requires Vulkan 1.1, which we don't yet expose on Bifrost
GPUs.

Fixes: a9592a0c15 ("panvk: enable subgroupExtendedTypes")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33971>
2025-03-11 11:20:27 +00:00
Georg Lehmann
5bfd1547d2 aco: don't assume that v_interp_mov_f32 flushes denorms
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Foz-DB Navi21:
Totals from 3 (0.00% of 79789) affected shaders:
Instrs: 1708 -> 1722 (+0.82%)
CodeSize: 9416 -> 9460 (+0.47%)
Latency: 12094 -> 12371 (+2.29%); split: -0.02%, +2.31%
InvThroughput: 1967 -> 1992 (+1.27%)
Copies: 105 -> 106 (+0.95%)
PreVGPRs: 131 -> 132 (+0.76%)
VALU: 1155 -> 1169 (+1.21%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33974>
2025-03-11 09:51:39 +00:00
Pierre-Eric Pelloux-Prayer
dfa725cede radeonsi: guard perfetto support with ifdef in si_draw
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
2e8232521d radeonsi: add pid/tid to the vk_queue_submit event
Without these it's impossible to know which application generated
the event.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
e6a16adbdb radeonsi: tag perfetto conditions as unlikely
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
6c2edb9762 radeonsi: cache u_trace_perfetto_active value
u_trace_perfetto_active uses an atomic read so avoid doing
it too much in hot path.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
770b5bc757 st/mesa: fix nir_load_per_vertex_input parameter
num_components should be 1 as we're loading an offset value.

Fixes: ec68f0492b ("st/mesa: switch GL_SELECT shader to IO intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12774
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33982>
2025-03-11 07:45:07 +00:00
Valentine Burley
68bbc87063 tu: Switch to device address from vk_buffer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33965>
2025-03-11 07:12:14 +00:00
Samuel Pitoiset
01f92acf10 radv/winsys: use real info for GFX12 in the null winsys
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33970>
2025-03-11 06:50:49 +00:00
Samuel Pitoiset
dd2e9c11af aco/tests: use GFX1201 instead of GFX1200
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33970>
2025-03-11 06:50:49 +00:00
Kenneth Graunke
cdbedc9eff intel: Move unlit centroid workaround into the elk compiler
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was only needed on Sandybridge.  We can delete the brw code,
and replace the generic devinfo bit with a helper inside the elk
compiler itself.

Thanks to Iván Briano for noticing we still had dead brw code for this.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
1dfed59c49 intel: Use devinfo->urb.min_entries[GS and TCS] for setting URB configs
We were not using the minimum values from devinfo for anything.  For
tessellation control, the minimum value is 0, so we continue taking
MAX2 of that with 1 when tessellation is enabled so we have at least
something guaranteed to be present.  For geometry, the minimum value
is already non-zero (and updated by the previous patch).

This will have the side-effect of raising the minimum number of URB
entries for geometry stages.  This is currently not known to fix
anything, but should be more closely following the documentation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
404ed1d153 intel/dev: Set a higher minimum number of URB entries for GS
We've been programming our minimum number of URB entries for geometry
shaders to 2, but it appears that we should have been setting 8 on
Broadwell and later.  Additionally, there's a workaround on Skylake
and later that requires us to add flushing (which we haven't) or use
a minimum of 16 URB entries.

This alone will not fix anything, as nothing reads this devinfo field
presently (will be fixed in the next commit).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
dc66dee8ad intel/dev: Rework device info macros for Gfx8+
As we added new platforms, the device info macros evolved over time
Most platforms had a "FEATURES" macro, some had a "HW_INFO" macro,
a few had macros for URB entries - some with min entries only, some
with min and max, some including the .urb = { ... } braces, others not.

Thread counts or subslice info was sometimes considered FEATURES,
sometimes HW_INFO, sometimes inserted only in the final structure.

FEATURES macros often inherited from an ancestor platform, but not
necessarily the prior platform - many were based on GFX8_FEATURES.
Many redundantly set the same feature bits as prior platforms.

This patch aims to clean up the situation, so it's a little more
organized, especially if you look at multiple generations.  Macros
are now split into several separate pieces:

1. The FEATURES macro only has architectural features, such as LSC,
   ray tracing support, 64-bit integers, flat CCS, and so on.  Thread
   counts, subslice info, and URB sizes that may vary by SKU are not
   included here.  This makes it easy for one platform to inherit the
   features from the previous, while not pulling in that extra data.

2. THREAD_COUNTS macros contain maximum thread counts from the
   3DSTATE_VS documentation and so on.

3. URB_MIN_MAX_ENTRIES macros contain the entire URB configuration,
   including .urb = { ... }.

4. PAT_ENTRIES macros (on modern platforms) contains our choice of which
   PAT entries to use for various types of resources.

5. CONFIG macros combine all of the above into a tidy bundle for use
   in defining various structures, and may also include the platform
   macro or simulator ID for convenience.

On recent platforms where hwconfig tables exist, items #2-3 could
potentially be dropped and filled in from there instead.  For XEHP+
where we require hwconfig, we instead have a PLACEHOLDER_THREADS_AND_URB
macro that makes it clear that these values are updated from hwconfig.

One nice thing is that the bits that could (or do) come from hwconfig
tables are now cleanly separate from those that do not (i.e. platform
feature support, PAT entry selection, and so on).

This patch does not touch GFX7 or earlier macros.  We could probably
offer a similar treatment there, but they're generally working and not
quite as complex.

To verify that this commit does not have unintentional changes, I
recommend running

   objdump -s build/src/intel/dev/libintel_dev.a.p/intel_device_info.c.o

before and after this commit, and diffing the output.  The devinfo
structures produced are identical.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
20a229bc06 intel/dev: Set max_wm_threads to 0 in the Gfx9+ devinfo structs
intel_device_info_init_common calculates this for Gfx9+ based on
max_threads_per_psd and slice information.  Mark it as zero in the
structures to make clear that the value there isn't useful, and make
it easier to diff binaries for the next commit's refactors.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7ccc786acf intel/dev: Set minimum HS URB entries to 0.
The documentation for 3DSTATE_URB_HS has 0 as the minimum number of HS
URB entries for all platforms.  See BSpecs 32162, 47137, 56271 for
Gfx6-11, Xe, and Xe2-3, respectively.

This should silence warnings about our device info field not matching
the hwconfig tables.

Notably, nothing in our drivers currently uses this value so it cannot
have a functional impact.

Fixes: 4064b5546b ("intel/dev: reduce warning noise from urb settings")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7f6b1dee2c intel: Move devinfo->has_compr4 into the elk compiler
Used in exactly one place in elk.  Off to live there.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
be8ec31e72 intel: Move devinfo->has_negative_rhw_bug into the elk compiler
This is only needed for original 965G/GM clipper code, which only exists
in the legacy compiler.  Send it off to live with the elk.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
0bf779ed31 intel: Delete devinfo->has_surface_tile_offset
This is used in exactly one place in crocus, which already has a comment
indicating that this code is needed for original Gfx4 hardware.  Just
replace that with a verx10 == 40 check.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7f50f1591b intel: Delete devinfo->must_use_separate_stencil
This is used by a single place in ISL only for sanity checking the
decisions it has already made.  The knowledge is already all centralized
in ISL these days, so we don't need a device info bit.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
59c9bfa8f3 isl: Drop compile time "use separate stencil" checks.
This code is a lot of mess for no real benefit.  It's existed since
the dawn of isl, and serves to let you optimize out a single check
in release builds for Ironlake and Sandybridge systems.  All other
uses are for asserts, which already get compiled out in release mode.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
26418817a7 isl: Delete redundant "use separate stencil?" check
This code, since the dawn of time, has had a redundant check for gen5-6
separate stencil in the final else clause:

   } else if (doing separate stencil on gen5-6) {
       return compact
   } else {
       if (doing separate stencil on gen5-6)
          return compact
       ...
   }

We can eliminate that one.  The else clause then has a single if, so it
can be folded into the "else if" ladder alongside the others.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Faith Ekstrand
e029d2b45a nvk,nil: Stop panicing in image creation
If an image gets created with unsupported parameters (which is a pretty
complex thing to check), it's probably better to just return an error
rather than panic, especially since Rust panics happen even in release
builds.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
917cecb3c2 nil: Split linear and tiled image creation
They're so different that sharing the code really wasn't buying us
anything.  It's way easier to read if the two are separated.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
3c11da8aea nil: Relax alignment requirements for linear images
Compositors sometime try to import BOs with lower alignments than 128B.
This seems particularly common in the case of cursor images but it can
also happen on other BOs allocated by the old nouveau GL driver.  As
long as we avoid rendering to them (which NVK will do), the
texture/image hardware is fine as long as they're at least 32B-aligned.
Panicing in this case isn't very nice to compositors.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
e36f9d6909 nvk: Allow rendering to linear images with unaligned strides
We can do this by just enabling the fall-back path whenever we detect
something that's not nicely aligned.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
a18c176093 nouveau/winsys: Stop asserting that imported BOs are aligned
This may not be true if it comes from the nouveau GL driver.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Ivan A. Melnikov
4ad5b8f5bb gallium/radeon: Make sure radeonsi PCI IDs are also included
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When importing libdrm_radeon code [1][2] it was somehow missed
that what libdrm has in one r600_pci_ids.h, Mesa has split
into r600_pci_ids.h and radeonsi_pci_ids.h. So, devices
with ids from radeonsi_pci_ids.h were not considered valid for
radeon_surface_manager_new.

This commit changes that, thus fixing radeonsi for these
devices.

[1] commit 1299f5c50a
[2] commit 3aa7497cc0

Fixes: 1299f5c50a
Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33940>
2025-03-10 23:12:54 +00:00
Karol Herbst
d74b3c550b rusticl/mesa: remove Sync from PipeContext
It was never sync and never will be. Luckily we can just remove it now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:14 +00:00
Karol Herbst
7d94fe8c5f rusticl/queue: cache bound CSO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
00e3d75a58 rusticl/queue: make it unncessary to keep QueueContext Send
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
7bbf825b52 rusticl/kernel: rename CSOWrapper to SharedCSOWrapper
Indicate that the CSO can actually be shared across pipe_contexts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
0c0c10a811 rusticl/program: simplify active_kernels check
This removes one loop, also will allow us to cache the device builds in
the queue to optimize binding compute states.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Alyssa Rosenzweig
67598775ad libagx: clean up
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
8d338292dc libagx: use indirect draw struct
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00