Commit graph

183024 commits

Author SHA1 Message Date
Friedrich Vock
8135a7614d radv/rt: Remove nir_intrinsic_execute_callable instrs in monolithic mode
It's allowed to place OpExecuteCallableKHR in a SPIR-V, even if the RT
pipeline doesn't contain any callable shaders. Unreal hits this case and
crashes. We can assume the intrinsic never gets executed, so we can
simply remove it.

Cc: mesa-stable
(cherry picked from commit 0c02a7e8e8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:18:00 -08:00
Ian Romanick
fa6e9e6587 brw/emit: Fix typo in recently added ADD3 assertion
The current assertion fails as soon as a MAD with src0 and src2 being
immediate is detected.

The assertion was supposted to catch, "If it's ADD3, only one of src0
and src2 can be immediate." The detect this, the opcode test should have
been !=.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c1c09e3c4a ("brw/emit: Add correct 3-source instruction assertions for each platform")
(cherry picked from commit c52ce6157f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:17:59 -08:00
Ian Romanick
f05bcf460a brw/algebraic: Fix MUL constant folding
Some callers of brw_constant_fold_instruction depend on the result being
a MOV of immediate when progress is made. Previously `MUL dst:D src0:D
1:D` would be converted to `MOV dst:D src0:D`. There was also no
handling for `MUL dst:D imm0:D imm1:D`.

This could cause problems if one of the immedate values was -1. The
existing code would convert this to a `MOV dst:D imm0:D` and set the
negate flag on src0. That is not correct.

v2: Fix the is_negative_one case handling of the non-negative-one
source. Add a comment explaining the assertion. Both suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 2cc1575a31 ("brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic")
(cherry picked from commit 25de9dcd76)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:17:58 -08:00
Ian Romanick
21e9a5e373 brw/algebraic: Fix ADD constant folding
Some callers of brw_constant_fold_instruction depend on the result being
a MOV of immediate when progress is made. Previously `ADD dst:D src0:D
0:D` would be converted to `MOV dst:D src0:D`. There was also no
handling for `ADD dst:D imm0:D imm1:D`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 2cc1575a31 ("brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic")
(cherry picked from commit 086e83ccd9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:17:57 -08:00
Paulo Zanoni
f5eb332773 brw: don't read past the end of old_src buffer in resize_sources()
In this case, num_sources is bigger than this->sources, so if we loop
up to num_sources (instead of this->sources) we'll end up reading past
the end of old_src[]. Only copy up to what we originally had.

This was found by code inspection, I'm not aware of any applications
failing due to the lack of this patch.

Fixes: d9e737212d ("intel/brw: Add a src array for the common case in fs_inst")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
(cherry picked from commit d4a54d4f92)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:17:57 -08:00
Samuel Pitoiset
6a946ade04 spirv: add an options to lower SpvOpTerminateInvocation to OpKill
To workaround game bugs like Indiana Jones.

Original workaround found by Hans-Kristian.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 4d4418dbb3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:17:53 -08:00
Lionel Landwerlin
72c1e65d44 blorp: use 2D dimension for 1D tiled images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 31eeb72e45 ("blorp: Add support for blorp_copy via XY_BLOCK_COPY_BLT")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit e0b5179869)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-13 09:17:52 -08:00
Jordan Justen
85b5cd234b intel/dev: Add intel_check_hwconfig_items()
Rather than checking hwconfig items when using them, wait until after
devinfo has been fully initialized. This includes having workarounds
implemented.

We can then check if the hwconfig data and final Mesa initialization
agree. If the match fails, we need to investigate if Mesa or the
hwconfig data is wrong.

This code becomes a no-op when not on a release build.

Fixes: a4c5bfd34c ("intel/dev: Use hwconfig for urb min/max entry values")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12141
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 1027b071f9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:54:09 -08:00
Jordan Justen
4b47a5491c intel/dev: Don't process hwconfig table to apply items when not required
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 4eb10bc25e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:54:06 -08:00
Jordan Justen
720b64c8d9 intel/dev: Split apply and check paths for hwconfig
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 5a8107cef4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:53:57 -08:00
Jordan Justen
e3fc6715d7 intel/dev: Split hwconfig warning check into hwconfig_item_warning()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 832de579e1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:53:49 -08:00
Hans-Kristian Arntzen
7c16dfba50 radv: Add radv_invariant_geom=true for Indiana Jones.
Water puddles expect invariant position, but does not declare such in
the vertex shaders, leading to random glitches.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit e815d6523c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:46:00 -08:00
Samuel Pitoiset
cab3f06713 radv: fix disabling DCC for stores with drirc
Displayable DCC should also be disabled, otherwise it's asserting
somewhere in ac_surface.c

Fixes: e3d1f27b31 ("radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 4d1aa9a2d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:43:47 -08:00
Samuel Pitoiset
f565dcdf54 radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle
Likely a game bug but can't be 100% sure because the game uses RT by
default and renderdoc still doesn't have support for it.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit e3d1f27b31)

Conflicts:
	src/util/00-radv-defaults.conf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:43:43 -08:00
GKraats
34c6edb029 i915g: fix glClearColor using a 1 byte color format
Unscissored glClearColor is using i915_fill_blit().
Clearing can be done with the 1 byte formats
GL_ALPHA, GL_LUMINANCE or GL_INTENSITY.
Routine i915_fill_blit() is called with a rgba-mask containing
1 byte, but it is handling this as a 2-byte color.
This fix adds the needed 1 byte setup to both
i915_fill_blit() and i915_copy_blit().

It solves 1 piglit-test concerning arb_clear_texture-base-formats
and 15 tests concerning fbo-clear-formats.

No regression is shown at other piglit-tests.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
(cherry picked from commit bed66430ab)

Conflicts:
	src/gallium/drivers/i915/ci/i915-g33-fails.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:43:07 -08:00
Samuel Pitoiset
9a73b89f28 radv: fix initializing HTILE when the image has VRS rates
VRS rates should only be preserved for clears, otherwise the HTILE
buffer should be cleared completely.

This fixes some failures/flakes in CI.

Fixes: 8197d744f5 ("radv: Do not overwrite VRS rates when doing fast clears")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 8b755840fc)

Conflicts:
	src/amd/vulkan/meta/radv_meta_clear.c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:38:30 -08:00
Eric R. Smith
8f7b85e8cd panfrost: fix potential memory leak
In the very unlikely case that the packed AFBC image will not
save (enough) memory, we abort packing. In this case we should
free the BO associated with the metadata.

Fixes: 5a928f7563 ("panfrost: Add env variable for max AFBC packing ratio")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit f8bc6c8663)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:34:30 -08:00
Eric R. Smith
0f01543ac1 panfrost: fix read/write resource confusion in afbc_pack
We read the source rather than write it, due to a typo we were
not setting this correctly though.

Fixes: bc55d150a9 ("panfrost: Add support for AFBC packing")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit b59e73e426)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:34:30 -08:00
Friedrich Vock
ee78db8c14 aco/lower_to_hw_instr: Check the right instruction's opcode
instr is the branch instruction, its opcode won't ever be writelane. We
should check inst instead.

Found by inspection.

Cc: mesa-stable
(cherry picked from commit 845660f2b7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:44 -08:00
Lionel Landwerlin
8f7216d53b intel/decoder: fix COMPUTE_WALKER handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17096f87 ("intel: Switch to COMPUTE_WALKER_BODY")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 99bb2a087a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:44 -08:00
Job Noorman
d62312f836 ir3/isa: fix cat3-alt immed src
The override used for the immed encoding in #cat3-src-const-or-immed
used a pattern which isn't supported in overrides by isaspec. The
pattern in the base bitset (10) was too strict for immediates since it
didn't allow the most significant bit to be 1.

Fix this by making the base pattern 1 and adding an assert for the next
bit to be 0 in the non-immed case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1c6c200c0d ("ir3: add newly found shlg.b16 instruction")
(cherry picked from commit 943f666b69)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:43 -08:00
Georg Lehmann
e92e02a71f aco/ra: don't write to scc/ttmp with s_fmac
Fixes: 4bd229ac50 ("aco/gfx11.5: select SOP2 float instructions")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 65506e635b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:42 -08:00
Georg Lehmann
1a98685055 aco/ra: disallow s_cmpk with scc operand
Fixes: 2d6b0a4177 ("aco/optimizer: Optimize SOPC with literal to SOPK.")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 0b9e2a5427)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:42 -08:00
Georg Lehmann
2ba6a1f300 aco/ra: don't write to exec/ttmp with mulk/addk/cmovk
ttmp sgprs are readonly outside of trap handlers, so the instructions were
probably skipped. RA should also never create additional exec writes.

Fixes: e06773281b ("aco/ra: Optimize some SOP2 instructions with literal to SOPK.")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit fe0c72caec)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:41 -08:00
Hans-Kristian Arntzen
851f519db6 wsi/wayland: Add forward progress guarantee for present wait.
When a timestamped present is not used (MAILBOX or the very first present),
it's possible that the very last queued present ID won't complete in finite time.
Similar to frame callback based workaround, apply a timeout to present
waits when they target the very last submitted presentID.

Only apply the workaround when we're not guaranteed forward progress.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit c3becade15)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:40 -08:00
Hans-Kristian Arntzen
00c60bd69e wsi/wayland: Remove unused present_mode member.
We use chain->base.present_mode instead.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit d5509c147f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:39 -08:00
Hans-Kristian Arntzen
7bce0c8259 wsi/wayland: Handle FIFO -> MAILBOX transitions correctly
When transitioning from FIFO to MAILBOX with swapchain_maintenance1,
we must make sure that the first MAILBOX after FIFO observes the wait
barrier. This was done implicitly in the timestamp path, but not for
the non-commit-timing path.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 63cbbf2a1c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:38 -08:00
Hans-Kristian Arntzen
5feac905d0 wsi/wayland: Don't fallback to broken legacy throttling with FIFO
When commit-timing was not supported, but FIFO was we would end
up in a situation with throttling on FIFO barrier and legacy fence.
At that point, the entire point of FIFO falls flat.

There are some caveats with this approach, but it's not expected
that compositors will only support FIFO, and not commit-timing long
term.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 458842c3b5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:38 -08:00
Hans-Kristian Arntzen
17c7e04e8a wsi/wayland: Only use commit timing protocol alongside present time.
Comming timing is meaningless when we cannot receive timing feedback.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 4dde605924)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:37 -08:00
Dave Airlie
37d72c978f radv/video: set max slice counts to 1 for h264/5 encode
Right now the driver doesn't support multi-slice encodes, so
report the correct value.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Autumn Ashton
Cc: mesa-stable
(cherry picked from commit 699afb88ec)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:36 -08:00
Sil Vilerino
017bc0cc2b vl/vl_winsys: Add missing include for function declaration
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12150
Fixes: 2548471ca1 ("vl/vl_win32_screen_create_from_d3d12_device: Allow winsys to be injected")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
(cherry picked from commit ce1aad4505)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:35 -08:00
Georg Lehmann
17da2666c7 nir/uub: properly limit float support to 32bit
Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 0b366a7ab2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:34 -08:00
Job Noorman
0f1abde4cc ir3/isa: fix conflict between stib.b and stsc
stsc was using don't care bits in a position position that is
significant for stib.b.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 11b2c54a9a ("ir3/a7xx: Add STSC definition")
(cherry picked from commit 9052ad449b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:34 -08:00
Tapani Pälli
0d6238b6ab drirc/anv: force_vk_vendor=-1 for Marvel Rivals
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12280
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit 03c9f164e8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:33 -08:00
Karmjit Mahil
d8ba1e4143 util/idalloc: Fix util_idalloc_foreach() build issue
Currently `util_idalloc_foreach()` isn't being used in the codebase
but if used it causes a build error as `num_used` doesn't exist.
Fix that by using `num_set_elements`.

Fixes: 0589dfe4e2 ("util/idalloc: optimize foreach by tracking the greatest non-zero element")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit af346cd77f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:30 -08:00
Mi, Yanfeng
757f3fb51b anv:Fix memory grow calculation overflow issue
when old buffer size is large than 2G, 32bit cannot hold
2 times buffer size (>4G).

Fixes: 8d813a90d6 ("anv: fail pool allocation when over the maximal size")

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
(cherry picked from commit 0a5a04f509)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:59 -08:00
Paulo Zanoni
8b0a86d639 brw: don't forget the base when emitting SHADER_OPCODE_MOV_RELOC_IMM
The last argument seems to be used as brw_shader_reloc::delta (from
brw_add_reloc), and we're unconditionally setting it to 0 here, while
the other place where we handle nir_intrinsic_load_reloc_const_intel
seems to be setting the base appropriately.

I found this by inspection while debugging a bug related to this code,
so I'm not aware of any workloads that get improved by this patch.

Related patches:
 - ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
 - 99047451c9 ("intel/fs: add plumbing for embedded samplers")

Fixes: ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
(cherry picked from commit 0dc2a5808e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:55 -08:00
Hans-Kristian Arntzen
ee0d63011c wsi/x11: Do not use allocation callbacks on a thread.
This is banned by spec.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
(cherry picked from commit 81526187a8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:53 -08:00
José Roberto de Souza
7c44f03d7f intel/dev/xe: Fix size of eu_per_dss_mask
Real Xe KMD actually returns a uint64, so here changing from uint32
to uint64.

Fixes: 04bdbeec31 ("intel/dev/xe: Fix access to eu_per_dss_mask")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 2aae000edb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:48 -08:00
Peyton Lee
532157abbd frontends/va: function process_frame has return value
if the video post-processing is failed with some reason, the flow can
fall back to use shader/gfx to perform the processing.

Signed-off-by: Peyton Lee <peytolee@amd.com>
(cherry picked from commit 8ee52b5e23)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 08:59:03 +01:00
Rhys Perry
3cffcc3da7 aco: don't CSE p_shader_cycles_hi_lo_hi
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: fae2a85d57 ("aco/gfx12: implement subgroup shader clock")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12243
(cherry picked from commit ab26b99c2c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:04 -08:00
Georg Lehmann
f750108aa9 aco/gfx12: disable vinterp ddx/ddy optimization
This only seems to work on gfx11 and gfx11.5, and it's only faster on gfx11.5.

We could continue to use vinterp, with constants copied to vgprs, but
whether that's beneficial depends on the shader.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12250
(cherry picked from commit 7425e71ae0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:03 -08:00
José Roberto de Souza
10f599a8b3 intel/dev/xe: Fix access to eu_per_dss_mask
DRM_XE_TOPO_EU_PER_DSS and DRM_XE_TOPO_SIMD16_EU_PER_DSS can be any
number of bytes long but it was assuming it was always 4 bytes long.
That was not a issue because Xe KMD return 4 bytes even if only needs
1 or 2 bytes but that is a problem with our HW simulator that was
returning 2 bytes.

Fixes: a24d93aa89 ("intel/dev: Query and compute hardware topology for Xe")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 04bdbeec31)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:02 -08:00
Lionel Landwerlin
9319df3b07 anv: set pipeline flags correct for imported libs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3d49cdb71e ("anv: implement VK_EXT_graphics_pipeline_library")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 371b7a9b0d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:02 -08:00
Lionel Landwerlin
dc04f5ca28 anv: fix missing bindings valid dynamic state change check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ddd296cd3 ("anv: implement VK_EXT_vertex_input_dynamic_state")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 6e396b400a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:01 -08:00
Erik Faye-Lund
a72ba2fc47 panvk: free preload-shaders after compiling
These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 9f69f7a66d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:00 -08:00
Erik Faye-Lund
f7f217f093 vulkan/meta: plug a couple of memory leaks
We create NIR shaders here, and we need to free them when we're done with
them as well.

These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 514c10344e ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 43738a9a94)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:43:59 -08:00
Sagar Ghuge
77248fa11f anv: Enable MCS_CCS compression on Gfx12+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10971
(cherry picked from commit fef8490eb9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-05 19:08:59 +00:00
Samuel Pitoiset
69e950d853 radv: fix skipping on-disk shaders cache when not useful
This was just broken because individual shaders were still stored
on-disk in many situations:
- for shader object, all compute/graphics shaders were stored
- for fast-GPL, graphics shaders were stored
- for pipeline binaries, when the create flag was used
- for rt capture/replay and ray history

This should stop storing unused binaries on-disk and save space.

Found this by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32476>
2024-12-04 14:09:01 -08:00
Karol Herbst
1b79b681df rusticl/program: check if provided binary pointers are null
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
(cherry picked from commit 6fd6de46dc)
2024-12-04 09:54:34 -08:00