763 Commits

Author SHA1 Message Date
Iván Briano
4cef5b5a4e anv: free shaders on rt pipeline compile error
We have not yet added the shaders to the pipeline->shaders array at
this point. If we couldn't compile (or were asked not to) the
pipeline, we were leaking references to any shaders found in the cache.
This would manifest as an assert on device destruction:
vk_pipeline_cache_destroy: Assertion `cache->object_cache->entries == 0' failed.

Fixes: 58c9f817cb ("anv: fix pipeline executable properties with graphics libraries")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31298>
(cherry picked from commit 1a45c8827b)
2024-09-24 19:13:42 +02:00
Benjamin Otte
7458491d43 nvk: Don't emit critical messages during init
vk_error() is used for application errors with
VK_DEBUG_REPORT_ERROR_BIT_EXT.

Don't emit those for old hardware or old kernels.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/7020

Fixes: 4db1bd5846 ("nvk/nvkmd: Implement dev and pdev for nouveau")
Signed-off-by: Benjamin Otte <otte@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31289>
(cherry picked from commit 9f612155fc)
2024-09-24 19:13:39 +02:00
Boris Brezillon
fbc5675199 pan/va: Fix nir_op_pack_uvec4_to_uint
We don't have a generic v4i8 on Valhall, we have to lower it to two
v2i8. Fortunately, bi_make_vec_to() hides the Bifrost/Valhall
differences, so use that for nir_op_pack_uvec4_to_uint.

Fixes: 934b0f1add ("pan/bi: Respect swizzles for more vector ops")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31280>
(cherry picked from commit dc1a7b94a8)
2024-09-24 19:13:37 +02:00
Lionel Landwerlin
951ffef8ab brw: disable null_rt only if color output does not affect other outputs
We found out that some HW changes on Xe2 make the HW avoid reading the
blend state if we're using the null_rt bit in the extended descriptor.

Since the alpha_to_coverage bit resides in the blend state, that state
is ignored and writes are going through to the depth/stencil buffers.

Disable null_rt in the color outputs if the color outputs can affect
other outputs (through alpha_to_coverage & omask).

Fixes tests in this pattern on Xe2 :

dEQP-VK.pipeline.*.multisample.alpha_to_coverage_no_color_attachment.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
(cherry picked from commit 35ea8b6cd2)
2024-09-24 19:13:34 +02:00
Lionel Landwerlin
3db0f836fd brw: move null_rt control up a layer
We'll want to tune this setting based on other parameters.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
(cherry picked from commit b45ce7d43e)
2024-09-24 19:05:35 +02:00
Lionel Landwerlin
4bdf370f35 iris: ensure null render target for specific cases
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
(cherry picked from commit 9b42215e0d)
2024-09-24 18:54:44 +02:00
Lionel Landwerlin
1ae3523617 anv: Only flush render target cache when detecting RT changes
We setup an empty render target when there are no color attachments,
which effectively makes it a different surface state. In most cases
the compiler will insert a null-rt bit in the extended descriptor
which means the RT isn't even accessed. But in some cases like
alpha-to-coverage output + depth/stencil write, we will access the
render target because using the null-rt will prevent alpha-to-coverage
from happening.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2bd304bc8f ("anv: Skip the RT flush when doing depth-only rendering.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
(cherry picked from commit badb3f6301)
2024-09-24 18:54:43 +02:00
Lionel Landwerlin
0d6701369a anv: fix missing tracking for alpha-to-coverage runtime changes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9926aedc96 ("anv: enable EDS3 AlphaToCoverageEnable & RasterizationSamples")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
(cherry picked from commit fb3ae17d96)
2024-09-24 18:54:41 +02:00
Eric Engestrom
24d8715179 .pick_status.json: Update to bf41cf2eef 2024-09-24 18:54:34 +02:00
Lionel Landwerlin
db3da0d302 clc: find opencl headers from the installed llvm/clang location
A number of people report the headers not being found when running
intel-clc. I've run into the same issue but only on the most recent
Ubuntu version.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30711>
(cherry picked from commit 0f6fa4679d)
2024-09-23 17:44:16 +02:00
Patrick Lerda
5daed0f454 i915: fix vertex atan regression
This is a regression happening with the commit 87b99d5797 ("nir: use copysign for atan").
Indeed, the opcode "copysign" was generating an incompatible i915 sequence.

For instance, this issue is triggered with
"deqp-gles2 --deqp-case=dEQP-GLES2.functional.shaders.operator.angle_and_trigonometry.atan2.highp_float_vertex":
deqp-gles2: ../src/compiler/nir/nir_lower_int_to_float.c:239: lower_alu_instr: Assertion `nir_alu_type_get_base_type(info->output_type) != nir_type_int && nir_alu_type_get_base_type(info->output_type) != nir_type_uint' failed.

Fixes: c4cec84231 ("nir/i915g/r300/nv30: skip marking varyings as flat in some drivers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31315>
(cherry picked from commit 6e994fdb6e)
2024-09-23 17:44:09 +02:00
José Roberto de Souza
31d25801b2 anv: Fix condition to clear query pool with blorp
The comment above says it all, only when queue is not protected that
it is possible to clear query pool with blorp but it was checking
the opposite.

Fixes: d5b0526507 ("anv: propagate protected information for blorp operations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31239>
(cherry picked from commit 89c6fa1883)
2024-09-23 17:43:13 +02:00
José Roberto de Souza
2ba449a76c anv: Check if vkCreateQueryPool() is being created in a supported queue
Turns out not even VK CTS was calling
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR()
to check if queue supports query.
So here adding a explicity check in our implementation of
vkCreateQueryPool().

https://github.com/KhronosGroup/VK-GL-CTS/pull/482

Cc: 24.2 <mesa-stable>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30652>
(cherry picked from commit dec5a624e9)
2024-09-23 17:43:11 +02:00
José Roberto de Souza
0eaba0ef77 anv: Make sure all previous vm binds are done before execute perf query pool
The query pool batch buffer or other bos could not be bound when
exec starts.

Cc: 24.2 <mesa-stable>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30652>
(cherry picked from commit 141e7eaca7)
2024-09-23 17:43:10 +02:00
José Roberto de Souza
5e06c9d249 anv: Add warning about mismatch between query queues
Cc: 24.2 <mesa-stable>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30652>
(cherry picked from commit 0a19d92ca5)
2024-09-23 17:42:26 +02:00
José Roberto de Souza
706c8a9b45 anv: Fix context id or exec queue used to open perf stream
It was always using device->context_id what is not valid in i915 when
has_vm_control is true or when running with Xe KMD.

But anv_AcquireProfilingLockKHR() don't have the queue information so
at least for now we will only support queries in a single queue.

And for consistency doing the same in
anv_QueueSetPerformanceConfigurationINTEL() although here we have the
queue parameter but queries are only supported in render engine
so it would only expose other queues if user set some parameters.

Cc: 24.2 <mesa-stable>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30652>
(cherry picked from commit c5d79d533a)
2024-09-23 17:34:33 +02:00
Patrick Lerda
2df813acb9 iris: fix iris_ensure_indirect_generation_shader() memory leak
This change ensures that all these allocations are using
the same memory context.

For instance, this issue is triggered with:
"piglit/bin/arb_shader_image_load_store-host-mem-barrier -auto -fbo":
Indirect leak of 32816 byte(s) in 1 object(s) allocated from:
    #0 0x7f49a35447ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f49998e4b4f in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f49998e7521 in create_slab ../src/util/ralloc.c:801
    #3 0x7f49998e7521 in gc_alloc_size ../src/util/ralloc.c:840
    #4 0x7f49998e7d11 in gc_zalloc_size ../src/util/ralloc.c:868
    #5 0x7f49999a6126 in nir_alu_instr_create ../src/compiler/nir/nir.c:682
    #6 0x7f49999cba48 in clone_alu ../src/compiler/nir/nir_clone.c:217
    #7 0x7f49999cc85a in clone_instr ../src/compiler/nir/nir_clone.c:456
    #8 0x7f49999cee3a in clone_block ../src/compiler/nir/nir_clone.c:529
    #9 0x7f49999cee3a in clone_cf_list ../src/compiler/nir/nir_clone.c:583
    #10 0x7f49999d03be in clone_function_impl ../src/compiler/nir/nir_clone.c:660
    #11 0x7f49999d13f7 in nir_function_impl_clone ../src/compiler/nir/nir_clone.c:678
    #12 0x7f4999a0e2c5 in lower_call_function_impl ../src/compiler/nir/nir_functions.c:397
    #13 0x7f4999a0e2c5 in function_link_pass ../src/compiler/nir/nir_functions.c:430
    #14 0x7f4999a0e2c5 in function_link_pass ../src/compiler/nir/nir_functions.c:408
    #15 0x7f4999a0e2c5 in nir_function_instructions_pass ../src/compiler/nir/nir_builder.h:108
    #16 0x7f4999a0e2c5 in nir_link_shader_functions ../src/compiler/nir/nir_functions.c:452
    #17 0x7f499ca30b8f in link_libintel_shaders ../src/gallium/drivers/iris/iris_program_cache.c:329
    #18 0x7f499ca30b8f in iris_ensure_indirect_generation_shader ../src/gallium/drivers/iris/iris_program_cache.c:374
    #19 0x7f499d185267 in gfx9_emit_indirect_generate ../src/gallium/drivers/iris/iris_indirect_gen.c:593
    #20 0x7f499d119c79 in iris_upload_indirect_shader_render_state ../src/gallium/drivers/iris/iris_state.c:8744
    #21 0x7f499fe86b01 in iris_indirect_draw_vbo ../src/gallium/drivers/iris/iris_draw.c:233
    #22 0x7f499fe86b01 in iris_draw_vbo ../src/gallium/drivers/iris/iris_draw.c:343
    #23 0x7f499a174e43 in tc_call_draw_indirect ../src/gallium/auxiliary/util/u_threaded_context.c:3828
    #24 0x7f499a1557fe in batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:453
    #25 0x7f499a1557fe in tc_batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:504
    #26 0x7f499a167f26 in _tc_sync ../src/gallium/auxiliary/util/u_threaded_context.c:761
    #27 0x7f499a168888 in tc_texture_map ../src/gallium/auxiliary/util/u_threaded_context.c:2783
    #28 0x7f49986f2631 in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:556
    #29 0x7f49986f2631 in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
    #30 0x7f49991af7ca in readpixels_memcpy ../src/mesa/main/readpix.c:260
    #31 0x7f49991af7ca in _mesa_readpixels ../src/mesa/main/readpix.c:898
    #32 0x7f499931ee23 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:575
    #33 0x7f49991b40b5 in read_pixels ../src/mesa/main/readpix.c:1199
    #34 0x7f49991b40b5 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
    #35 0x7f49991b4a20 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231
...
SUMMARY: AddressSanitizer: 323648 byte(s) leaked in 201 allocation(s).

Fixes: 5438b19104 ("iris: enable generated indirect draws")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31313>
(cherry picked from commit b6b363c478)
2024-09-23 17:24:25 +02:00
Samuel Pitoiset
81b1e8356c radv: fix assigning mesh shader outputs when clip/cull distances are read in FS
The per-primitive output offsets need to be recomputed.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31224>
(cherry picked from commit 5c897d00ef)
2024-09-23 17:24:25 +02:00
Lucas Fryzek
3799f13b32 egl/dri/wl: Move swrast damage region from put to swap
Pass application provided damage region to the compositor instead
of damaging the entire display. This also gives us the possibility
in the future to have put image only copy the parts of the framebuffer
that were modified.

Fixes: fa465e34ca
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31210>
(cherry picked from commit 32af15384d)
2024-09-23 17:24:25 +02:00
Lucas Fryzek
36fb8e658a drisw: Copy entire buffer ignoring damage regions
swapping buffers with damage is supposed to swap the entire buffer
and only pass the damage region as a hint to compositor as to what
updated. This change forces drisw to copy the entire buffer as there
is no method right now to check what was updated.

Fixes: cda627eb48
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31210>
(cherry picked from commit 755e795e4c)
2024-09-23 17:24:25 +02:00
Konstantin Seurer
d19704bf7c radv: Initialize sqtt state before meta state
Sqtt needs to be initialized before BVH build pipelines are compiled to
avoid crashes on startup.

Fixes: 5fa22f9 ("radv: regroup all tools initialization in one helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31207>
(cherry picked from commit 60c53f5e63)
2024-09-23 17:24:25 +02:00
Lionel Landwerlin
9c20fdda31 brw: fix virtual register splitting to not go below physical register size
Otherwise we can end up generating invalid assembly not following
destination/source alignments requirements.

Fixes the following tests:

dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_4.tan_frag
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_2.tan_frag
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_1.tan_frag
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_3.tan_frag

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31206>
(cherry picked from commit ed64eccab0)
2024-09-23 17:24:25 +02:00
Eric Engestrom
809659266d .pick_status.json: Mark 4b51a2c9da as denominated 2024-09-23 17:24:25 +02:00
Eric Engestrom
2f14dd8654 .pick_status.json: Update to 00c94e0cd4 2024-09-23 17:02:33 +02:00
Samuel Pitoiset
b9fd84e942 radv: fix lowering VS inputs when offset >= stride on GFX6-7
This was supposed to be >=.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31209>
(cherry picked from commit ad3e6bb06a)
2024-09-18 10:28:07 +02:00
Samuel Pitoiset
0a9bd16602 radv,aco: fix legacy vertex attributes when offset >= stride on GFX6-7
The indexing needs to be adjusted and the best solution seems to
use soffset instead of const_offset, it's simpler and generate less
prologs than passing the vertex binding strides to the prolog.

Fixes dEQP-VK.pipeline.*.vertex_input.legacy_vertex_attributes.*stride_1*.

Fixes: 38cbc3c605 ("radv: advertise VK_EXT_legacy_vertex_attributes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31209>
(cherry picked from commit 15b1790a1e)
2024-09-18 10:25:53 +02:00
Georg Lehmann
f35ed83b82 nir/instr_set: fix fp_fast_math
We can't just ignore the flags of the match, we need the union.

Fixes: 666647acae ("nir: track some float controls bits per instruction")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31195>
(cherry picked from commit a3d6a770c0)
2024-09-18 10:25:52 +02:00
David Rosca
cb29f5e0a7 radeonsi: Disable EFC on VCN 2.2
VCN 2.2 doesn't support EFC.

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31198>
(cherry picked from commit 009017c33c)
2024-09-18 10:25:50 +02:00
Eric Engestrom
318f75ef7f .pick_status.json: Update to ad3e6bb06a 2024-09-18 10:25:47 +02:00
Lionel Landwerlin
0722d2a0ae brw: fix vecN rebuilds
When loading a 64bit address from the push constants, we'll load a
vec2, so we need to allocate 2 GRFs and MOV each component.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11831
Fixes: 339630ab05 ("brw: enable A64 loads source rematerialization")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31010>
(cherry picked from commit 45377dc5c4)
2024-09-17 17:13:38 +02:00
Lionel Landwerlin
00c6a487d5 brw: use a builder of the size of the physical register for uniforms
Should avoid any partial write non-sense on Xe2+.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 339630ab05 ("brw: enable A64 loads source rematerialization")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31010>
(cherry picked from commit c16b27f66f)
2024-09-17 17:13:37 +02:00
Tapani Pälli
a0da2bc120 iris: fix issues with memory object updates via glBufferSubData
Disable aysnc mapping in case we are updating a external memobj.

Fixes following Piglit tests:
   spec@ext_external_objects@vk-pix-buf-update-errors
   spec@ext_external_objects@vk-vert-buf-update-errors

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29303>
(cherry picked from commit 0e02de5a50)
2024-09-17 17:13:37 +02:00
Samuel Pitoiset
2e32cdaf65 radv: fix lowering the view index to an input varying for FS
When multiview is used and the FS is compiled separately with GPL, the
view index still needs to be lowered, otherwise it's crashing later.

The lowering doesn't need to know the previous stage because ViewIndex
is a global thing (ie. it's neither a per-vertex or a per-primitive
varying).

This fixes recent
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.view_index_from_device_index_*_pre_rasterization

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31192>
(cherry picked from commit 656d7e887a)
2024-09-17 17:13:36 +02:00
Eric Engestrom
4440f16c6e .pick_status.json: Update to 45377dc5c4 2024-09-17 17:13:35 +02:00
Samuel Pitoiset
cab8b6df28 radv/rt: skip shaders cache for pipelines created with the capture/replay flag
Otherwise, if a pipeline is found in cache it will use a different
shader arena for allocation and the capture replay shader group handles
won't match.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31188>
(cherry picked from commit f88cf56087)
2024-09-17 17:12:18 +02:00
Rohan Garg
54630d224c intel/compiler: use the correct cache enum for loads and stores
Fixes: 74efde7 ('intel/brw/xehp+: Drop redundant arguments of lsc_msg_desc*()')

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30742>
(cherry picked from commit daea7e1651)
2024-09-16 20:52:34 +02:00
David Heidelberg
e961135ed7 ci/freedreno: move disabled a530 entries back to main gitlab-ci.yml
Fixes: 9442571664 ("ci: separate hiden jobs to -inc.yml files")
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31177>
(cherry picked from commit 52c014a453)
2024-09-16 20:52:05 +02:00
llyyr
c489fe8d1d vulkan/wsi/wayland: fix suboptimal flag being ignored with explicit sync
Signed-off-by: llyyr <llyyr.public@gmail.com>
Fixes: 5f7a5a27ef ("wsi: Implement linux-drm-syncobj-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31122>
(cherry picked from commit 5450306a36)
2024-09-16 20:51:56 +02:00
Dylan Baker
7e5192cbea anv: if queue is NULL in vm_bind return early
In the error handling path we end up creating a vk_sync and then later
we vk_sync_wait() on it. If that wait fails somehow we'll end up calling
vk_queue_set_lost(&queue->vk, ...) which would segfault if queue is
NULL.

If we end up in this situation (no queue), return directly whatever the
backend's vm_bind function returned, propagating the error up if
necessary.

Fixes: dd5362c78a ("anv/xe: try harder when the vm_bind ioctl fails")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31048>
(cherry picked from commit ed8d1d3c9b)
2024-09-16 20:51:46 +02:00
Dylan Baker
486539be66 iris: Run checks that do not require resources before creating them
This avoids the need to free the resource if we decide to return early.

Fixes: c8df09ebd4 ("iris: More gracefully fail in resource_from_user_memory")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30306>
(cherry picked from commit 0422eed255)
2024-09-16 20:44:43 +02:00
Lucas Stach
4cb4dc1b88 etnaviv: emit all PA shader attributes
While the rnndb fix increased the size of the driver internal
structures to be able to hold all data for the currently supported
number of varyings, it didn't change the state emission, so only
a subset of the PA shader attribute states was emitted.

Use the define from rnndb to avoid such inconsistencies.

Fixes: 11ffb20b70 ("etnaviv: Update headers from rnndb")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31032>
(cherry picked from commit a71003b1b8)
2024-09-16 20:44:42 +02:00
Konstantin Seurer
b73ffb6bfe radv: Work around broken terrain in Warhammer III
Hiding storage support for depth formats forces the game to take a
different, working path for terrain height map initialization.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31152>
(cherry picked from commit bacf9752f4)
2024-09-16 20:44:41 +02:00
Rhys Perry
7f69a4901c nir/opt_loop: skip peeling if the loop ends with any kind of jump
Any kind of jump prevents us from moving it to the top of the loop, not
just breaks.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
(cherry picked from commit 64ac601049)
2024-09-16 20:44:40 +02:00
Rhys Perry
1e0d723ccd nir/opt_loop: skip peeling if the break is non-trivial
If this nir_if contains continues or other breaks, we can't move it
outside the loop.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
(cherry picked from commit af3b099e0a)
2024-09-16 20:44:39 +02:00
Rhys Perry
618c4c127d nir/opt_if: fix fighting between split_alu_of_phi and peel_initial_break
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11822
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
(cherry picked from commit 4f44a944bb)
2024-09-16 20:44:38 +02:00
Georg Lehmann
be004d4797 nir/opt_sink: do not sink inverse_ballot out of loops
Inverse_ballot result is undefined if the input is not dynamically uniform.
And sinking out of loops might make the input divergent.

Fixes: 18a0ff137f ("nir: sink/move inverse_ballot like moves")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30906>
(cherry picked from commit 91f8e32a85)
2024-09-16 20:44:37 +02:00
Georg Lehmann
ce70d51e83 nir/opt_sink: do not sink load_ubo_vec4 out of loops
Same reason as for load_ubo.

Fixes: d199d65c3a ("nir/nir_opt_move,sink: Include load_ubo_vec4 as a load_ubo instr.")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30906>
(cherry picked from commit 1ec3cc2aed)
2024-09-16 20:44:36 +02:00
Kenneth Graunke
099de7a954 intel/brw: Use NUM_BRW_OPCODES in can_omit_write() check
The intention here is to detect ALU hardware instructions, but not
virtual instructions that haven't been explicitly whitelisted.

For some reason we had arbitrarily hardcoded 128 here, but our virtual
opcodes don't start at 128.  They start at NUM_BRW_OPCODES.  So, use
that instead.

This prevents regressions later when we delete some opcodes, shifting
some virtual opcodes into the 72-128 range.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30828>
(cherry picked from commit ab0b9b6792)
2024-09-16 20:44:35 +02:00
Dave Airlie
4a8d3debcc radv/video/enc: report pps overrides in feedback for h265
radv does change h265 usually so report in feedback info.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
(cherry picked from commit 7c6e3c70b6)
2024-09-16 20:44:33 +02:00
Dave Airlie
cb191d1b52 radv/video: fix encode reference slot counting
This needs the max of slot indices.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
(cherry picked from commit 8d08e92199)
2024-09-16 20:44:32 +02:00