Commit Graph

176998 Commits

Author SHA1 Message Date
Konstantin Seurer 23ee6ca801 radv/meta: Use READ access for dst_access_flush
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29780>
2024-06-21 12:52:39 +00:00
Konstantin Seurer 14f7b077c8 radv: Remove dead access bits
READ access bits are dead as radv_src_access_flush arguments and WRITE
access bits are dead as radv_dst_access_flush arguments.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29780>
2024-06-21 12:52:39 +00:00
Konstantin Seurer 1c59634445 radv: Clean up pipeline barrier handling
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29780>
2024-06-21 12:52:39 +00:00
Connor Abbott ac34415e0f freedreno/a7xx: Fix register file size
It was bumped back up to 96. Not sure about a6xx gen4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29834>
2024-06-21 12:21:54 +00:00
Connor Abbott 8e6ecf3df8 tu: Don't WFI after every dispatch
I'm not sure why this was added back in 2019 before proper barrier
support, but it surely shouldn't be necessary now and is unnecessarily
serializing compute dispatches.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29815>
2024-06-21 11:06:35 +00:00
Connor Abbott 35c9b7fb90 tu: Fix unaligned indirect command synchronization
We need to wait to allow any previous uses to finish, and we have to
wait to allow the CACHE_INVALIDATE to finish before starting the
dispatch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29815>
2024-06-21 11:06:35 +00:00
Connor Abbott a0a662f72d freedreno, tu: Use CLEAN events on a7xx
This should reduce unnecessary invalidates.

We could combine a CLEAN and INVLIDATE into a FLUSH, but I'm not sure
how much benefit that brings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29824>
2024-06-21 10:34:05 +00:00
Connor Abbott c7284c94ef tu: Use a7xx terminology for flushes
a7xx renamed events around flushing:

a6xx              a7xx
FLUSH             CLEAN
INVALIDATE        INVALIDATE
FLUSH+INVALIDATE  FLUSH

The FLUSH events stayed the same but now they also invalidate. By not
adopting the new CLEAN events, we're inadvertantly invalidating too
much.

This change is just a refactor, that makes generic code consistently use
the a7xx terminology. The next commit will actually make us use CLEAN.

Note that LRZ_FLUSH is deliberately not changed because it actually
also invalidates (and the real name on a6xx was FLUSH_AND_INVALIDATE).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29824>
2024-06-21 10:34:05 +00:00
Connor Abbott 0e220cd45a tu: Support VK_EXT_attachment_feedback_loop_dynamic_state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23374>
2024-06-21 09:06:53 +00:00
Connor Abbott 833a0cf76e tu: Use image aspects for feedback loops
For consistency with the dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23374>
2024-06-21 09:06:53 +00:00
Lionel Landwerlin 339630ab05 brw: enable A64 loads source rematerialization
Allows to avoid Wa_1407528679 on A64 loads

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin f482fc33cf brw: blockify load_global_const_block_intel
This intrinsic is pretty much equivalent to
load_global_constant_uniform_block_intel, it just has a predicate. If
the predicate is always true we can turn into into the other.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 6fe6b9c8fa brw: avoid Wa_1407528679 in uniform cases
When the surface handles are generated with exec_all, we can avoid
emitting the workaround.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 5227b2db73 brw: annotation send instructions with surface handles generated with exec_all
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin b79e85a93f brw: always use new registers for load address increments
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 7f1ca16e3b brw: enable rematerialization of non 32bit uniforms
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 0531f568ac brw: remove some brackets
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 11a634151b brw: remove rematerialization assert
The default case should lead us to the next rematerialization block so
this is useless.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin d42bc0d3fc brw: bound the amount of rematerialized NIR instructions
Some of the instructions we don't need to rematerialize because we
already know they are executed with NoMask so we can use their
destination without reemitting them again.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 4bfb4f35a8 brw: improve rematalization of surface/sampler handles
This change handles patterns like this

con v0 = load_ubo ...
con v1 = add v0, 0x30
con v2 = load_ubo v1, 0x0

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin c7b312ad45 brw: factor out source extraction for rematerialization
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin 8fbbc9c301 brw: add missing break
Not fixing anything because of the default case below.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Lionel Landwerlin a869c57250 anv: don't apply descriptor array bound checking
This is a follow up to 059e82a4 ("anv: remove descriptor array bounds
checking"), that kind of bound checking is not required by the spec.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29663>
2024-06-21 08:29:44 +00:00
Eric Engestrom e3b73374cd egl: use os_get_option() to allow android to set EGL_LOG_LEVEL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29816>
2024-06-21 07:44:36 +00:00
Eric Engestrom c6987258da gallium/hud: use os_get_option() to allow android to set GALLIUM_HUD and related vars
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29816>
2024-06-21 07:44:36 +00:00
Eric Engestrom 787e0751c5 loader: use os_get_option() to allow android to set LIBGL_DRIVERS_PATH, GBM_BACKENDS_PATH, GALLIUM_PIPE_SEARCH_DIR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29816>
2024-06-21 07:44:36 +00:00
Yukari Chiba 9bce6f5cc4 llvmpipe: make unnamed global have internal linkage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29796>
2024-06-21 06:12:16 +00:00
Yukari Chiba fae6a8737a llvmpipe: add gallivm_add_global_mapping
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29796>
2024-06-21 06:12:16 +00:00
Dave Airlie 47cd0eee26 gallivm: create a pass manager wrapper.
With the introduction of the orc jit and looking at the mess that
is integrating with LLVM pass mgmt, encapsulate the passmgr
interactions in an internal abstraction so it can be shared,
and the compiler code isn't so messy to read.

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29796>
2024-06-21 06:12:16 +00:00
Jianxun Zhang 02813f341b isl: Remove code for Xe2 from isl_gfx12.c
Xe2 code is in isl_gfx20.* now.

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

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-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/29702>
2024-06-21 04:02:08 +00:00
Jianxun Zhang 4debb5bbc4 isl: Implement a part of WA_22018390030 (xe2)
Fix: piglit test
gl-3.2-layered-rendering-clear-color-all-types 2d_array mipmapped -auto
-fbo

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29702>
2024-06-21 04:02:08 +00:00
Jianxun Zhang 8b084df0c0 isl: Add dispatching in isl.c (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-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/29702>
2024-06-21 04:02:08 +00:00
Jianxun Zhang 8d3093a329 isl: Add isl_gfx20 into build (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-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/29702>
2024-06-21 04:02:08 +00:00
Jianxun Zhang 5de9df094f isl: Update isl_gfx20 code (xe2)
Purge code for previous platforms and rename functions
in Xe2 files.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-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/29702>
2024-06-21 04:02:07 +00:00
Jianxun Zhang 67fb44ccd6 isl: Clone from isl_gfx12.* files (xe2)
The new Xe2 files are copyed from intel/isl/isl_gfx12.*, as the
base for a seperation.

From 59218cdf07.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-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/29702>
2024-06-21 04:02:07 +00:00
Karol Herbst ea1e7dd9e9 rusticl: depend on the spirv_info target
Hit this while building only rusticl_mesa_bindings.

Fixes: a09c5d55ed ("spirv: Auto-generate spirv_info.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29275>
2024-06-21 03:54:02 +00:00
Karol Herbst 36a18208f7 rusticl/meson: add build root dir to the include dirs of rusticl_c
The static inline wrapper includes the header file relatively from where
`bindgen` gets executed, or so it seems.

And because meson doesn't allow us to add absolute paths, fs.relative_to
needs to be used. I'm sure we can come up with a better solution, but this
unbreaks builds.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11178
Fixes: 53629b0a2d ("rusticl: make use of new `output_inline_wrapper` meson.rust.bindgen feature")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29275>
2024-06-21 03:54:01 +00:00
Dylan Baker 656b8bb340 compiler/glcpp: don't recalculate macro
The original code has a private helper called in one place doing a
lookup that it's parent has already done, which could be null, except
that the parent verified that it isn't. Instead, let's pass the pointer
from the parent and assert it's non-null in the child for good
measure/documentation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29666>
2024-06-21 03:19:26 +00:00
Paulo Zanoni 87787c4a87 anv/xe: fix declaration of memory flags for integrated non-LLC platforms
Makes Cyberpunk, Hitman and Total War Warhammer 3 run on LNL.

Fixes: c9e41f25a1 ("anv: Add heaps for Xe KMD in platforms without LLC")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29775>
2024-06-21 02:49:24 +00:00
José Roberto de Souza 73ce3143a8 anv: Fix assert in xe_gem_create()
In this assert we want to enforce that if a cached buffer is created
it is a cached+coherent as Xe KMD don't support cached+incoherent.

Did not caught this issue because it only reproduces in platforms with
GPU outside of LLC.

Fixes: 9d8d5cf8c9 ("anv: Remove block promoting non CPU mapped bos to coherent")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29826>
2024-06-21 02:19:55 +00:00
Francisco Jerez c1feccdd90 intel/fs/gfx20+: Fix surface state address on extended descriptors for NIR scratch intrinsics.
The r0.5 thread payload register contains Surface State Offset bits
[27:6] as bits [31:10], so we need to shift the register right by 4 in
order to get the surface state offset expected in ExBSO mode, which is
the only extended descriptor encoding supported by the UGM shared
function for SS addressing on Xe2+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29543>
2024-06-21 01:49:43 +00:00
Francisco Jerez 8bbad903a2 anv/xe2+: Fix format of scratch space surface address in various 3DSTATE packets.
This field encodes bits [27:6] of the scratch surface state offset
according to the hardware spec, already on XeHP platforms.  However,
on previous platforms we were passing bits [25:4] instead, which was
apparently okay for two reasons:

 1/ We never used more than 8 MB of scratch surface states apparently.
 2/ A shift right by 2 was implicitly happening while copying the
    value of r0.5 into the address register holding the extended
    descriptor, which with the ExBSO addressing mode disabled
    considered bits [31:12] as the surface state index within the
    pool.

However on Xe2 ExBSO addressing mode is always enabled for the UGM
shared function, so we have to add an extra SHR instruction to format
the extended descriptor regardless, and there is no point in
disobeying the hardware spec passing a left-shifted offset.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29543>
2024-06-21 01:49:43 +00:00
Francisco Jerez 0cd927fa92 iris/xe2+: Fix format of scratch space surface address in various 3DSTATE packets.
This field encodes bits [27:6] of the scratch surface state offset
according to the hardware spec, already on XeHP platforms.  However,
on previous platforms we were passing bits [25:4] instead, which was
apparently okay for two reasons:

 1/ We never used more than 8 MB of scratch surface states apparently.
 2/ A shift right by 2 was implicitly happening while copying the
    value of r0.5 into the address register holding the extended
    descriptor, which with the ExBSO addressing mode disabled
    considered bits [31:12] as the surface state index within the
    pool.

However on Xe2 ExBSO addressing mode is always enabled for the UGM
shared function, so we have to add an extra SHR instruction to format
the extended descriptor regardless, and there is no point in
disobeying the hardware spec passing a left-shifted offset.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29543>
2024-06-21 01:49:43 +00:00
José Roberto de Souza 460aa58911 iris: Add support for compressed images allocation in Xe2
Xe2 replaces auxiliary surface mapping by software to compress buffers
with reserving part of the memory for the compression purpose.

To enable compression in Xe2 it is necessary to bind memory with one of
the PAT indexes that has compression enabled.

We're introducing 2 new iris_heaps to allocate compressed BO's out of
on Xe2, one for integrated and another for discrete platforms.
With these new iris_heaps we gain cache and sub-allocation for free.

If the compression requirements are met
iris_resource_image_is_pat_compressible() returns true so
BO_ALLOC_COMPRESSED is set and the the BO is allocated out of
the correct heap.

At this moment iris_resource_image_is_pat_compressible()
defaults to returning false as more work needs to be done but
the foundation for the compressed allocation is here.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28833>
2024-06-21 01:19:12 +00:00
José Roberto de Souza f5a6b84dd6 anv: Give apps the choice of compressed or uncompressed but cpu visible images
Compressed memory types are not CPU visible and Vulkan specification
don't have any requirement about that but some applications like
vkcube fails to run without a host visible option, so here appending
default_buffer_mem_types and compressed_mem_types.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28833>
2024-06-21 01:19:12 +00:00
José Roberto de Souza 8aec37fe0c anv: Add support for compressed images allocation in Xe2
Xe2 replaces auxiliary surface mapping by software to compress buffers,
instead it reserves part of the memory for the compression purpose.

To enable compression in Xe2 it is necessary bind memory with one of
the PAT indexes that has compression enabled.

It is still always returning false in anv_image_is_pat_compressible()
as it still needs more work before compression can be enabled but the
foundation for the compressed allocation is here.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28833>
2024-06-21 01:19:12 +00:00
José Roberto de Souza 90b223331f intel/dev: Add compressed PAT entry
This will be used in Xe2+ to store images compressed in memory.

Still missing add the compressed PAT index and attributes to
LNL intel_device_info.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28833>
2024-06-21 01:19:12 +00:00
Dylan Baker e67a8dc59a clc: remove check for null pointer that cannot be true in llvm_mod_to_spirv
Snce the *args parameter was added it's assumed to be non-null. If it is
null then the function is going off to UB land. As such, a later check
added for args being NULL is useless, and confuses coverity.

fixes: 3a752256f5

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29664>
2024-06-21 00:41:28 +00:00
Nanley Chery 9fa310b876 anv+zink/ci: Change sparse test result from crash to fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29659>
2024-06-21 00:08:38 +00:00
Nanley Chery b49182bed0 intel/isl: Pad the pitch on gfx12.0 for fast-clears
On gfx12.0, CCS fast clears don't seem to cover the correct portion of
the aux buffer when the pitch is not 512B-aligned. Pad the pitch unless
Wa_18020603990 applies (slow clear surfaces up to 256x256, 32bpp).

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29659>
2024-06-21 00:08:38 +00:00