Commit Graph

172309 Commits

Author SHA1 Message Date
Mary Guillemard
ce52b6d359 pan/bi: Rework indices for tex on Valhall
Lower tex/sampler table in indices on panfrost.

This also implement wide indices and change the format of texture and sampler
indices received by the compiler.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
181891495a pan/lib: Remove variables in blitter
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
05607311fe pan/bi: assert indices when offsets are present in bi_emit_tex_valhall
This should always be 0 as lower_index_to_offset is expected to be set.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Samuel Pitoiset
c7202751ad radv: fix emitting default blend state for PS without epilogs and ESO
When a fragment shader doesn't have any written color outputs it
doesn't need a PS epilog because it's unnecessary. Though, with ESO
the driver still needs to emit the default blend state like graphics
pipelines.

This fixes a bunch of flakes with ESO and Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
2024-03-11 08:51:47 +00:00
Samuel Pitoiset
7ebff681db radv: re-emit RB+ state with PS epilogs only when the col format changes
RB+ was re-emitted every time a new PS epilog was requested even if
the non-compacted color format was equal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
2024-03-11 08:51:47 +00:00
Samuel Pitoiset
c1307184d2 radv: stop using the custom blend mode for PS epilogs
Internal operations that set the custom blend mode are monolithic
pipelines only, and the value should always be zero.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
2024-03-11 08:51:47 +00:00
Tapani Pälli
e592ab466f anv: use workaround framework for Wa_16013000631
This should drop it from MTL as there it should apply only for a0
stepping.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28047>
2024-03-11 08:18:26 +00:00
Christian Gmeiner
93255abe30 etnaviv: Fix how we determine the max supported number of varyings
The driver is written that we should support ETNA_NUM_VARYINGS and reporting
a bigger number will cause some troubles. I had a quick look at galcore's
hw database and there are entries that report a higher value.

So I think what we want is to the minimum value of what kernel driver reports
and what the gallium driver should be able to handle.

Fixes: 84816c22e4 ("etnaviv: ask kernel for max number of supported varyings")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27923>
2024-03-11 07:30:51 +00:00
Yonggang Luo
14e9894a19 glx: Remove DEBUG code in xfont.c
This is the result of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21946#note_1836697

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28093>
2024-03-11 00:09:58 +00:00
Faith Ekstrand
cc74a819e4 nvk: Disable the Out Of Range Address exception
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
0ed7bce8e5 nvk: Always wait for the FALCON in set_priv_reg
The previous version had an optimization where, instead of actually
waiting on the FALCON to return, it would just do a bunch of nops in
some cases.  This seems broken at least on Turing+ and results in
registers not ending up with the right values.  It only really shows up
when you set two registers back-to-back in which case the second
SET_PRIV_REG may mess up the first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
df90d80d9d nvk: Document the register name for the helper load workaround
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
cbcef73668 nil: Fix a typo in a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Echo J
f8f9bceb17 nak: Rip out a few dead_code statements
This is a far less radical solution (but I still removed a decent
amount of them)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27991>
2024-03-10 16:28:14 +00:00
Caio Oliveira
e1afffe7fa intel/brw: Use hstride instead of stride for accumulator
The `stride` field is not meant to be used by ARFs (like the
accumulator), and is always 1.  Use the `hstride` instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28064>
2024-03-09 18:26:24 +00:00
Marek Olšák
e01266335b amd: update addrlib
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27954>
2024-03-09 16:56:56 +00:00
Mike Blumenkrantz
2cd192f879 mesa: fix CopyTexImage format compatibility checks for ES
the ES spec imposes additional requirements for copy commands,
specifically that the formats have matching component sizes

the existing check used the driver's internal formats to check
for a match, which is broken since the spec requires the match be
between the passed internalFormat and the buffer's effective internal
format (i.e., this has no relation to what the driver supports)

fixes KHR-GLES3.copy_tex_image_conversions.forbidden* on a bunch of drivers

cc: mesa-stable

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28030>
2024-03-09 15:23:07 +00:00
Mohamed Ahmed
3b05ebaa62 nvk: advertise shader resource residency
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
410de4bf69 nak: wire up sparse image loads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
b17f139281 nak: Wire up sparse residency for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
140cf8d616 nak/nir: Add sparse support to shrink_image_load()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
671c6334bf nak: Plumb is_sparse through from NIR for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
75390a7aeb nak: wire up shader resource residency intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
09e2917ee8 nak: Rename resident to fault
The predicate returns true if the requisite pixels are NOT resident.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
48803ac53d nvk: enable sparse residency features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
db45b29f5f nvk/queue: Add support for non-opaque sparse binds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
80b417d557 nvk: Refactor opaque image binds
This adds a helper for iterating over the various planes separate from
the actual bind operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
97de81af13 nvk/queue: Add a push_bind helper
This automatically combines consecutive bind ranges so we potentially
pass a smaller set of binds to the kernel.  It also does the assert that
everything is in-bounds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
bd6940a68d nvk: add sparse queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
23f2cfe8fb nil: Add support for sparse resident images
These have to use one of the Vulkan specified sparse image block sizes
for the tiling and have concept of a mip tail start LOD which we need to
calculate as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
3700e58692 nvk: Use "real" 3D image views
Now that we have NAK and codegen isn't messing about with 3D images
behind our back, 3D storage images "just work".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
e5a2a9b60e nil: Add a concept of sliced 3D image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
c809e85832 nil: Add a concept of width to tile sizes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
f406206fee nil: Rework tiling calculations
Instead of calling choose_tiling once per LOD, we now call it once at
the top and then simply clamp at every LOD like the hardware does.  This
means all heuristic decisions get made up-front and the mip level walk
simply emulates the hardware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
1a2f23439b nvk: Use row_stride_B instead of width for render and copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
301e707db5 nil: Expose tiling_extent_B()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
7a314170f7 nil: Add helpers for conversion from pixel values to tiles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
132516d702 nil: Add helper function to get tile size in pixels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
ad62f87045 nil: change image_level_size() to take tiling in account
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Paulo Zanoni
a8f7d26c2b anv: change the vm_bind-related kmd_backend vfuncs to return VkResult
All these vfuncs funnel down to either stubs or the xe_vm_bind_op()
function. By returning int we're shifting VkResult generation to the
callers, which are simply not doing the correct job. If they get
VkResult they can simply throw the errors up the stack without having
to erroneously try to figure out what really happened.

Today the callers are returning either VK_ERROR_UNKNOWN or
VK_ERROR_OUT_OF_DEVICE_MEMORY, but after the patch we're returning
either VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_DEVICE_LOST.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni
4863e12679 anv/sparse: don't use the bind_timeline when doing sparse binding
The bind_timeline is used to guarantee that non-sparse objects will
be bound when batches use them (although any batch will wait on the
most recent bind, even if that's not necessary). For sparse binding
resources, it's up to the user to guarantee synchronization: do not
force every single batch buffer to wait on the latest sparse binding
operation, as that adds unnecessary synchronization points.

v2: Document how each of the vfuncs interacts with bind_timeline
    (José).

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni
8051919b3c anv/sparse: leave the semaphore waits and signals to the vm_bind ioctl
We can now finally leave the semaphore waits and signals to the
vm_bind ioctl, making vm_bind operations truly asynchronous.

This was previously done for TR-TT in 18bd00c024 ("anv/trtt: don't
wait/signal syncobjs using the CPU anymore").

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni
aa07d8a04c anv/sparse: don't issue a single bind operation per vm_bind ioctl
The xe.ko driver finally fixed bug 746, which means we can finally
pass multiple bind operations in a single ioctl. There's a dEQP test
that issues 960 bind operations in a single call, so our gains here
have potential, although most real-world apps are not even remotely
close to this.

Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/746
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
David Heidelberg
dd6301935e ci/freedreno: update expectations comment
Fixes: c91bd82b4b ("Uprev Piglit to 1e631479c0b477006dd7561c55e06269d2878d8d")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28060>
2024-03-08 22:12:18 +00:00
Yiwei Zhang
c9d3cc2615 vulkan: refactor the runtime header gen order dependency
Summary:
- ensure headers used outside runtime are included in dependency source
- drop redundant idep_vulkan_common_entrypoints_h
- drop redundant icd side tricks for the order of header gen

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
d857f10574 vulkan: remove header files from lib source files
The generated "astc_spv.h" is for runtime internal use, so leave it
inside the runtime files to ensure the header is generated before being
used to compile.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
90824e07a2 vulkan: properly ensure wsi_entrypoints header gen order
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
872c9fabeb vulkan: remove unused wsi_common_entrypoints include and dep
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
8af267eb00 venus: fix ffb batch prepare for a corner case and avoid a memcpy UB
Batches must be ignored if batch count is zero, so all batch inspections
have to be gated behind batch count. For memcpy, it's UB if either src
or dst is NULL even when size is zero.

Side note:
- For original commit, this fixes just the memcpy UB
- For current codes, this fixes to not skip ffb batch prepare

Fixes: 493a3b5cda ("venus: refactor batch submission fixup")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28071>
2024-03-08 21:26:18 +00:00
David Heidelberg
f5532f8bab intel/tools: avoid invalid time and file bits combination
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10780

Fixes: cc41603d6d ("intel/tools: new intel_sanitize_gpu tool")
Reported-by: Fabio Pedretti <pedretti.fabio@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28081>
2024-03-08 21:01:38 +00:00