Commit graph

185748 commits

Author SHA1 Message Date
Timothy Arceri
39052dabf9 glsl: don't inline functions in glsl ir
Everthing is now in place for nir and glsl to nir to handle this
stuff for us.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:21 +11:00
Timothy Arceri
c6c150b4cd glsl_to_nir: support conversion of opaque function params
Here we can assume anything that is not an input is bindless.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:21 +11:00
Timothy Arceri
de7574f70a glsl_to_nir: support conversion of struct/array function returns
This adds support for array and struct function returns in the glsl
to nir pass allowing us to avoid extra calls to the glsl IR
optimisation loop.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:20 +11:00
Timothy Arceri
fac9b1c594 glsl_to_nir: support conversion of struct/array function params
This adds support for array and struct function params in the glsl
to nir pass allowing us to avoid extra calls to the glsl IR
optimisation loop.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:20 +11:00
Timothy Arceri
7afce96b80 glsl_to_nir: merge function param handling
Here we remove the special handling for input params that was hard
to work with and unite it with the output and inout params.

Here a mediump test needs to be updated to what is a more expected
outcome anyway.

We also need to update the code that inserts software f64 to the
new way input params are handled.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:20 +11:00
Eric Engestrom
5a852bd24c radeonsi/ci: add vangogh piglit flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27941>
2024-03-03 20:34:59 +00:00
Eric Engestrom
176f9b2fbe r300/ci: add flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27940>
2024-03-03 19:45:25 +00:00
Eric Engestrom
7ba43413b9 zink+anv: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27937>
2024-03-02 20:57:11 +00:00
Eric Engestrom
59cccade3a freedreno/ci: add another a618 flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27935>
2024-03-02 15:48:15 +00:00
Eric Engestrom
f703aac4ee rpi3/ci: update expectations for vc4-rpi3-gl-piglit-full:arm32 2/4
This job very often hangs (hence why it's split into 4), but it managed
to finish once and failed because this test is now skipped instead of
failing:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/55772960

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27934>
2024-03-02 15:24:22 +00:00
Eric Engestrom
7016538cf0 panfrost/ci: skip dEQP-GLES31.functional.copy_image.non_compressed.* on t760 as they hang
e.g. https://gitlab.freedesktop.org/mesa/mesa/-/jobs/55771063

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27933>
2024-03-02 13:33:08 +00:00
Eric Engestrom
e5bbf4975f iris/ci: add pbuffer flakes for amly, same as apl and glk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27932>
2024-03-02 13:08:24 +00:00
Eric Engestrom
3328e9cf0f r300/ci: add another tex-miplevel-selection flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27930>
2024-03-02 12:44:07 +00:00
Eric Engestrom
4be5cb2ccb r300/ci: group tex-miplevel-selection flakes together
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27930>
2024-03-02 12:43:50 +00:00
Kenneth Graunke
63d2aa4eb6 intel/brw: Mark FIND[_LAST]_LIVE_CHANNEL as not writing the flag
brw_lower_find_live_channel doesn't actually write a flag register,
but elk_find_live_channel notes that the flag was used on Gfx7.

This allows more CSE on FIND[_LAST]_LIVE_CHANNEL.

shader-db and fossil-db on Alchemist show minor reductions in cycles
and instruction count, a few minor increases, but it doesn't seem to
be a large effect in either direction.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27862>
2024-03-01 17:18:30 -08:00
Anton Bambura
2ece531e33 docs/panfrost: Document Mali-T600 support
Signed-off-by: Anton Bambura <jenneron@postmarketos.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27519>
2024-03-01 23:26:57 +00:00
Anton Bambura
0129b3ff79 panfrost: Enable Mali-T600
It works since !27515

Signed-off-by: Anton Bambura <jenneron@postmarketos.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27519>
2024-03-01 23:26:57 +00:00
Caio Oliveira
337641cfcc intel/compiler: Fix SIMD lowering when instruction needs a larger SIMD
When lower_simd_width() encounters an instruction that needs a larger
SIMD, for example SHADER_OPCODE_TXS_LOGICAL in Gfx4 needs at least
SIMD16.  In this case the builder needs to be at least as large as
max_width, otherwise the group() setup will assert.

Turns out this did not assert before "by accident", since it was
relying on the default fs_visitor builder that had a dispatch width of 64,
a bogus placeholder value, expected not to be used.

However, when we changed the code to remove that builder (and the bogus
value), we created a new builder in the pass shader dispatch_width --
which work fine except in the case where we want to "lower" the SIMD above
the shader dispatch width.  The fix is to also consider the already
calculated max_width when creating the builder.

Fixes: 5b8ec015f2 ("intel/compiler: Don't use fs_visitor::bld in remaining places")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10338
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27782>
2024-03-01 22:54:57 +00:00
Kenneth Graunke
ad37622a8f intel/brw: Delete legacy texture opcodes
We first generate the logical opcodes, and these days fully lower to
SHADER_OPCODE_SEND.  In the past, we lowered to a non-logical variant
and handled that in the generator.  These days, we were just using the
non-logical opcodes as an awkward intermediate opcode change during
the lowering...which isn't really necessary at all.

This patch eliminates them by using the original logical opcodes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:51 +00:00
Kenneth Graunke
19248f48eb intel/brw: Allow CSE on TXF_CMS_W_GFX12_LOGICAL
This was missed when adding the new XeHP variant of the opcode.

Fixes: 261dd6c8 ("intel/compiler: Add new variant for TXF_CMS_W")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:51 +00:00
Kenneth Graunke
45a5e4c0c4 intel/brw: Delete SHADER_OPCODE_TXF_UMS
Nothing seems to generate this anymore.  I guess we always use CMS.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:51 +00:00
Kenneth Graunke
601ef12467 intel/brw: Delete SHADER_OPCODE_TXF_CMS[_LOGICAL]
We always use the wide variant (_W) on hardware this compiler supports.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:50 +00:00
Kenneth Graunke
494eee1337 intel/brw: Change unit tests to use TEX_LOGICAL instead of TEX
We're not really doing any fancy texturing here, just emitting a TEX
instruction that writes multiple destination registers.  I plan to
remove the non-logical TEX instruction in the next commit, so we swap
these over to use the logical version instead.  It should work just as
well for the purposes of the test.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:50 +00:00
Roland Scheidegger
e03e593143 auxiliary/rtasm: fix unaligned stores
Unaliged stores are unspecified behavior according to C rules, hence
address sanitizers may complain. Even though this worked fine in
practice (it's almost impossible here for the compiler to do something
"wrong" even if it assumes the store is aligned, given such stores work
just fine on x86), we should follow the rules.
The widely accepted solution for this (it may be somewhat surprising
you can't actually do unaligned assignments explicitly somehow in C)
nowadays is to just use memcpy(). The compiler should figure out (at
least with optimizations enabled) it's just a trivial store and
optimize it back to a single cpu instruction, while still satisfying
asan. (I've verified that even in debug builds the memcpy() is actually
optimized away anyway, I suspect there's some compiler flags somewhere
forcing this behavior.)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10208

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27896>
2024-03-01 21:44:52 +00:00
Friedrich Vock
e7d78a7b87 vulkan/runtime: Allow more than 8 DRM devices
Some people seem to have systems with more than 8 GPUs installed at
once. 256 is the maximum number of devices returned by libdrm, so using
this seems like a good choice for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27901>
2024-03-01 21:18:44 +00:00
Jesse Natalie
4ccbaa2cd8 microsoft/compiler: Remove deref load/store/atomic ops that statically go out of array bounds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27919>
2024-03-01 20:49:17 +00:00
Jesse Natalie
941d83ded4 spirv2dxil: Set push constant register space to nonzero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27919>
2024-03-01 20:49:17 +00:00
Luca Bacci
fe520ecfbf meson,windows: Use relative paths in Vulkan ICD manifest files
See https://github.com/msys2/MINGW-packages/issues/16065

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27468>
2024-03-01 20:09:59 +00:00
Nanley Chery
a1e3c93ff7 isl: Pick a better initial state for zeroed MCS
Pick the compressed-no-clear aux state instead of aux-invalid state to
reduce ambiguates in iris. Hopefully this will help debug the issues
seen around MCS-enabling on ACM.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27881>
2024-03-01 19:40:03 +00:00
Sagar Ghuge
5775bc0c53 anv/xe: Consider pat_index while unbinding the bo
Xe KMD also checks if cpu_caching caching set during bo creationg
matches with caching of the PAT index set in the VM unbind.

This was being unnoticed until now by luck and lack of testing in MTL.

So here always setting PAT index for all VM operations that has a bo
associated.

v2: (Jose)
- Move pat_index little bit up
- Copy commit message from iris patch

Fixes: 19439624d9 ("anv: Use DRM_XE_VM_BIND_OP_UNMAP_ALL to unbind whole bos")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27893>
2024-03-01 19:08:19 +00:00
José Roberto de Souza
963c08b623 iris/xe: Consider pat_index while unbinding the bo
Xe KMD also checks if cpu_caching caching set during bo creationg
matches with caching of the PAT index set in the VM unbind.

This was being unnoticed until now by luck and lack of testing in MTL.

So here always setting PAT index for all VM operations that has a bo
associated.

Fixes: eb18a92ef9 ("iris: Fill PAT fields in Xe KMD gem_create and vm_bind uAPIs")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27893>
2024-03-01 19:08:19 +00:00
Konstantin Seurer
6380118d13 radv/meta: Add shader - device mapping for radv_build_printf
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27817>
2024-03-01 18:46:41 +00:00
Konstantin Seurer
d9a1882daa radv/rra: Avoid reading past the ray history buffer
The loop exit condition did not take the token size into account.

Fixes: 767f628 ("radv/rra: Dump basic ray history tokens")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27815>
2024-03-01 18:20:13 +00:00
Caio Oliveira
082735750b intel/brw: Simplify usage of reg immediate helpers
Use fs_reg and don't take the type as argument.  In all uses the type
passed is the type of the register.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27904>
2024-03-01 17:52:09 +00:00
Caio Oliveira
fb1d871714 intel/brw: Fold backend_reg into fs_reg
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27904>
2024-03-01 17:52:09 +00:00
Sil Vilerino
67c461dbe0 d3d12: Do not use PIPE_BIND_DISPLAY_TARGET for d3d12_video_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27918>
2024-03-01 17:29:12 +00:00
Samuel Pitoiset
570ebe1b37 radv: enable radv_zero_vram for RAGE2
Another native Vulkan game which doesn't properly initialize memory.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10701
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27845>
2024-03-01 16:49:16 +00:00
Rohan Garg
73d98848fa intel/compiler: Xe2+ can do URB load/store with a byte offset
Thanks to Ken for suggesting this URB refactoring change and pointing
out that the LSC can operate on the byte offset granularity.

This should fix the geometry shader test cases where we have more than
32 vertices since previously we were failing to write the correct
control data bits because of incorrect write mask.

Shader-db results for Xe2:

total instructions in shared programs: 153475 -> 153437 (-0.02%)
instructions in affected programs: 1374 -> 1336 (-2.77%)
helped: 11
HURT: 0
helped stats (abs) min: 3 max: 5 x̄: 3.45 x̃: 3
helped stats (rel) min: 1.67% max: 4.92% x̄: 3.23% x̃: 2.70%
95% mean confidence interval for instructions value: -3.92 -2.99
95% mean confidence interval for instructions %-change: -4.10% -2.36%
Instructions are helped.

total loops in shared programs: 140 -> 140 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total cycles in shared programs: 16002649 -> 16002329 (<.01%)
cycles in affected programs: 9174 -> 8854 (-3.49%)
helped: 11
HURT: 0
helped stats (abs) min: 22 max: 38 x̄: 29.09 x̃: 32
helped stats (rel) min: 2.62% max: 5.54% x̄: 3.78% x̃: 3.85%
95% mean confidence interval for cycles value: -33.56 -24.62
95% mean confidence interval for cycles %-change: -4.48% -3.08%
Cycles are helped.

total spills in shared programs: 52 -> 52 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 94 -> 94 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0

total sends in shared programs: 4240 -> 4240 (0.00%)
sends in affected programs: 0 -> 0
helped: 0
HURT: 0

LOST:   0
GAINED: 0

Rework: (Sagar)
- Adjust offset/indirect offset calculation.
- Add shader-db results
- Always calculate dword index
- Drop changes for indirect writes

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27602>
2024-03-01 16:11:30 +00:00
Eric Engestrom
2ef7b4dfc1 ci/deqp: control the GLES release independently of GL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:11 +00:00
Eric Engestrom
3c9cba1085 ci/deqp: control the GL release independently of VK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:11 +00:00
Eric Engestrom
c59f0ca97e ci/deqp: make deql-egl for android less of a special case
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:11 +00:00
Eric Engestrom
3fb95a9457 ci/deqp: build deqp-egl using mold as well
Just like the build for the rest of the components.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:10 +00:00
Eric Engestrom
07b8b410a8 ci/deqp: only apply the android patches to the android build
They are unnecessary otherwise, so let's skip them

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:10 +00:00
Eric Engestrom
d63e7b4403 ci/image-tags: move KERNEL_ROOTFS_TAG to group the test images together
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:10 +00:00
Bas Nieuwenhuizen
3b15a9c52c radv: Expose VK_EXT_map_memory_placed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
7e029735e6 radv: Implement reserving the VA range on unmap.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
a6a31538c5 radv: Support for mapping a buffer at a fixed address.
Doing the separate bool to support mapping at 0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
d779cda0ae radv/amdgpu: Use mmap directly.
To give more control.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
cccbe1527c radv/winsys: Use radv_buffer_map wrapper.
So we can have 1 function ptr and then have a version with default
args.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
f7e8fdf35d radv: Add winsys argument to buffer map/unmap.
To use later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00