Commit Graph

153448 Commits

Author SHA1 Message Date
Marek Olšák c49559f835 radeonsi/test_image_copy: remove linear and power-of-two size testing
it doesn't add any value

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák f146f3cfa1 radeonsi/test_image_copy: remove whole image copies
it doesn't add any value

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 8db7a2d497 radeonsi: rename si_test_blit -> si_test_image_copy_region
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák e0adb5be4d radeonsi: don't expose formats that CB supports, but not shaders
e.g. R4G4B4A4_UINT

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 54ccf24e79 radeonsi: assert format support in si_compute_copy_image
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 23012ff52b radeonsi: cosmetic changes in si_compute_copy_image
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 8c0669fe3f radeonsi: implement compute_copy_image between 1D_ARRAY and other texture types
And set more optimal compute block sizes.

The compute copy is required to preserve NaNs, so this fixes a lot of
AMD_TEST=copyimage cases.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 01d994f5e6 radeonsi: add color buffer support for R9G9B9E5_FLOAT on gfx10.3
This was missed when we added gfx10.3.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák fd5e661954 radeonsi: add color buffer support for 2_10_10_10 pipe formats
The hw enum is reversed.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 4512b212e7 radeonsi: don't allow broken compute image copies into A8R8_UNORM
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 52f83dce05 radeonsi: don't report R64_*INT as a sampler format because it doesn't work
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák fbe973b66e radeonsi: add si_can_use_compute_blit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 350bdda83d radeonsi: code style fix
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 8890cb2a99 radeonsi: simplify setting COMPUTE_PGM_RSRC2.SCRATCH_EN
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 3d773c7303 radeonsi: remove unused si_cs_shader_state::uses_scratch
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 77e1fc67bc radeonsi: align the tessellation ring address to 2MB
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 121cde7cb9 radeonsi: cleanup local includes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 0cb42c57c5 radeonsi: always print the lower-case GPU name for radeonsi-run-tests.py
This fixes the GPU name detection in radeonsi-run-tests.py when
the marketing name is unknown.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 88f22f188e ac,radeonsi: report SCALED formats as unsupported by samplers and color buffers
This was never exercised and it doesn't work.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 65c7b5ec20 ac: support GR channel order in ac_choose_spi_color_formats
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 74b3ca6752 ac/llvm: don't set ac_dlc in visit_intrinsic
It's set by get_load_cache_policy later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 0cd59c7cb0 ac/llvm: set the correct cache policy for sparse buffer loads
The DLC bit was missing on gfx10.

Fixes: 6d5e26752c "ac/nir: implement sparse image/texture loads"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák c7ec284024 ac: remove really_needs_scratch, parameter from ac_parse_shader_binary_config
it's always true

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Marek Olšák 4b93dd215f ac/gpu_info: rework how num_se is derived
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
2022-05-03 11:11:08 -04:00
Alyssa Rosenzweig 575068a165 panfrost: Unit test "from legacy" helper
So we don't regress the UABI. This doesn't get much CI coverage otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 6d0505701d panfrost: Unit test stride calculations
These have reasonable interpretations now, and the three row strides have been
deduplicated. So add stride expectations to our ASTC unit tests.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 579fd30209 panfrost: Unify row stride and AFBC row stride
Row stride is defined in terms of header blocks for AFBC. Usually,
afbc.row_stride is used for AFBC images and row_stride for non-AFBC images;
however, the nonsense non-AFBC stride leaked into the UABI. So handle that in
the legacy conversion path and use a unified row stride (equal to
afbc.row_stride for AFBC images and row_stride otherwise).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 1842e14a73 panfrost: Remove line_stride
There are no more users. This eliminates a class of issues.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 61100e7011 lima,panfrost: Use row stride for tiling routines
This makes more sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig c4241a831f panfrost: Use row_stride even for linear resources
In that case, they match up.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig c11df56cff panfrost: Adapt get_param for row strides
Let's preserve the old behaviour -- this is UABI, we need to be bug for bug
compatible.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 3a4207dde6 panfrost: Use row stride to calculate slice size
This expresses what's actually happening. Equivalent to the old calculation due
to some cancellation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 0b788e2ee4 panfrost: Rename away from bytes_per_pixel
This name is wrong for block-compressed formats. The code worked out anyway, but
rename it for clarity.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig 81a686a714 panfrost: Use row stride for explicit layouts
Line strides don't make sense for linear images, so use row strides instead in
the API. Then update the layout code accordingly.

Note: we need to preserve the old UABI (bug for bug compatibility), so we still
use legacy strides externally. But now we use row strides internally, which is
better than using both everywhere.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig c40ebd859c panfrost: Add helpers to work with legacy strides
Unfortunately, the botched nonlinear "line strides" have become ingrained in the
UABI. We need to be work with them. Add safe helpers to convert to/from the
legacy strides.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig a741bd5db1 panvk: Report row_stride in GetImageSubresourceLayout
...Rather than line_stride. For linear images, these are equivalent. For
nonlinear images, rowPitch is implementation-defined. So this isn't strictly a
bug fix, but it gets rid of the nonsense nonlinear line_stride.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig a7fdedd247 panvk: Remove unused layout structs
PanVK switched to the common Panfrost layout code, but these duplicate structs
stuck around. Garbage collect them to prevent confusion.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Alyssa Rosenzweig f45816181f pan/decode: Print row strides, not line strides
I.e. what's actually passed to the hardware, in case of compression or tiling.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
2022-05-03 14:20:15 +00:00
Karmjit Mahil 58d9afb80b pvr: Add compute update kernel in vkCmdDispatch().
We upload a new data section whenever a patched variant is
needed. They will be freed at command buffer destruction since
the uploads are linked.

Co-authored-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16040>
2022-05-03 13:41:28 +00:00
Karmjit Mahil 5e9e3fe7f7 pvr: Add compute update shared kernel in vkCmdDispatch().
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16040>
2022-05-03 13:41:28 +00:00
Karmjit Mahil 7ccf9494b6 pvr: Add initial implementation of vkCmdDispatch().
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16040>
2022-05-03 13:41:28 +00:00
Karmjit Mahil 4b7a9bf364 pvr: Add PVR_WORKGROUP_DIMENSIONS define.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16040>
2022-05-03 13:41:28 +00:00
Lionel Landwerlin 4efc997472 anv: fix invalid utrace memcpy l3 config on gfx < 11
device->l3_config is only valid on Gfx11+

This only fixes using GPU_TRACE=1

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 02a4d622ed ("anv: expose a couple of emit helper to build utrace buffer copies")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16291>
2022-05-03 13:18:48 +00:00
Mike Blumenkrantz 4a4adb65ce llvmpipe: disable compute statistics queries if queries are disabled
cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16278>
2022-05-03 13:00:50 +00:00
Mike Blumenkrantz e4884c35d6 llvmpipe: remove misleading query comment
u_blitter already handles this

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16278>
2022-05-03 13:00:50 +00:00
Mike Blumenkrantz a36c3f6f6a llvmpipe: disable statistic queries during draw if queries are disabled
cc: mesa-stable

fixes (zink):
spec@ext_transform_feedback@generatemipmap prims_generated

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16278>
2022-05-03 13:00:50 +00:00
Pierre-Eric Pelloux-Prayer 6ee9e6ce87 radeonsi: generate unique shader name in si_get_nir_shader
This function modifies the NIR shader, so when using NIR_DEBUG=print and
nir_viewer all the variants are displayed using the original name.

With this change, we get the original shader (eg: GLSL3), and then each
variant gets its own name (GLSL3-xxxxxxxx) - and is displayed in its
own tab in nir_viewer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16247>
2022-05-03 10:39:51 +00:00
Pierre-Eric Pelloux-Prayer f1f2d407e7 radeonsi: don't always strip NIR debug infos
When using NIR_DEBUG=print, always having shader names help debugging.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16247>
2022-05-03 10:39:51 +00:00
Joshua Ashton ce7966fcb4 aco: Use movk for AddressHi bits in vertex prolog
Eliminates a useless extra dword by transforming
        s_mov_b32 s47, 0xffff8000                                   ; beaf03ff ffff8000
to
        s_movk_i32 s47, 0x8000                                      ; b02f8000

which does the same thing.

Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15415>
2022-05-03 10:15:36 +00:00
Daniel Schürmann 58bd9a379e aco/ra: fix live-range splits of phi definitions
It could happen that at the time of a live-range split,
a phi was not yet placed in the new instruction vector,
and thus, instead of renamed, a new phi was created.

Fixes: dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_i8vec2
Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16248>
2022-05-03 09:54:30 +00:00