Commit Graph

167210 Commits

Author SHA1 Message Date
Marek Olšák ac0e83375a amd: fix LOD_BIAS on gfx6-9 and adjust the lod bias CAP
Fixes: e673bb4ae4 - amd,util: fix how lod bias is converted to fixed-point

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
2023-02-24 21:27:23 +00:00
Marek Olšák 98328a71dc radeonsi: fix COMPAT_MODE on gfx8-9
It was set in the wrong dword.

Fixes: e673bb4ae4 ("amd,util: fix how lod bias is converted to fixed-point")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
2023-02-24 21:27:23 +00:00
Marek Olšák fb70d8cf9c Revert "radeonsi/ci: Update stoney test expectations"
This reverts commit 53cc509288.

This MR fixes it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
2023-02-24 21:27:23 +00:00
Faith Ekstrand 96c832c47e spirv: Always emit deref_buffer_array_length intrinsics
All the drivers have been converted to setting this option now except
imagination and they don't support SSBOs yet.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3993
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand fbeb81d812 v3dv: Set spirv_options::use_deref_buffer_array_length
It'll get lowered to get_ssbo_size by nir_lower_explicit_io() so the
driver should never notice this change.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand 1386e1476a lavapipe: Set spirv_options::use_deref_buffer_array_length
It'll get lowered to get_ssbo_size by nir_lower_explicit_io() so the
driver should never notice this change.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand 85634a70ec turnip: Set spirv_options::use_deref_buffer_array_length
It'll get lowered to get_ssbo_size by nir_lower_explicit_io() so the
driver should never notice this change.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand 00218ab73f panvk: Drop our manual SSBO size handling
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand 7594a64ebe hasvk: Drop our manual SSBO size handling
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand a1c82fa42f anv: Drop our manual SSBO size handling
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand e41753cf17 nir/lower_io: Handle buffer_array_length for more address modes
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Sil Vilerino ee129301a9 frontend/va: Remove duplicate code in format support checking/reporting.
In config.c there are multiple copies of the code checking for VA_FORMAT_RT_*, this can lead
to confusion and is hard to maintain without knowing to change the code in all the places.

This commit extracts out the duplicated code into a function that checks format support
for a given profile and entrypoint, then this function is called from several places that
had the copies of this code in vlVaCreateConfig/vlVaGetConfigAttributes.

Please also note that after this change, all entrypoints/profiles will be checked for all
formats in the pipe_screen: YUV420/YUV420_10/YUV422/RGB32/YUV400/YUV444

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21466>
2023-02-24 13:46:38 -05:00
Sil Vilerino 1a6865eae3 frontend/va: Add format support checks for VA_RT_FORMAT_* in VaCreateConfig/VaGetConfigAttributes
Before this change some formats like YUV420, YUV422 and RGB32 are hardcoded as supported
in VaCreateConfig/VaGetConfigAttributes. This is not always the case, different gallium
drivers and hardware will support different formats. The frontend should delegate the support
check call by using the is_video_format_supported(...) function from pipe_screen.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21466>
2023-02-24 13:37:51 -05:00
Roland Scheidegger a4fa489002 lavapipe, nir: Fix wrong array index scaling in nir_collect_src_uniforms
The scaling needs to be ubo * MAX_INLINABLE_UNIFORMS, not
ubo * PIPE_MAX_CONSTANT_BUFFERS, otherwise accesses beyond buffer size
will result for ubo >= 4 (and we'd also access the wrong values later
for other non-zero ubo indices).

Fixes: a7696a4d98 ("lavapipe: Fix bad array index scale factor in lvp_inline_uniforms pass")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21506>
2023-02-24 16:13:55 +00:00
Gert Wollny b6303d33ec r600/sfn: Fix readport cylce map
This is currently of no consequence, because the bank swizzle
codes are only used to check legal ALU group configuration
and the bank swizzles are not yet allocated to the instruictions
here.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21516>
2023-02-24 15:59:03 +00:00
Gert Wollny b5b7ca0ad3 r600/sfn: be more conservative with channel use in multi-slot ops
The current approach to check the bank swizzle doesn't allow to
re-evaluate bank-swizzle for instructions that where emitted
earlier, so we might end up with impossile constellations when we
allow three uses of the same channel

Fixes: edabd5cd84
  r600/sfn: check used channels when evaluating allowed mask

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

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21516>
2023-02-24 15:59:03 +00:00
Konstantin Seurer e2fa9ba9c6 radv: Use indirect header filling for compact builds
Sets the accel struct size fields to the correct values which should
allow for more compaction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 40e9efa2de radv/bvh: Add a shader for filling the header
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer c83ea20683 radv/bvh: Move the size header field up
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer b0fd43f1f7 radv: Move the geometry infos before the BVH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 0800450cb9 radv: Use compact encoding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 07c1b23022 radv/bvh: Implement compact encoding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 71ccc8d600 radv: Add a build config for compact builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer da4f498f6f radv/bvh/encoder: Move dst_node initialization into the loop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 2792d012d2 radv/bvh/encode: Introduce is_root_node
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 2c0e158ae2 radv/bvh/encode: Move bvh_offset NULL check to the top of the loop
NULL nodes don't have to be encoded and they also don't carry over any
information to their children.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 4e87a01b93 radv/bvh: Replace is_final_tree with bvh_offset
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konstantin Seurer 688f598237 radv/bvh/encode: Use the node type for identifying internal nodes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20818>
2023-02-24 15:14:40 +00:00
Konrad Dybcio 6d93f4f867 freedreno: Add A2xx REG_A2XX_RBBM_PM_OVERRIDE2 bitfields
Required for good-looking kernel code

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21480>
2023-02-24 14:48:27 +00:00
Konrad Dybcio 891a8bfb2d freedreno: Add A2xx perf counter reg values
Required for good-looking kernel code

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[rob: fixup CI expectations]

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21480>
2023-02-24 14:48:27 +00:00
Karmjit Mahil 9e2572903b pvr: Remove component_alignment
We don't support output register subdivision so no need to keep
track of how many bytes have been allocated within the output regs.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21386>
2023-02-24 14:36:36 +00:00
Karmjit Mahil 0244719a12 pvr: Remove unused msaa_mode field
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21386>
2023-02-24 14:36:36 +00:00
Karmjit Mahil ca04882117 pvr: Setup SPM EOT state
On entering SPM we need to store the tile data for the current
render into the scratch buffer so we need to setup an EOT program
to do so.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21386>
2023-02-24 14:36:36 +00:00
Karmjit Mahil f59c6eef16 pvr: Move PBE START_POS into csb enum helpers header
This commit adds 'pvr_pbestate_source_pos()' and moves
`enum pvr_pbe_source_start_pos` into pvr_csb_enum_helpers.h .
The enum will be needed in other files in the commits following.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21386>
2023-02-24 14:36:36 +00:00
Samuel Pitoiset d2ff8b673a radv: advertise VK_EXT_image_sliced_view_of_3d on GFX10+
Pass dEQP-VK.pipeline.monolithic.sliced_view_of_3d_image.* on NAVI21.

Looks like older generations can't support it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21359>
2023-02-24 14:12:22 +00:00
Samuel Pitoiset 5520a40e05 radv: implement VK_EXT_image_sliced_view_of_3d on GFX10+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21359>
2023-02-24 14:12:22 +00:00
Samuel Pitoiset e82c11df66 ac/nir: add resinfo lowering for sliced storage 3D views
The first layer isn't necessarily 0 and depth shouldn't be minified.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21359>
2023-02-24 14:12:22 +00:00
Karmjit Mahil 806f146eea pvr: Add support for blend constants.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21388>
2023-02-24 13:59:01 +00:00
David Heidelberg 46091832d8 util/process_test: make the error variable static
Make the `error` variable static to prevent a clash with
the glibc error() function when LTO is used.

Fixes the LTO build.
Otherwise, it'll fail in the linking phase with a conflict:
```
[411/2321] Linking target src/util/process_test
FAILED: src/util/process_test
c++  -o src/util/process_test src/util/process_test.p/tests_process_test.c.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--start-group src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a subprojects/perfetto/libperfetto.a /usr/lib/x86_64-linux-gnu/libz.so -pthread -lm -ldl /usr/lib/x86_64-linux-gnu/libunwind.so -Wl,--end-group
mold: error: symbol type mismatch: error
>>> defined in /tmp/process_test.SLc9I6.ltrans0.ltrans.o as STT_OBJECT
>>> defined in /lib/x86_64-linux-gnu/libc.so.6 as STT_FUNC
```

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21511>
2023-02-24 13:30:09 +01:00
Simon Perretta b4ab54976b pvr: Add encodings for index registers
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta 6122dd5488 pvr: Amend definitions for ST and IDF
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta 66500c28d2 pvr: Add late op lowering pass and conditional execution
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta 8719f7cb8d pvr: Add support for MOVC
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta c38c119617 pvr: Add basic support for manual instruction grouping
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta b642e77cdd pvr: Add support for TST
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta de64dfe940 pvr: Add branch support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta b1064e91f1 pvr: Add support for ST
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta c4b7128d84 pvr: Add support for IDF
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta 73d07bbb52 pvr: Add support for generating NOP program
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00
Simon Perretta 4ddcda8369 pvr: Add support for generating per-job EOT program
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
2023-02-24 11:29:48 +00:00