Commit Graph

195481 Commits

Author SHA1 Message Date
Timothy Arceri a235da080e glsl: add gl_nir_link_function_calls()
This will link functions combining multiple shaders from the same stage
into a single shader. Unlike alot of the glsl ir linker that has been
converted to NIR the logic here is completely different from the glsl ir
code that linked functions. The existing nir cloning code allows us to
implement this functionality in a much more eligant way than what glsl
ir was doing.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri 60937b5286 nir: add implicit_conversion_prohibited field to nir_parameter
Will be used in link time validation in following patches.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri 5645495156 nir: store variable mode in nir_parameter
This will be used by the nir glsl linker in following patches.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri 89a2411c54 nir: serialize nir_parameter type
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri 6ff3e87e5f nir: add function in/outs to variable modes
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri f3da074dc3 glsl: move _mesa_glsl_can_implicitly_convert() to linker_util.cpp
Makes more sense here as its used by both the compiler and linker.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri 1cb115abd2 nir: add nir_function_impl_clone_remap_globals()
This will be use by the glsl nir linker when we are combining
different shaders from the same shader stage that might have multiple
declarations of global variables across the different shaders.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri 7a1061e0dd nir: add max_ifc_array_access field to vars
This will be used in following patches by the nir based glsl
linker code.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri 6219275ffe util/hash_table: add _mesa_string_hash_table_create() helper
This adds a string version of the _mesa_pointer_hash_table_create()
helper allowing us to write tidy code.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri 7c5b21c032 glsl: add support for converting global instructions to NIR
NIR doesn't really support global instructions such as global val
initilisation. So here we add functionality to glsl_to_nir() to
put these instructions into a temporary function that will be
later inlined into main.

We give the function a name starting with gl_mesa_tmp_ as functions
starting with gl_ are reserved and will not have any clashes with
user functions, we finish the name with the blake3 of the shader
source to avoid conflicts with multiple shaders attached to a single
stage.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri 1fc9d5223e glsl: make gl_nir_validate_intrastage_arrays() more flexible
This will allow us to use it before shaders from the same stage have
been linked and merged.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri ffbd763586 glsl: add gl_nir_validate_intrastage_interface_blocks()
This is a nir version of the existing glsl ir validation function.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri 90e76d34ff mesa/glsl: add nir fields to the gl shader structs
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Samuel Pitoiset a9095f0dbf radv: do not keep executable info when compiling shaders for ESO
This is completely useless and it's wasting memory.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31345>
2024-09-25 08:33:31 +00:00
Samuel Pitoiset f7482e85ba radv: move updating compute scratch for RT when stack size is emitted
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31347>
2024-09-25 07:56:58 +00:00
Samuel Pitoiset ebe66dee08 radv: move emitting some RT user SGPRs when the RT pipeline is emitted
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31347>
2024-09-25 07:56:58 +00:00
Mike Blumenkrantz c4d6d9254a vk/image: fix view creation for planar video aspects
drivers do implement this

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31318>
2024-09-25 06:21:58 +00:00
Mike Blumenkrantz e0efab520e zink: add adl flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz 427014e4e3 zink: add some other missing X format emulation variants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz 66e3df6a2a zink: add X format variants for 30-bit formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz f96dc11e41 zink: fix zink_format_is_voidable_rgba_variant()
this should just match whatever X formats are emulated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz 42648508f7 zink: move x8 format function to zink_format.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:26 +00:00
Mike Blumenkrantz 735e402ae4 zink: implement compression control
this just passes the info through to struct creation and returns
previously queried info

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz 9696df4132 zink: store compression rate info for formats
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz 33c1b940e0 zink: hook up compression control extensions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz 33335fdd89 egl/kopper: hook up EGL_EXT_surface_compression on wayland
the driver hook isn't supported yet, so this does nothing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz f4aab9984b gallium: delete pipe_screen::is_compression_modifier
this is unused

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz 1cb1212823 trace: add get_device_reset_status
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31276>
2024-09-25 01:08:21 +00:00
Timothy Arceri c1b97415fa ci: disable gimark trace
gimark requires a mesa environment variable to be set to work around
a shader bug, disable it for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31353>
2024-09-25 09:25:52 +10:00
Valentine Burley ec59d56c52 ci: Add a new build-only job without libdrm
Add a new build job for Turnip/kgsl, to have coverage for building without libdrm.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31182>
2024-09-24 19:22:24 +00:00
Samuel Pitoiset 087ef34b9c aco: fix descriptor leaking when printing assembly with CLRX
This can explode the maximum number of descriptors.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31344>
2024-09-24 18:11:36 +00:00
Eric Engestrom 480793be98 ci/build: move debian-clang-release to priority build-for-tests stage
`shader-db` uses its output, and with its 8-10min runtime it can't be
ignored and should be counted with the other test jobs.

This makes the critical build jobs a bit slower but makes the overall
pipeline shorter when the test jobs respect the 15min deadline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31327>
2024-09-24 17:31:54 +00:00
Konstantin Seurer 25b09b9c5a radv: Fix report_ray_intersection affecting terminated rays
Fixes dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first.

cc: mesa-stable

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186>
2024-09-24 16:18:31 +00:00
Konstantin Seurer 466bbaf40f lavapipe: Do not return in report_ray_intersection
report_ray_intersection should not terminate invocations.

Fixes: d99e95e ("lavapipe: Implement VK_KHR_ray_tracing_pipeline")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186>
2024-09-24 16:18:31 +00:00
Konstantin Seurer 4824bcdd5d lavapipe: Fix report_ray_intersection affecting terminated rays
Fixes dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first.

Fixes: d99e95e ("lavapipe: Implement VK_KHR_ray_tracing_pipeline")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186>
2024-09-24 16:18:31 +00:00
Rhys Perry bf41cf2eef radv/rt: don't split array/struct payload variables
If the shader has multiple payload variables, split passes might not
preserve the order and this can cause the offsets used for the stores to
not match the payload offsets for nir_intrinsic_trace_ray.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31204>
2024-09-24 15:41:04 +00:00
Rhys Perry 204e446bcd radv/rt: align constant data by 64 when inlining shaders
There's never any need for anything higher. If this were too high (such
as NIR_ALIGN_MUL_MAX), it would have caused issues.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31204>
2024-09-24 15:41:04 +00:00
Sagar Ghuge 7e48cbb029 intel: uncached L1 to fix memory barrier issue in RT shader
In the RT shader, if there's a executeCallableEXT() in between,
even though the called shader does nothing, the instructions before and
after the executeCallableEXT() is not properly synced.

Patch fixes:
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.rgen
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.chit
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.miss
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.call

Thank to Kevin for finding out there is a load/store issue.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31201>
2024-09-24 14:33:11 +00:00
Nanley Chery 730e83b525 anv: Require compression for fast-clears on gfx20+
In commit 44351d67f8, I needed to change some variables in a check for
compression in anv_can_fast_clear_color_view(). Instead of doing that, I
dropped the check altogether because I thought the call to
anv_layout_to_fast_clear_type() which followed right afterwards would
return ANV_FAST_CLEAR_NONE if the aux usage was ISL_AUX_USAGE_NONE.

That turned out not to be the case, due to special-casing of Xe2+. For
now, make Xe2+ more like other platforms when it comes to enabling
fast-clears. If there comes a reason to actually fast-clear with
ISL_AUX_USAGE_NONE, we can revisit this.

Fixes: 44351d67f8 ("anv: Change params of anv_can_fast_clear_color_view")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11920
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31297>
2024-09-24 13:56:02 +00:00
Benjamin Otte d5f207311d pvr: Don't emit critical warning all the time
Instead of unconditionally emitting a warning to applications about
the missing environment variable to enable the driver, only check it
after determining that the device actually matches.

Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31293>
2024-09-24 13:26:46 +00:00
Sviatoslav Peleshko 78a664b584 anv: Update XeSS workaround executable names for Satisfactory 1.0
Fixes: 8b36d230 ("anv: workaround XeSS for Satisfactory")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11915
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31343>
2024-09-24 12:06:54 +00:00
Mike Blumenkrantz 04709e4f7d anv: fix video profile lists
these didn't include dmabuf layout or mutable formats despite both
being supported

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31317>
2024-09-24 11:38:48 +00:00
Hyunjun Ko a36b17d7a8 zink: walk the chain of resources for multi-planar formats.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31333>
2024-09-24 11:11:10 +00:00
Lionel Landwerlin f81dc17e7d anv: add missing pipeline instance multiplier
Fix zink/anv tests : dEQP-GLES3.functional.fbo.multiview.samples_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11911
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31341>
2024-09-24 10:36:17 +00:00
Rohan Garg 56adf42110 intel/brw: lower math op regions for Xe2+
This helps fix:
  - dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_3.tan_frag
  - dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_2.tan_frag

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31218>
2024-09-24 09:58:28 +00:00
Michel Dänzer dc7723f788 radeonsi: Revert to GLSL_SAMPLER_DIM_2D in si_create_fmask_expand_cs
Fixes piglit arb_shader_texture_image_samples-builtin-image hanging
Navi 14.

Fixes: 997c39c268 ("radeonsi: clean up and make corrections to si_create_fmask_expand_cs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31323>
2024-09-24 07:52:55 +00:00
Michel Dänzer d69c1ca1a0 Revert "radeonsi: remove CB sync after FMASK and DCC decompression"
This reverts commit 3527d9f81d.

It broke piglit glx@glx-visuals-depth/glx@glx-visuals-stencil on Navi
14.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31323>
2024-09-24 07:52:55 +00:00
Eric Engestrom 76c5c49fca radeonsi/ci: mark KHR-GL46.shader_image_load_store.basic-allTargets-atomic as fixed
Fixed by a commit in the range e1a53d41...1b4e1007

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31337>
2024-09-24 07:34:11 +00:00
Eric Engestrom bc6eae7d0a radeonsi/ci: document spec@egl_ext_surface_compression@create as crashing
Fixes: 213f5e9152 ("Uprev Piglit to e9ab30aeaed97b69868cf4d6d6a3f70f3b53c362")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31337>
2024-09-24 07:34:11 +00:00
David Rosca 712e49f137 radeonsi/vcn: Don't reuse context with multiple VCN instances
Kernel does VCN instance scheduling per context, so when we have
multiple instances we should use new context to be able to utilize
all of them.
Another issue is with AV1, VCN 3 and VCN 4 only support AV1 on
first instance. Kernel parses IBs and switches to first instance when
it detects AV1, but this only works for first submitted IB in context.
The CS would be rejected if we first decode/encode other codecs, kernel
schedules on second instance (default) and then we try to decode/encode AV1.

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31249>
2024-09-24 07:06:32 +00:00