Commit graph

182159 commits

Author SHA1 Message Date
Eric Engestrom
ef0e8bae0d ci/b2c: use envvars directly instead of converting them back and forth into cli args
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
e157d67d39 ci/b2c: export B2C_TEST_SCRIPT
Next commit will use it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
b2e78a9775 ci/b2c: use with:write instead of manually doing open;write;close
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
50da22812d ci/b2c: always define cmdline_extras
Just make it an empty string when undefined

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
86ee903b38 ci/b2c: always define job_volume_exclusions
The template doesn't do anything if the list is empty, so simplify the code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
14f59188f6 ci/b2c: drop unused --volume and --mount-volume
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
5142ae2d4f ci/b2c: drop support for harbor.freedesktop.org
It's dead, Jim.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
8eabe3d913 ci/b2c: tags are mandatory
Jobs without tags are not accepted, so there is no point in having
support for creating them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
850d3e28e5 ci/b2c: drop unused B2C_EXTRA_VOLUME_ARGS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
a10bd6fcb0 ci/b2c: fix indentation of comment and after_script: list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
918199a154 ci/b2c: stop ignoring errors in before_script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Eric Engestrom
6cc6ebde3a ci/b2c: drop passthrough of unset CI_JOB_JWT
Fixes: dabc068e6c ("ci: Use ci-fairy minio login via token file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
2023-12-13 18:29:23 +00:00
Lionel Landwerlin
d761871761 isl: drop AUX-TT CCS alignment with INTEL_DEBUG=noccs
Signed-off-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/26644>
2023-12-13 17:40:38 +00:00
Boris Brezillon
db5166718d util/hash_table: Don't leak hash_key_u64 objects when the u64 hash table is destroyed
Allocate a ralloc sub-context which takes the u64 hash table as a parent
and attach a destructor to it so we can free the hash_key_u64 objects
that were allocated by _mesa_hash_table_u64_insert().

The order of creation of this sub-context is crucial: it needs to happen
after the _mesa_hash_table_create() call to guarantee that the
destructor is called before ht->table and its children are freed,
otherwise the _mesa_hash_table_u64_clear() call in the destructor leads
to a use-after-free situation.

Fixes: ff494361be ("util: rzalloc and free hash_table_u64")
Cc: stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26423>
2023-12-13 17:02:02 +00:00
Boris Brezillon
5a60fd7b14 util/hash_table: Don't leak hash_u64_key objects when the entry exists
When an entry exists, _mesa_hash_table_insert() updates the entry with
the new data/key pair, which causes a leak if the key has previously
been dynamically allocated, like is the case for hash_u64_key keys.

One solution to solve that is to do the insertion in two steps: first
_mesa_hash_table_search_pre_hashed(), and if the entry doesn't exist
_mesa_hash_table_insert_pre_hashed(). But approach forces us to do the
double-hashing twice.

Another approach is to extract the logic in hash_table_insert() that's
responsible for the searching and entry allocation into a separate helper
called hash_table_get_entry(), and keep the entry::{key,data} assignment
in hash_table_insert().

This way we can re-use hash_table_get_entry() from
_mesa_hash_table_u64_insert(), and lake sure we free the allocated
key if the entry was already present.

Fixes: 6649b840c3 ("mesa/util: add a hash table wrapper which support 64-bit keys")
Cc: stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26423>
2023-12-13 17:02:02 +00:00
Boris Brezillon
977cc3157d util/hash_table: Use FREE() to be consistent with the CALLOC_STRUCT() call
CALLOC_STRUCT() calls the OS abstraction layer to do the allocation.
Call FREE() to free the corresponding objects so we keep things
consistent and have proper debug traces when memory-debugging
is enabled.

Fixes: 6649b840c3 ("mesa/util: add a hash table wrapper which support 64-bit keys")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26423>
2023-12-13 17:02:02 +00:00
Marek Olšák
165d27abfc winsys/amdgpu: document BO structures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
68f7e497fe winsys/amdgpu: fix amdgpu_cs_has_user_fence for VPE
invert the condition to prevent this in the future.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
f5a3874ad1 winsys/amdgpu: clean up the rest of the code for cs->buffer_lists
This just changes how we iterate over the buffer lists.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
af0d2fe4fc winsys/amdgpu: pass amdgpu_buffer_list* to amdgpu_add_bo_fences_to_dependencies
Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
378984b994 winsys/amdgpu: return amdgpu_cs_buffer* from add/lookup_buffer instead of index
because we only use the index to get amdgpu_cs_buffer.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
05ba3c9cc5 winsys/amdgpu: clean up duplicated code around amdgpu_lookup/add_buffer
The function for real, slab, and sparse buffers can be unified, mostly.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
2afe6cea4c winsys/amdgpu: change amdgpu_lookup_buffer to take struct amdgpu_buffer_list
Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
9cf35b601a winsys/amdgpu: change real/slab/sparse_buffers to buffer_lists[3]
The next commits will simplify it.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
32eb4a54dc winsys/amdgpu: don't count memory usage because it's unused
Acked-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
bbd64747e2 winsys/amdgpu: move lock from amdgpu_winsys_bo into sparse and real BOs
The slab BO doesn't use it.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
6803868498 winsys/amdgpu: use inheritance for the slab BO
Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
86481c461e winsys/amdgpu: use inheritance for the sparse BO
Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
e9c416ac9a winsys/amdgpu: use inheritance for the real BO
add struct amdgpu_bo_real

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
d1e70db89a winsys/amdgpu: use inheritance for the cache_entry BO field
Add struct amdgpu_bo_real_reusable for it. This is the beginning
of changing amdgpu_winsys_bo to use inheritance instead of a union.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
943a3329c7 winsys/amdgpu: inline amdgpu_add_fence_dependencies_bo_lists
and rename the other one

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
5cf57986d2 winsys/amdgpu: cosmetic changes in amdgpu_cs_add_buffer
Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
c902b9e1d9 winsys/amdgpu: don't return a value from cs_add_buffer
It's unused. The return value is only used with the radeon winsys.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
390f26eefb ac,radeonsi: require DRM 3.27+ (kernel 4.20+) same as RADV
The only major change is the code removal of the legacy BO list path
in the winsys, which required switching "debug_all_bos" to the new path.

Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Marek Olšák
5cfd659276 ac/llvm: remove code for converting txd from 1D to 2D because NIR does it
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26547>
2023-12-13 16:26:17 +00:00
Caio Oliveira
f17e23e116 compiler/glsl: Reduce scope of is_anonymous
This a GLSL parser specific detail, so move it there.  Also
add a comment pointing to where #anon prefix is used.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26656>
2023-12-13 15:44:40 +00:00
Ganesh Belgur Ramachandra
8458cd49e0 asahi: fixes prevailing '-Werror=maybe-uninitialized' issue
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26206>
2023-12-13 15:29:43 +00:00
Sathishkumar S
cd8ccba814 frontends/va: use va interface for jpeg partial decode
add support to check jpeg crop decode cap and to set the crop
rectangle. the interface is avialble on libva 1.21.0 and higher.

v2: (Ruijing)
enclose the entire case block within VA_CHECK_VERSION
if attr unsupported set the return value to VA_ATTRIB_NOT_SUPPORTED

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26588>
2023-12-13 14:18:05 +00:00
Christian Gmeiner
2f205caea4 etnaviv: Add static_assert(..) to catch memory corruption
When we start to support GPUs with more then 16 varyings the code base
tells us that there is some work to do.

Cc: mesa-stable

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26662>
2023-12-13 12:56:47 +00:00
Christian Gmeiner
11ffb20b70 etnaviv: Update headers from rnndb
Update to rnndb commit 071f5a60dcb8.

This updates VIVS_PA_SHADER_ATTRIBUTES__LEN define from 10 to 16 and
fixes memory corruption if more then 10 varyings are used. The current
upper limit for varyings is 16.

Cc: mesa-stable

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26662>
2023-12-13 12:56:47 +00:00
Karol Herbst
de3190d36d radeonsi: fix reg_saved_mask for non graphics contexts
The old code used to clear the bits, the new one set it. It should have
used `BITSET_CLEAR_RANGE` instead.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10286
Fixes: 17e01a9a9b ("radeonsi: merge context_reg_saved_mask and other_reg_saved_mask into a BITSET")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26657>
2023-12-13 12:25:38 +00:00
Tatsuyuki Ishi
c3c3a8926a radv/amdgpu: Separate the concept of residency from use_global_list.
A BO can be always resident by two ways:
1. Through kernel bookkeeping. The BO is created with
   AMDGPU_GEM_CREATE_VM_ALWAYS_VALID and bo->is_local gets set to true.
2. Through the driver global BO list. On every submission, the global
   BO list is added to the CS's BO list.

Until now, use_global_list reflected either 1. or 2. . This commit
changes it to reflect 2. only, and update callsites that checks for
residency to use a new helper.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26591>
2023-12-13 12:03:20 +00:00
Tatsuyuki Ishi
63120a55b8 radv/amdgpu: Remove virtual bo dump logic.
Virtual BOs cannot go into the global bo list. Accessing bo_handle is
also invalid for virtual BOs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26592>
2023-12-13 11:42:35 +00:00
Rohan Garg
40c6e54ce7 anv: rename anv_create_companion_rcs_command_buffer to anv_cmd_buffer_ensure_rcs_companion
We can now drop any checks for companion_rcs_cmd_buffer before calling
anv_create_companion_rcs_command_buffer.

Ensure that anv_cmd_buffer_ensure_rcs_companion callee's have the proper
error handling.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26648>
2023-12-13 11:19:07 +00:00
Timothy Arceri
bed1b8b90d radeonsi: fix divide by zero in si_get_small_prim_cull_info()
This fixes a crash on startup with the game
"Ty the Tasmanian Tiger 3"

Fixes: f8a0aa6852 ("radeonsi: fix view culling for wide lines")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26661>
2023-12-13 10:06:41 +00:00
Lionel Landwerlin
d376d8c5ea anv: promote EXT_calibrated_timestamps to KHR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632>
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
4eb1eb0db1 anv: promote EXT_vertex_attribute_divisor to KHR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632>
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
f99e43d606 anv: switch to use runtime physical device properties infrastructure
Prevents us to have that big switch case for each extension's
properties.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632>
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
dc858202a9 anv: get features after initializing drm
We'll want to capture properties like features, just once at
initialization.

In order to do this we need the DRM stuff to be initialized as some of
that can be reported in properties.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632>
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
a1dcf943ab isl: constify isl_device_get_sample_counts()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632>
2023-12-13 09:39:08 +00:00