Commit Graph

180049 Commits

Author SHA1 Message Date
Marek Olšák
d2a025ab2b radeonsi: move setting registers at the end of si_emit_cb_render_state
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 14:06:56 -05:00
Marek Olšák
c21bcfd34f radeonsi: cosmetic changes in si_state_binning.c, si_state_msaa.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 14:06:56 -05:00
Marek Olšák
6455aaab07 radeonsi: cosmetic changes in si_state_viewport.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 14:06:56 -05:00
Marek Olšák
43cdb51402 radeonsi: move max_dist for MSAA into si_state_msaa.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 14:06:56 -05:00
Marek Olšák
12c239f829 radeonsi: various isolated cosmetic changes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 14:06:56 -05:00
Marek Olšák
ca1d37e1db radeonsi: adjust setting PA_SC_EDGERULE once more
based on PAL.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 14:06:52 -05:00
Marek Olšák
4dfff0f1b7 radeonsi: use si_shader_uses_streamout properly
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:43:11 -05:00
Marek Olšák
2a83532ed6 radeonsi: split setting num_threads in si_emit_dispatch_packets
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:42:52 -05:00
Marek Olšák
5a38757fcf radeonsi: cosmetic changes in si_pm4.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:42:33 -05:00
Marek Olšák
03353bd752 radeonsi: decrease PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS to 1024
to match PAL-based drivers. This is also the OpenGL minimum.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:41:57 -05:00
Marek Olšák
6708ccd3bf radeonsi: remove and inline si_shader::ngg::prim_amp_factor
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
e98a4f3820 radeonsi: rename ctx -> sctx in si_emit_guardband
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
a61d74ed27 radeonsi: remove AMD_DEBUG=nogfx
it doesn't work - it uses the CDNA codepath for preamble, which surely
hangs on non-CDNA

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
00b716cb83 radeonsi: remove redundant VS_PARTIAL_FLUSH for streamout
si_emit_streamout_end does this already.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
17de5dd1c4 radeonsi: inline si_screen_clear_buffer
it has only one use

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
738babc67a radeonsi: inline si_allocate_gds and si_add_gds_to_buffer_list
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
f841a5b991 radeonsi: don't use nir_optimization_barrier_vgpr_amd with ACO
It's unimplemented.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
44eaf50a34 ac/surface/tests: cosmetic changes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
dfcc7f83a4 ac/surface: cosmetic changes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:39:42 -05:00
Marek Olšák
355242f055 ac/gpu_info: adjust attribute ring size for gfx11
these are better numbers

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:36:52 -05:00
Marek Olšák
bd57630885 ac: add missing gfx11.5 bits
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
2023-11-05 12:34:55 -05:00
Alyssa Rosenzweig
cd0a01522f ttn: Set sample shading for sample ID reads
Fixes on asahi arb_stencil_texturing-blit_corrupts_state -auto
GL_TEXTURE_2D_MULTISAMPLE.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26011>
2023-11-05 00:31:22 +00:00
Mauro Rossi
95ad0c750c Android.mk: disable android-libbacktrace to build with Android 14
Android libbacktrace is not available in Android 14

Fixes the following build error:

FAILED: src/util/libmesa_util.a.p/u_debug_stack_android.cpp.o
...
../src/util/u_debug_stack_android.cpp:28:10: fatal error: 'backtrace/Backtrace.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Cc: mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963>
2023-11-04 21:37:24 +01:00
Mauro Rossi
520e79a3b5 Android.mk: filter out cflags to build with Android 14 bundled clang
Android 14 uses prebuild clang version 17.0.2
By filtering these cflags there are no building errors on previous Android releases.

Fixes the following building errors:

../src/c11/time.h:54:8: error: redefinition of 'timespec'
struct timespec
       ^
/media/bigblissdrive/u-x86/out/soong/.intermediates/bionic/libc/libc/android_vendor.34_x86_x86_64_shared/gen/include/bits/timespec.h:46:8: note: previous definition is here
struct timespec {
       ^
1 error generated.

In file included from ../src/util/disk_cache.c:50:
../src/util/disk_cache.h:86:4: error: use of undeclared identifier 'Dl_info'
   Dl_info info;
   ^
...
./src/util/disk_cache.h:114:30: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
      _mesa_sha1_update(ctx, build_id_data(note), build_id_length(note));
                             ^~~~~~~~~~~~~~~~~~~

10 errors generated.

../src/intel/perf/intel_perf.c:91:10: error: call to undeclared function 'major'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   maj = major(sb.st_rdev);
         ^
../src/intel/perf/intel_perf.c:92:10: error: call to undeclared function 'minor'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   min = minor(sb.st_rdev);
         ^
2 errors generated.

../src/intel/vulkan/anv_allocator.c:295:13: error: call to undeclared function 'futex_wake'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            futex_wake(&table->state.end, INT_MAX);
            ^
...
../src/intel/vulkan/anv_allocator.c:711:7: error: call to undeclared function 'futex_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      futex_wait(&pool->block.end, block.end, NULL);
      ^
6 errors generated.

Cc: mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963>
2023-11-04 21:36:55 +01:00
Alyssa Rosenzweig
0e481bf463 ci: Opt out asahi from clang-format
I'm still 100% a believer in clang-format enforcement, but given the difficult
constraints upstream CI has, I no longer believe it is productive or fair to do
this enforcement upstream. Instead, it can be (and effectively is) enforced much
more inexpensively in the Asahi tree. It is far better for me to insert a
"reformat asahi" commit once in a while when I rebase the Asahi tree, than to
shoot down an unrelated upstream MR because someone forgot to ninja
clang-format.

I regret adding the clang-format lint to CI. To those who have lost merges over
it, I am sorry. I'm learning from my mistakes and trying to do better.

I would encourage other drivers in the clang-format include to follow suit, but
doing this effectively requires a driver/hardware tree to do the enforcement. (I
would also encourage that, as it is much friendlier to upstream CI, but that's a
different discussion.)

For now, let's opt out asahi at the least.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26030>
2023-11-04 14:13:09 +00:00
LingMan
1f1ec1c6bc rusticl: Show an error message if the version of bindgen can't be detected
bindgen 0.69.0 broke the `--version` switch, resulting in misleading errors about requiring at
least bindgen 0.62 or about unexpected arguments.

Ideally the build system would fetch the correct bindgen version automatically like cargo does.
Until then, provide a hopefully more helpful error message to the user.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26046>
2023-11-04 13:47:49 +00:00
Eric Engestrom
e9f725c741 ci/rules: add missing clang-format files to what needs containers to build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:37 +00:00
Eric Engestrom
5be1972f61 ci: bump image tags to rebuild deqp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:37 +00:00
Eric Engestrom
37970fa703 ci/build-deqp: print more detailed information about what deqp version is running
`git describe` tells you that you have N patches on top of tag T, but
not what these patches are, and the commit hash is useless as it is only
valid during the container build.

Replace this with:
- the tag that we are checking out
- the list of patches applied on top of it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:36 +00:00
Eric Engestrom
124b4097f3 ci/build-deqp: move mkdir earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:36 +00:00
Eric Engestrom
a61dcdd4b1 ci/build-deqp: split deqp version into a variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:36 +00:00
Eric Engestrom
22f4ca2cf3 ci/build-deqp: stop ignoring failures while fetching patches
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:36 +00:00
Eric Engestrom
be18be9deb Revert "ci: backport two mesh/task query fixes for VKCTS"
This reverts commit dcc4e1b4d7.

The hashes added there are incorrect, and fixing them regresses a bunch
of drivers, so let's just revert for now, and the next commit fixes the
bug that allowed incorrect backports to go in undetected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26013>
2023-11-04 12:44:36 +00:00
Karol Herbst
655cbf203d docs/features: mark rusticl gl_sharing as done
It seems at the moment only iris and radeonsi expose other drivers aren't
fulfilling all prerequisites.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26044>
2023-11-04 10:30:56 +01:00
Rob Clark
d67d501af4 tu/drm/virtio: Switch to vdrm helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24733>
2023-11-04 03:00:04 +00:00
Rob Clark
0e3584df44 freedreno/drm/virtio: Switch to vdrm helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24733>
2023-11-04 03:00:04 +00:00
Rob Clark
06e57e3231 virtio: Add vdrm native-context helper
Add a helper to de-duplicate some of the virtgpu native-context support
between turnip and freedreno.  This should make things easier for other
drivers adding virtgpu support.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-intel
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24733>
2023-11-04 03:00:04 +00:00
Rob Clark
53ccb421a2 freedreno/drm: Simplify backend mmap impl
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24733>
2023-11-04 03:00:04 +00:00
Lucas Fryzek
6f467fc6a3 freedreno/drm: Add more APIs to per backend API
Add bo_map, bo_from_dmabuf, and bo_close_handle to the per backend
APIs for freedreno/drm. These changes are required to implement
a KGSL backend as part of freedreno/drm.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24733>
2023-11-04 03:00:04 +00:00
Rob Clark
b90244776a virtio/drm: Split out common virtgpu drm structs
Since these all ended up the same with (not yet merged) intel and amd
implementation of drm native context, split these out so they can be
shared.  This will also make it easier to extract out a shared helper
that can be re-used across native-context drivers.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # virtio-intel
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24733>
2023-11-04 03:00:04 +00:00
Juan A. Suarez Romero
9bdee8cd39 vc4/ci: comment why piglit is disabled
We disabled piglit testsuite some time ago because it is causing GPU
hangs from time to time, and we didn't find out yet what are the tests
causing such issue.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26021>
2023-11-04 02:41:21 +00:00
Paulo Zanoni
c2db19f496 anv: setup the TR-TT vma heap
"16TB ought to be enough for anybody."
      - Probably some Intel graphics hardware engineer

TR-TT addresses are fixed regardless of the platform's gtt_size.
Unconditionally reserve this space for it: our total 48bit address
space is 256tb and TR-TT takes 16tb out of it (1/16th).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:53 +00:00
Paulo Zanoni
0a120edfb8 anv/sparse: extract anv_sparse_bind()
This function will be able to transparently handle sparse binding
regardless of the backend: vm_bind ioctls or TR-TT. For now we only
support the vm_bind ioctls, but soon we'll have anv_sparse_bind_trtt()
as an option.

It is important to notice that even backends that support the vm_bind
ioctl may choose to do Sparse binding via TR-TT, that's why we're
adding the indirection at this specific point.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:53 +00:00
Paulo Zanoni
544c5c006c intel/genxml: add the Gen12+ TR-TT registers
These are the registers we're going to use for now.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:52 +00:00
Paulo Zanoni
1af1426542 anv/sparse: also print bind->address at dump_anv_vm_bind
This helped tracking down xe.ko bug #746.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:52 +00:00
Paulo Zanoni
b94d7dbe66 anv/sparse: join multiple NULL binds when possible
When it's a NULL bind we always set the bo_offset (aka memory offset)
to zero, so we have to avoid the "bind.offset == prev.offset + size"
check.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:52 +00:00
Paulo Zanoni
2fc0bbe814 anv/sparse: join multiple bind operations when possible
If the next bind is just an extension of the previous one, join both
in the same bind operation. Due to how mip levels are laid in memory,
this can only happen for mip level 0.

As of today xe.ko doesn't try to join contiguous operations for us.
Due to how rebinds happen each additional rebind operation may end up
resulting in many extra things done, so these simple checks end up
saving us a lot of cycles the Kernel would otherwise waste. This will
be true even after we issue all binds in a single ioctl.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:52 +00:00
Paulo Zanoni
2883c6ddaa anv: alloc client visible addresses at the bottom of vma_hi
Kill vma_cva and just toggle heap->alloc_high instead. This way,
client visible addresses will remain isolated in their own little
corner, except we have one less vma to deal with.

For TR-TT we'll need a special vma, and if we don't use the trick
above we'll need yet another trtt_cva_vma, increasing complexity even
more.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:52 +00:00
Paulo Zanoni
e1b50074fe anv: don't forget to destroy device->vma_mutex
This actually doesn't fix any bugs or leaks, because according to the
man page:

  "In the LinuxThreads implementation, no resources are associated
   with mutex objects, thus pthread_mutex_destroy actually does
   nothing except checking that the mutex is unlocked.

still, it's better to have it than not to have it, especially since
other implementations may do something.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26036>
2023-11-04 02:06:52 +00:00
Karol Herbst
0a072bb31c rusticl/context: fix importing gl cube maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
2023-11-04 01:28:43 +00:00