Martin Roukala (né Peres) [Fri, 26 Aug 2022 08:09:51 +0000 (11:09 +0300)]
radv/ci: uprev boot2container
This brings in massively-tidier logs.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18267>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:58:00 +0000 (09:58 +0200)]
v3dv: expose VK_KHR_maintenance4
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 08:05:47 +0000 (10:05 +0200)]
v3dv: implement vkGetDeviceImageSparseMemoryRequirementsKHR
Added with KHR_maintenance4.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:56:53 +0000 (09:56 +0200)]
v3dv: implement vkGetDeviceBufferMemoryRequirementsKHR
Added with VK_KHR_maintenance4.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:41:06 +0000 (09:41 +0200)]
v3dv: add a buffer_init helper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:40:50 +0000 (09:40 +0200)]
v3dv: add a get_buffer_memory_requirements helper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:23:14 +0000 (09:23 +0200)]
v3dv: implement vkGetDeviceImageMemoryRequirementsKHR
Added with KHR_maintenance4.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:22:46 +0000 (09:22 +0200)]
v3dv: add a get_image_memory_requirements helper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 07:01:10 +0000 (09:01 +0200)]
v3dv: add a v3dv_image_init helper
This is different from the internal create_image in that it doesn't
allocate memory for an image object, instead it expects the object
to be created and it initializes it from a VkImageCreateInfo struct.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 06:41:23 +0000 (08:41 +0200)]
v3dv: set maxBufferSize property
Included since KHR_maintenance4 and Vulkan 1.3.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 06:23:27 +0000 (08:23 +0200)]
v3dv: ref/unref pipeline layout objects
Since KHR_maintenance4 it is possible to destroy pipeline layouts
immediately after creating pipelines.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Iago Toral Quiroga [Thu, 25 Aug 2022 06:12:29 +0000 (08:12 +0200)]
v3dv: add a helper to destoy pipeline layouts
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18246>
Pierre-Eric Pelloux-Prayer [Thu, 18 Aug 2022 14:43:32 +0000 (16:43 +0200)]
radeonsi: use LOAD_CONTEXT_REG_INDEX for VGT_STRMOUT_DRAW_OPAQUE
Based on PAL's UniversalCmdBuffer::CmdDrawOpaque.
We don't need to use PFP_SYNC_ME because it's done in emit_cache_flush.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18129>
Erik Faye-Lund [Wed, 24 Aug 2022 13:20:42 +0000 (15:20 +0200)]
mesa: fall-back to fp16 for bptc-textures
FP16 is way more commonly supported than FP32, and requires half the
memory bandwidth. Because the internal format of BPTC is really FP16,
let's fall back to that instead.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 24 Aug 2022 13:16:37 +0000 (15:16 +0200)]
mesa/main: add fp16-versions of bptc decompression functions
These are essential copies of the float-versions, with minor
adjustments.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 24 Aug 2022 12:41:47 +0000 (14:41 +0200)]
mesa/main: remove always-true define
We don't include this header anwhere where BPTC_BLOCK_DECODE isn't
already true, so let's remove it.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Thu, 11 Aug 2022 10:32:16 +0000 (12:32 +0200)]
zink: allow X32 -> A32
The 32-bit per component pipe_formats are a bit different than the 8 and
16 bit formats, in that there's no UNORM or SNORM variants of them. So
let's just omit those variants.
While we're at it, update a comment that was already out-of-date anyway.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 06:59:28 +0000 (08:59 +0200)]
mesa/st: enable bptc extension with fallback
This implements emulation of BPTC for all drivers that don't natively
support it in HW, similar to what we have for ETC and ASTC already. The
only significant difference is that we don't implement any transcoding
DRI-conf for it.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 06:45:16 +0000 (08:45 +0200)]
mesa/st: implement fallback for bptc
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 09:16:28 +0000 (11:16 +0200)]
mesa: add _mesa_unpack_bptc-function
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 06:27:19 +0000 (08:27 +0200)]
mesa: add format-helper for bptc
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 06:24:29 +0000 (08:24 +0200)]
mesa/st: add context-flag for bptc-support
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Thu, 11 Aug 2022 14:12:00 +0000 (16:12 +0200)]
mesa/st: do not use memcpy when using compressed fallback
If we're using the memcpy-path, we don't update the compressed image,
which will be needed if an application try to download the texture-image
again afterwards.
This isn't a problem yet, because none of the current compressed formats
with fallback are copyable as per the OpenGL 4.6 Core spec, table 8.14.
However, this is about to change, when we introduce fallback for BPTC
formats.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Thu, 11 Aug 2022 09:07:52 +0000 (11:07 +0200)]
mesa/st: avoid double-mapping if both images are the same
If both src_image and dst_image are pointing to the same image, we'll
end up double mapping the image, which throws an assert in
st_texture_image_map.
So let's check if these images are the same, and avoid the extra mapping
in that case.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 11:06:57 +0000 (13:06 +0200)]
mesa/st: simplify st_compressed_format_fallback
By looking at the format-layout, we can do switch-cases here instead of
serial calls to _mesa_is_format_foo(). This isn't a huge deal yet, but
this function is going to learn about a lot more formats soon...
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 10:29:07 +0000 (12:29 +0200)]
mesa/main: simplify implementation of _mesa_is_format_astc_2d
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Erik Faye-Lund [Wed, 10 Aug 2022 10:26:49 +0000 (12:26 +0200)]
mesa/main: simplify implmementation of _mesa_is_format_etc2
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012>
Chad Versace [Wed, 24 Aug 2022 23:49:11 +0000 (16:49 -0700)]
venus: Document VK_EXT_texture_compression_astc_hdr support
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 00:49:46 +0000 (17:49 -0700)]
venus: Enable VK_EXT_tooling_info
Implement it locally with the common implementation.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 00:03:07 +0000 (17:03 -0700)]
venus: Enable VK_EXT_private_data
Implement it as hybrid native/passthrough as a workaround until venus
learns how to deep surgery on pNext chains. Eventually, we want to
implement it purely natively. For details, see the big code comment.
See: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/908
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Signed-off-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 01:43:02 +0000 (18:43 -0700)]
venus: Enable VK_KHR_format_feature_flags2
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 00:56:42 +0000 (17:56 -0700)]
venus: Enable VK_EXT_ycbcr_2plane_444_formats
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 00:39:24 +0000 (17:39 -0700)]
venus: Enable VK_EXT_texel_buffer_alignment
The patch looks asymmetic because the extension was promoted to 1.3 but
not its feature struct.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 00:32:15 +0000 (17:32 -0700)]
venus: Enable VK_EXT_subgroup_size_control
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Wed, 10 Aug 2022 23:05:06 +0000 (16:05 -0700)]
venus: Enable VK_KHR_zero_initialize_workgroup_memory
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Wed, 10 Aug 2022 23:02:20 +0000 (16:02 -0700)]
venus: Enable VK_KHR_shader_terminate_invocation
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Wed, 10 Aug 2022 22:57:41 +0000 (15:57 -0700)]
venus: Enable VK_KHR_shader_non_semantic_info
This extension has no Vulkan API, only SPIR-V API.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Wed, 10 Aug 2022 22:45:48 +0000 (15:45 -0700)]
venus: Enable VK_KHR_shader_integer_dot_product
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 19:50:17 +0000 (12:50 -0700)]
venus: Simplify vn_GetPhysicalDeviceProperties2
Reduce approximately 220 lines to 80.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 19:41:43 +0000 (12:41 -0700)]
venus: Simplify vn_GetPhysicalDeviceFeatures2
Reduce approximately 300 lines to 60.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Thu, 11 Aug 2022 19:16:32 +0000 (12:16 -0700)]
vulkan: Make vk_copy_struct_guts() public
Venus wants to copy struct guts too.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Chad Versace [Wed, 10 Aug 2022 21:01:17 +0000 (14:01 -0700)]
venus: Sort passthrough extensions
Only the Vulkan 1.3 extensions were unsorted.
Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000>
Rhys Perry [Fri, 5 Aug 2022 13:11:44 +0000 (14:11 +0100)]
aco: remove dead code for querying image size/samples/levels
ac_nir_lower_resinfo() now lowers these.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991>
Rhys Perry [Fri, 5 Aug 2022 12:50:59 +0000 (13:50 +0100)]
radv: enable ac_nir_lower_resinfo for ACO
fossil-db (navi21):
Totals from 4022 (2.98% of 134913) affected shaders:
VGPRs: 207824 -> 205264 (-1.23%); split: -1.25%, +0.02%
CodeSize:
18486240 ->
18778488 (+1.58%); split: -0.00%, +1.58%
MaxWaves: 84398 -> 84882 (+0.57%)
Instrs: 3408968 -> 3470936 (+1.82%); split: -0.00%, +1.82%
Latency:
43493420 ->
43168394 (-0.75%); split: -1.57%, +0.82%
InvThroughput: 6911341 -> 6816816 (-1.37%); split: -1.41%, +0.05%
VClause: 88256 -> 82728 (-6.26%); split: -6.31%, +0.04%
SClause: 130061 -> 131526 (+1.13%); split: -0.39%, +1.51%
Copies: 219849 -> 238548 (+8.51%); split: -0.05%, +8.56%
Branches: 79168 -> 79174 (+0.01%); split: -0.00%, +0.01%
PreSGPRs: 180683 -> 184952 (+2.36%); split: -0.17%, +2.53%
PreVGPRs: 179716 -> 178956 (-0.42%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991>
Rhys Perry [Fri, 5 Aug 2022 15:34:30 +0000 (16:34 +0100)]
nir/lower_tex: ignore width of cube textures
On AMD hardware, height is faster to access and we're already doing so.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991>
Rhys Perry [Fri, 5 Aug 2022 15:35:42 +0000 (16:35 +0100)]
aco: add SCC clobber in build_cube_select
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991>
Rhys Perry [Fri, 5 Aug 2022 15:34:09 +0000 (16:34 +0100)]
nir/print: support nir_texop_descriptor_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes:
3098000e712 ("nir: add nir_texop_descriptor_amd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17991>
Marek Olšák [Tue, 23 Aug 2022 22:53:40 +0000 (18:53 -0400)]
radeonsi: move set_patch_vertices into si_state_shaders.cpp
it's a better place for it
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Tue, 23 Aug 2022 21:51:49 +0000 (17:51 -0400)]
radeonsi: move patch_vertices-related tessellation updates out of si_draw
This only depends on the patch_vertices and the TCS.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 13:12:03 +0000 (09:12 -0400)]
radeonsi: remove 1 draw packet order codepath, keep the first one
Multi-mode multi-draws will make it more complicated, so let's start with
simpler code.
I changed the order a little: I put the VBO update next to emit_draw_packets.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 12:50:31 +0000 (08:50 -0400)]
radeonsi: cosmetic changes in si_emit_rasterizer_prim_state
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 12:20:01 +0000 (08:20 -0400)]
radeonsi: set GS_STATE_OUTPRIM and PROVOKING_VTX_INDEX only when they change
This moves setting those registers from an unconditional place in draw_vbo
into si_set_rasterized_prim (for draw_vbo), si_update_rasterized_prim
(for bind_xx_shader), and si_bind_rs_state.
It's a little more complicated than expected.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 10:55:19 +0000 (06:55 -0400)]
radeonsi: precompute GS_OUT_PRIM in advance
We don't have to do it every draw now if the rasterized prim type
doesn't change.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 10:46:09 +0000 (06:46 -0400)]
radeonsi: unify the logic that sets rast_prim
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 07:57:58 +0000 (03:57 -0400)]
radeonsi: move fixing ngg_culling into si_update_shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 07:43:54 +0000 (03:43 -0400)]
radeonsi: remove the prim_restart_tri_strips_only option
Not used enough, no difference in performance for Dirt Rally on 6800.
Move the variable down.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 07:27:53 +0000 (03:27 -0400)]
radeonsi: move *rs to its only use in si_draw
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 06:52:34 +0000 (02:52 -0400)]
radeonsi: make the primitive type constant with tessellation
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Sun, 14 Aug 2022 06:48:30 +0000 (02:48 -0400)]
radeonsi: don't pass num_patches via derived_tess_state, pass it via si_context
This removes the parameter from si_emit_derived_tess_state and uses
si_context to pass it. This rework is needed for multi-mode draws
where num_patches will be needed much later.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Marek Olšák [Mon, 15 Aug 2022 06:56:57 +0000 (02:56 -0400)]
radeonsi/ci: add skips of tests not built on Linux
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18195>
Jason Ekstrand [Mon, 15 Aug 2022 14:29:11 +0000 (09:29 -0500)]
panfrost: Use util/bitpack_helpers.h
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062>
Jason Ekstrand [Mon, 15 Aug 2022 14:17:37 +0000 (09:17 -0500)]
asahi: Use util/bitpack_helpers.h
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062>
Jason Ekstrand [Mon, 15 Aug 2022 14:13:17 +0000 (09:13 -0500)]
util: Add util_bitpack_[su]fixed_clamp helpers
These clamp the value to the fixed-point range instead of asserting.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062>
Jason Ekstrand [Mon, 15 Aug 2022 14:07:02 +0000 (09:07 -0500)]
broadcom: Use util/bitpack_helpers.h
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062>
Jason Ekstrand [Mon, 15 Aug 2022 13:52:20 +0000 (08:52 -0500)]
util,intel: Pull the bit packing helpers from genxml to a common header
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18062>
Mike Blumenkrantz [Tue, 30 Aug 2022 00:03:23 +0000 (20:03 -0400)]
zink: defer all compute shader creation
with other various changes, this should enable the entirety of compute
shader creation to occur in the compile thread
it also enables (slightly) simplifying shader create by moving cube check
out to the caller
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Mon, 15 Aug 2022 16:57:08 +0000 (12:57 -0400)]
zink: add function to check whether a shader has cube samplers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 17:28:32 +0000 (13:28 -0400)]
zink: generate sha1 for compute programs
this got broken in the move to u_live_shader_cache, which does not
handle compute programs and thus does not populate the shader's sha1
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Mon, 15 Aug 2022 16:45:41 +0000 (12:45 -0400)]
zink: init fbfetch/bindless ctx stuff on shader create
deferring until later will be problematic for threads
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Mon, 15 Aug 2022 16:26:19 +0000 (12:26 -0400)]
zink: add a context pointer to zink_program struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Mon, 15 Aug 2022 16:21:19 +0000 (12:21 -0400)]
zink: add locking for descriptor layout caches
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:34:29 +0000 (11:34 -0400)]
zink: add partial async shader compile support
when compute shaders can be precompiled, they can be precompiled asynchronously
which allows the implementation of the parallel shader compile hooks
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:23:22 +0000 (11:23 -0400)]
zink: add precompilation for compute shaders
for compute shaders that don't need spec constants or cube lowering,
precompiles are possible and can be performed immediately after disk
cache lookup completes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Mon, 15 Aug 2022 17:18:58 +0000 (13:18 -0400)]
zink: move compute descriptor binds down in execution
this has to occur after the pipeline has been updated to account for
async compile
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:30:08 +0000 (11:30 -0400)]
zink: add a param to allow zink_screen_update_pipeline_cache to run directly
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:29:15 +0000 (11:29 -0400)]
zink: move compute pipeline cache update to caller
this is more flexible
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:20:18 +0000 (11:20 -0400)]
zink: track whether shader has cube samplers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:11:11 +0000 (11:11 -0400)]
zink: use different key comparison for local_size-using compute pipelines
this should be more correct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:09:06 +0000 (11:09 -0400)]
zink: stop zeroing local size if current compute doesn't use it
this just complicates things for later compute updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 14:25:08 +0000 (10:25 -0400)]
zink: remove use_local_size from compute pipeline state
this is redundant since pipeline state gets flagged on bind
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 15:00:02 +0000 (11:00 -0400)]
zink: don't add compute base pipeline to hash table
this is pointless since it has no lookup data
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 14:57:05 +0000 (10:57 -0400)]
zink: merge compute program hash table onto program struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 14:49:07 +0000 (10:49 -0400)]
zink: add a pipeline shortcut for basic compute programs
if there are no inline uniforms, nonseamless cubes, or local size use,
then this is the "base" pipeline object that can be reused without checking
the hash table
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 14:34:14 +0000 (10:34 -0400)]
zink: add param to allow cache_get jobs to run directly
this will be useful for precompiles
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 14:33:01 +0000 (10:33 -0400)]
zink: don't call util_queue_fence_init in zink_screen_get_pipeline_cache()
this might accidentally clobber existing jobs
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Fri, 12 Aug 2022 14:23:09 +0000 (10:23 -0400)]
zink: add use_local_size flag to compute programs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Thu, 11 Aug 2022 21:07:10 +0000 (17:07 -0400)]
zink: initialize cache_get_thread unconditionally
this can also be used for precompiles
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Thu, 11 Aug 2022 20:50:54 +0000 (16:50 -0400)]
zink: create compute programs from compute shaders directly
this simplifies the whole compute shader/program architecture and
also compiles compute shaders when apps maybe expect them to be compiled
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Thu, 11 Aug 2022 20:45:23 +0000 (16:45 -0400)]
zink: allow programs to solely manage descriptor deinit
now that there's no context access, this is perfectly safe and also much simpler
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Mike Blumenkrantz [Thu, 11 Aug 2022 20:44:50 +0000 (16:44 -0400)]
zink: use screen param for zink_descriptor_program_deinit
this better enables late destruction of programs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>
Marek Olšák [Tue, 30 Aug 2022 03:53:38 +0000 (23:53 -0400)]
ci: disable the freedreno farm.
It's busted.
Pushing directly. There are 6 MRs in the Marge queue and we don't have that
kind of time to wait for them to time out.
Acked-by: Rob Clark on IRC
Tatsuyuki Ishi [Sun, 28 Aug 2022 13:13:04 +0000 (22:13 +0900)]
radv,lvp,anv: Delete pre-common dispatch leftover.
These functions are no longer used since the introduction of common
dispatch.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>
Tatsuyuki Ishi [Sun, 28 Aug 2022 13:06:36 +0000 (22:06 +0900)]
radv: Remove unused radv_deferred_queue_submission.
Has been stale since the common sync migration.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>
Tatsuyuki Ishi [Sat, 27 Aug 2022 09:27:42 +0000 (18:27 +0900)]
radv: Remove unused functions.
Grep shows no usage.
Found by manual inspection.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>
Marek Olšák [Wed, 17 Aug 2022 15:56:21 +0000 (11:56 -0400)]
winsys/amdgpu: use cached GTT for command buffers and don't set the 32BIT flag
This improves performance a lot in a few viewperf tests.
The 32-bit flag was unnecessary.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18170>
Adam Jackson [Tue, 16 Aug 2022 01:46:19 +0000 (21:46 -0400)]
egl: Remove some can't-happen supported API checks
The only other thing this could be is OpenVG, which we never create.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18128>
Sil Vilerino [Mon, 29 Aug 2022 16:43:03 +0000 (12:43 -0400)]
d3d12: Implement cap PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
Reports d3d12 support for mapping all the contiguous planes.
This will be used by vaDeriveImage in the VA frontend
Fixes:
a585d95803ca38d42b893603a85bf6442a54838a ("radeonsi/vcn: WA 10bit encoding crash in vaapi")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>
Sil Vilerino [Mon, 29 Aug 2022 16:42:41 +0000 (12:42 -0400)]
gallium/va: vaDeriveImage to check PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
vaDeriveImage should check if the underlying gallium driver can map contiguous planes
before skipping with disallowlist.
Fixes:
a585d95803ca38d42b893603a85bf6442a54838a ("radeonsi/vcn: WA 10bit encoding crash in vaapi")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>
Samuel Pitoiset [Thu, 25 Aug 2022 09:01:43 +0000 (11:01 +0200)]
radv: emit the guardband state separately from the scissor state
Only re-emit the scissor state if viewports or scissors change, and
only re-emit the guardband state if viewports, line width or the
current rasterized primitive change.
This should reduce the number of emitted packets when only the line
width or the rasterized primitive change.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18247>
Samuel Pitoiset [Thu, 25 Aug 2022 08:46:51 +0000 (10:46 +0200)]
radv: rework dirtying scissors when the line width changes
The guardband state (part of scissors) needs to be re-emitted when
the line width changes. Given this is a dynamic state, it's not
necessary to look at the pipeline line width.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18247>