Commit graph

179382 commits

Author SHA1 Message Date
Eric Engestrom
ef88cb643a nvk/ci: document regressions
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/11736

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
6b460189f4 nvk+zink/ci: mark spec@arb_sample_shading@samplemask .*@0\..* partition as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
397bdb944d llvmpipe/ci: mark now-skipping test as no longer failing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Alyssa Rosenzweig
8c501a121f nak: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30573>
2024-08-19 16:35:49 +00:00
Faith Ekstrand
185379ba81 nvk: Stop leaking the descriptor table in-use set
Fixes: ef9d9b70a6 ("nvk/descriptor_table: Add support for requesting a specific index")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30724>
2024-08-19 16:17:13 +00:00
Valentine Burley
f984ff40fe tu: Remove redundant bits override from lower_tex_ycbcr
This isn't needed anymore, because vk_format_get_component_bits now accesses the proper
pipe formats and therefore returns the correct bit count since the following commit:

57c81bab04 ("vulkan/format: Translate two 420_UNORM formats properly")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30493>
2024-08-19 15:36:49 +00:00
Mike Blumenkrantz
694478025d egl/glx: make detecting explicit modifier support more explicit
explicit modifier usage is different from general modifier capability

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11652, https://gitlab.freedesktop.org/mesa/mesa/-/issues/11663
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662>
2024-08-19 15:00:51 +00:00
Mike Blumenkrantz
c20d6a9197 egl: make dmabuf/modifier display bools a bit more precise/intelligible
'has_modifiers' was misleading and not actually useful

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662>
2024-08-19 15:00:51 +00:00
Konstantin Seurer
a77f1d04d2 llvmpipe: Use derivative intrinsics
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30584>
2024-08-19 14:09:11 +00:00
Adam Jackson
e497f81603 rusticl: Add clCreateSubDevices stub
unified-runtime tries to call this unconditionally. It handles errors
correctly, but calling None here isn't an error, it's a crash. Just
return CL_INVALID_VALUE so we don't crash.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30699>
2024-08-19 13:35:40 +00:00
Thomas H.P. Andersen
de0f226f84 nvk: do not overwrite test cases
without this the second test case was just overwritten by the following
cases

Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30719>
2024-08-19 13:20:30 +00:00
Konstantin Seurer
d3ff76d27b radv: Synchronize shader dumping
When RADV_DEBUG=shaders is set, printing e.g. different NIR shaders from
different threads at the same time makes the output unreadable. Use a mutex
to synchronize shader dumping so that all shaders get printed in once piece.

Since we're writing everything to a file or terminal anyway, the
performance impact of forcing singlethreaded compilation is negligible.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25215>
2024-08-19 12:29:59 +00:00
Boris Brezillon
d6d8bb8657 util/hexdump: Squeeze repeated patterns instead of zero-ed chunks
Our u_hexdump() squeezes 16-byte chunks filled of zeros, where the unix
hexdump squeezes repeated 16-byte chunks. Turns out panfrost/panvk dumps
can be pretty big when when VM dump is requested
(PANVK_DEBUG/PAN_MESA_DEBUG=dump) and memory regions are
filled with repeated non-zero patterns (like a Z16_UNORM buffer cleared
to 1.0, AKA 0xffff).

Avoiding the repetition of such non-zero patterns in dumps significantly
reduces the size of the dumps. It also clears any confusion for people
used to the original hexdump semantics where a star means the previous
line is repeated.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30692>
2024-08-19 11:28:18 +00:00
Lionel Landwerlin
e10cbb59a5 anv: add assert to detect problematic instruction merges
We stick to a rule in the driver that each field is only set in a
single place in the driver. Therefore when merging instructions, we
should never have any bit set to 1 from both sides.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin
982106e676 anv: only set 3DSTATE_CLIP::MaximumVPIndex once
Currently we can end up merging 2 prepacked 3DSTATE_CLIP instructions
where 2 different places in the driver fill the MaximumVPIndex.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin
7c73346549 anv: remove unused macro
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin
9eff285a46 anv: fix extended buffer flags usages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bcc0ec8e6c ("anv: enable KHR_maintenance5")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
2024-08-19 10:13:09 +00:00
Lionel Landwerlin
eacb8f85a2 vulkan/runtime: fix GetBufferMemoryRequirements2 for maintenance4
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2649ee0724 ("vulkan/runtime: implement vkGetBufferMemoryRequirements2()")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
2024-08-19 10:13:09 +00:00
Job Noorman
e80c6d0f00 ir3: fix calling ir3_const_state_mut in the binning VS
lower_driver_param_to_ubo would call ir3_const_state_mut
unconditionally. However, since 850f2aab03 ("ir3, tu: Use a UBO for VS
primitive params on a750+"), it can be called for the binning VS,
causing an assert. This commit makes sure to only call
ir3_const_state_mut when it's really necessary to have mutable access to
the const state.

Fixes: 2c47ad7774 ("ir3: make ir3_const_state less error-prone to use")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30718>
2024-08-19 09:54:45 +02:00
GKraats
0311159bed i915g: fix count of buffers at i915_drm_batchbuffer_validate_buffers
This commit contains the fix with num_of_buffers at validation-call
at i915_drm_batchbuffer_validate_buffers.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
2024-08-18 20:19:44 +00:00
GKraats
ed2123158d i915g: Screen corruption with ENOBUFS caused by fence register shortage
This commit solves the shortage-problem at the blit-functions by
checking the number of fence-registers after updating the batch.
If too many registers are used,
the batch-entries and relocs for the current blit function are
removed by setting batch->ptr and reloc_count to value before
the blit call and calling drm_intel_gem_bo_clear_relocs.
This truncated batch is flushed,
and the batch is updated again for the current blit function.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
2024-08-18 20:19:44 +00:00
Karol Herbst
93e96da945 rusticl: do not use CL vector types in bindings and code
Bindgen seems to miscompile them and I kinda thought I've done this
already in the past, but apparently not.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11722
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30710>
2024-08-18 09:23:22 +00:00
Caio Oliveira
40f77b6936 intel/brw: Avoid modifying the shader in assign_curb_setup if not needed
If there are no uniforms to push, don't emit the AND or invalidate the
shader analysis.  This affects only compute shaders.

Not a significant impact since lots of shaders end up pushing
uniforms.  Fossil-db numbers (restricted to compute pipelines only) for DG2

```
Totals:
Instrs: 3071016 -> 3070894 (-0.00%)
Cycle count: 8320268863 -> 8320264519 (-0.00%)

Totals from 122 (2.70% of 4520) affected shaders:
Instrs: 10675 -> 10553 (-1.14%)
Cycle count: 2060003 -> 2055659 (-0.21%)
```

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30631>
2024-08-17 16:25:01 -07:00
Faith Ekstrand
6a84d5439d nvk: Move the ANTI_ALIAS_CONTROL logic to the MME
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
574798a9a8 nvk: Add macros to sort out tess parameters
We need to flip trianges from CW to CCW based on the domain origin
specified as dynamic state.  Instead of tracking all this on the CPU,
add a scratch register and do the conversion in the MME.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
5a2e25db69 nvk/mme: Add helpers for masked scratch updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
954f274c19 nvk: Move setting VB enables and strides into macros
This effectively splits the two states apart so that we can set them
independently.  Inside the macros, we only update states that have
actually changed which should also be a bit more efficient.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
07d7652624 nvk: Move the guts of BindVertexBuffers2 into a macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
b47f928f4b nvk: Move the guts of BindIndexBuffer2KHR to a macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
5f29edff07 nvk: Increase the context init size
We're about to add a bunch more MMEs and we're going to blow past the
old limit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
00b6635407 nvk: Emit NVK_MME_SCRATCH_DRAW_BEGIN as part of flush_ia_state()
We're always storing it in a scratch register for register pressure
reasons anyway.  We may as well just stash it there as a state reg and
we can avoid emitting it all over the place.  This reduces each draw
call to nvk_flush_gfx_state() followed by the actual draw, which is now
independenty of any dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
7d6cc15ab8 nvk/mme: Add a unit test framework for driver macros
Also add tests for NVK_MME_CLEAR to demonstrate the framework.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
03f785083f nvk: Reserve MME scratch area for communicating with FALCON
mme_set_priv_reg() needs the first three registers to send data to/from
FALCON04.  If we don't reserve these in the register space, it may stomp
other things.  This only really matters pre-Volta where we need to use
privileged registers for conservative rasterization.  However, it's a
good idea to reserve the space none the less.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
50a030b02a nouveau/mme: Add a generic simulator function
This one takes a devinfo and decodes and simulates the shader with
whichever sim is appropriate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
33315ce136 nouveau/mme/tu104: Properly handle mthd increment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
4f14349823 nouveau/mme: Add a pluggable state interface
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
4d2d7d6c15 nouveau/mme/fermi: Break the state simulator into a pluggable component
This is equivalent to the previous commit, but for Fermi.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
aabd7941ce nouveau/mme/tu104: Break the state simulator into a pluggable component
Instead of the state part of the simulator being baked in, it's now
broken out into a pluggable component that the simulator talks to via a
function pointer interface.  This will let us run the simulator without
the full state simulator under the hood.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
79e0b632a2 nouveau/mme: Use a designated initializer in mme_fermi_decode()
Otherwise some fields may not be initialized.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
7d4fafb0e9 nouveau/mme: Allow shifting immediates on Fermi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
c218bd798f nouveau/mme: Add NOT and AND_NOT ops
Fermi has AND_NOT natively and NOT is just AND_NOT(0, x).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
da96084392 nouveau/mme: Disassemble MERGE more like the mme_merge()
In the builder helper, it's (dst_pos, bits, src_pos).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
8d20ade09b nouveau/mme: Don't allow PRMT and MTHD in the same op on Turing+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
f5507fb69b nouveau/mme: Better handle the too many immedaties case on Turing+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
381be88473 nouveau/mme: Fix add64 of immediates on Fermi
Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:26 +00:00
Faith Ekstrand
f2655b10c7 nouveau/winsys: Fix an undefined shift
It was an integer shift twhich sometimes overflowed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:26 +00:00
Faith Ekstrand
742364cc42 nouveau/headers: Add more nv_push asserts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:26 +00:00
Friedrich Vock
bd525f4282 aco: Fix 1D->2D dispatch conversion on <gfx9
out_args->scratch_offset and in_wg_id_x will alias on <gfx9.
To avoid the conversion code reading a garbage WG ID, move the
scratch/ring offset writing to the very end.

Fixes: 1e354172 ("radv,aco: Convert 1D ray launches to 2D")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30707>
2024-08-17 17:01:10 +00:00
Rob Clark
563ec4754a nir/opt_loop: Don't peel initial break if loop ends in break
A loop that looks like:

   loop {
      do_work_1();
      if (cond) {
         break;
      } else {
      }
      do_work_2();
      break;
   }

We can't pull that break ahead of do_work_1() after hoisting the initial
do_work_1() out of the loop.  So bail in this case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11711
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30702>
2024-08-17 14:27:02 +00:00
Marek Olšák
665eae51ef amd: update addrlib
There are some changes in ac_surface.c to make this work.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30507>
2024-08-16 21:44:32 +00:00