Commit Graph

199998 Commits

Author SHA1 Message Date
Karol Herbst
3a9b1baa80 rusticl/kernel: take set kernel arguments into account for CL_KERNEL_LOCAL_MEM_SIZE
Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Karol Herbst
bd1a042046 rusticl/device: fix default device enumeration
There were a couple of issues this fixes:
 - Using the env "RUSTICL_DEVICE_TYPE" variable made no device be default.
 - If multiple GPUs were detected, multiple devices were default.
 - If zink was used, no default device was advertized either.

The spec requires that there must be one and only one default device.

Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Karol Herbst
ab640df1c2 rusticl/device: fix CL_DEVICE_HALF_FP_CONFIG query
Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Marek Olšák
d9dd485c02 radeonsi: re-enable non-TC-compatible HTILE for write-only Z/S
It caused the Blender corruption, but the previous commit likely fixes it.

The workaround regressed performance for Furmark and Plot3D with 8xMSAA.

If you want to enable the workaround again in the future, just add this
line back: sscreen->info.gfx_level >= GFX11 ||

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Marek Olšák
75a03d733a radeonsi: simplify and fix enable_tc_compatible_htile_next_clear logic
It looks like it was broken and might have been responsible
for the Blender corruption.

Just do a full decompression and change to TC-compatible HTILE after
that even if we don't end up doing fast clear here.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Marek Olšák
fa0bf725bc radeonsi: ignore PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY for TC-compatible HTILE
We enable it on demand anyway, which seems better than relying on a flag.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Martin Krastev
092ac5a384 svga/ci: enable vmware farm
Reinstate farm after DUT maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32898>
2025-01-06 22:46:02 +00:00
Alyssa Rosenzweig
09b5608607 glsl: fix glsl_get_word_size_align_bytes
this was copypasted from the wrong function. fixes on asahi

   KHR-Single-GL46.arrays_of_arrays_gl.SubroutineArgumentAliasing4_var_type_index_13

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32871>
2025-01-06 22:09:49 +00:00
Konstantin Seurer
38c4548290 lavapipe: Advertise vulkan 1.4
Only advertise 1.4 for LLVM_VERSION_MAJOR>=10 because some subgroup
operations were promoted.

Closes: #12241
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32489>
2025-01-06 20:30:34 +00:00
Marek Olšák
d09ba36f98 glsl: fix corruption due to blake3 hash not being set for nir_opt_undef
NIR is generated sooner, so we need to set it sooner.
This fixes Viewperf13/CATIA_car_04.

Fixes: cbfc225e2b - glsl: switch to a full nir based linker

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32876>
2025-01-06 19:50:51 +00:00
Marek Olšák
451d252ca2 glsl: remove unused code
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
49897f99d6 st/mesa: recompute IO bases for ARB_vp/fp
This is a prerequisite for generating lowered IO for ARB_vp/fp.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
da8f98d202 st/mesa: don't use nir_copy_var
so that we don't have to call nir_lower_var_copies.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
4fdeeca192 st/mesa: switch st_nir_make_clearcolor_shader to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
b1c63365fc st/mesa: switch PBO create_fs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
1c56dbdaaf st/mesa: switch st_pbo_create_vs and st_pbo_create_gs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
eeea99210f st/mesa: switch st_nir_make_passthrough_shader to IO intrinsics
also simplify it to only make VS because it's only used for VS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
ec68f0492b st/mesa: switch GL_SELECT shader to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
2807259a18 st/mesa: switch Z/S DrawPixels shaders to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
135c9fa7b6 st/mesa: unlower IO for internal shaders if needed
This will be required because all internal shaders will be converted
to IO intrinsics.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
7e39045733 st/mesa: switch ATI_fs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
40848ba97e st/mesa: use IO intrinsics in st_nir_lower_position_invariant
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
02b7396568 st/mesa: use IO intrinsics in st_nir_lower_fog
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
a408c0aa2b st/mesa: run DCE before st_unlower_io_to_vars
Some lowering passes can leave dead code behind, but dead IO intrinsics
are still counted as enabled IO, which breaks things.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
3f7911e7d3 st/mesa: fold st_translate_prog_to_nir into prog_to_nir
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
49f737bc14 mesa: remove unused PROGRAM_WRITE_ONLY
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
14956aa0f2 mesa: remove unused PROGRAM_SYSTEM_VALUE
ARB_vp/fp don't have system values.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
ee8916c414 nir: use IO intrinsics in nir_lower_drawpixels
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
0de28a9fd0 nir: use IO intrinsics in nir_lower_bitmap
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
a7ad1b302b nir: remove redundant option linker_ignore_precision
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
730c8d506f nir: flip the early exit condition in nir_lower_io_temporaries
no change in behavior other than skipping COMPUTE as well.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
7b55ee999d nir: don't set num_slots/src/dest_type/write_mask when they're set automatically
to those values

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
55a4a8a2a8 nir: set src_type and dest_type to float implicitly for IO build helpers
If you want to set it to int/uint, set .src_type or .dest_type. If you want
to set it to float, you don't need to set the type at all. It's implicitly
set to float.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
b9f9d001d7 nir: set nir_io_semantics::num_slots to at least 1 in build helpers
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
José Roberto de Souza
7ac9ac0f93 anv: Allow larger SLM sizes for task and mesh shader
It was hard-coded to 64k but Xe2 platforms and newer supports
larger SLM sizes.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32874>
2025-01-06 18:31:20 +00:00
Konstantin Seurer
378fd38e1d llvmpipe: Move max_anisotropy to static sampler state
Applications typically use one globak max_anisotropy value.
Moving it to static state should save a could of instructions.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
0797a14c52 llvmpipe: Remove unused AF code
The table and some other parameters are not used.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
350a0fe632 llvmpipe: Use a simpler and faster AF implementation
This is based on the example given by the Vulkan specification: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-texel-anisotropic-filtering

The basic idea is to compute the axis in which the uv coordinates
change the fastest in screen space (rho_y and rho_y). If rho_x is larger
than rho_y, samples are summed up along the x-Axis and the y-Axis
viceversa. The x/y offsets are mapped back into texture (u/v) space
using a linear approximation of u(x,y) and v(x,y).

This approach does not use a nested loop and the number of samples is
basically limited to max_anisotropy (+/-). The sample count of the
previous approach could explode in some situations, leading to
frametimes >1s.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
7279e47521 llvmpipe: Disable anisotropic filtering for explicit lod
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Icenowy Zheng
70fa598696 zink: do not set transform feedback bits when not available
Currently the list of buffer usage bits specified is hardcoded with
transform feedback bits, which leads to a validation layer error report
with ID VUID-VkBufferCreateInfo-None-09499 when EXT_transform_feedback
is not available.

Only set these bits when EXT_transform_feedback extension is really
available to suppress this error.

Cc: mesa-stable
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32386>
2025-01-06 15:19:46 +00:00
Pavel Ondračka
c179a7dde4 r300/ci: update CI expectations
One new rv410 flake and one new rv530 fail which I can't reproduce
locally. Also remove the vs-varying-array-mat3* flakes, those were
failing because we run out of varyings, however this should no longer be
an issue since nir_opt_varyings was enabled for everyone.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32897>
2025-01-06 13:26:56 +00:00
Kenneth Graunke
4ab04799ee brw: Delete assign_constant_locations and push_constant_loc[]
The push_constant_loc[] array is always an identity mapping these days,
so it's kind of pointless.  Just use the original uniform number and
skip the unnecessary "remap" step.  With that gone, and shrinking UBO
ranges gone, assign_constant_locations() is now empty and can be removed
as well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
93e186e1a4 brw: Delete pull constant lowering
Now that we never shrink ranges in the backend, we never lower push
constants to pull constants late in the backend either.  get_pull_loc
will never return true, and so all of brw_lower_constant_loads becomes
a noop.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
1ab4fe2dd6 brw: Don't shrink UBO push ranges in the backend
Back in the bad old days (vec4?) we had a bunch of smarts in the backend
to dead code eliminate unused vector components and re-pack regular
uniforms, so we really couldn't decide how much data we were pushing
until very late in the backend.  Nowadays we have none of that - we do
all of our elimination and packing in NIR.  anv shrinks ranges to deal
with Vulkan API push constants, and iris treats everything as a UBO and
as of the previous commit will also shrink appropriately.

So we don't need to do this anymore...which will let us simplify quite
a bit of code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
583ad35455 brw: Limit maximum push UBO ranges to 64 registers in the NIR pass.
anv already does this limiting, since it needs to handle non-UBO push
constants as well.  iris treats everything as a UBO, but doesn't have
a limiter and was relying on the backend to handle it.

Do this in the NIR pass so that we can eliminate the backend code.
It's not necessary for anv, but handling it here is simple and less
error prone for iris, which calls this in a number of places.  We know
we need to limit things to this much; anv can limit more if needed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Feng Jiang
96c8eb64f0 virgl: Ensure that PIPE_SHADER_CAP_MAX_CONST_BUFFERS is less than PIPE_MAX_CONSTANT_BUFFERS
The value of the PIPE_SHADER_CAP_MAX_CONST_BUFFERS parameter should be
less than PIPE_MAX_CONSTANT_BUFFERS, otherwise, it will lead to some
assert failures. For example:

    void
    cso_unbind_context(struct cso_context *cso)
    {
    ...
        int maxsam = scr->get_shader_param(scr, sh,
                                           PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
        int maxview = scr->get_shader_param(scr, sh,
                                            PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS);
        int maxssbo = scr->get_shader_param(scr, sh,
                                            PIPE_SHADER_CAP_MAX_SHADER_BUFFERS);
        int maxcb = scr->get_shader_param(scr, sh,
                                          PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
        int maximg = scr->get_shader_param(scr, sh,
                                          PIPE_SHADER_CAP_MAX_SHADER_IMAGES);
        assert(maxsam <= PIPE_MAX_SAMPLERS);
        assert(maxview <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
        assert(maxssbo <= PIPE_MAX_SHADER_BUFFERS);
        assert(maxcb <= PIPE_MAX_CONSTANT_BUFFERS); // Crash here
        assert(maximg <= PIPE_MAX_SHADER_IMAGES);
    ...
    }

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32889>
2025-01-06 12:18:20 +00:00
Martin Roukala (né Peres)
f1a6af133a radeonsi/ci: run a fraction of glcts-vangogh in pre-merge
Now that ACO has become the default on pre-RDNA GPUs, all pre-merge CI
coverage of radeonsi+LLVM has disapeared. Let's fix this by making
our post-merge glcts-vangogh-valve job run inpre-merge pipelines.

However, we are limited in vangogh capacity, so rather than running the
full glcts/piglit test suites we run a fraction of it to stay under 15
minutes of execution time on a single Steam Deck.

Suggested-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:22 +00:00
Martin Roukala (né Peres)
0c538f82bc radeonsi/ci: run on ACO changes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:22 +00:00
Martin Roukala (né Peres)
bec7f09e76 radeonsi/ci: update the vangogh expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:21 +00:00
Tapani Pälli
b1b1a4ef91 iris: initialize whole pipe_box struct for memcmp
Z and depth fields were given to memcmp uninitialized.

CID: 1637431
Fixes: 1fc82ee558 ("iris: Add support for damage region")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32857>
2025-01-06 09:18:52 +00:00