Commit Graph

190924 Commits

Author SHA1 Message Date
Mary Guillemard
3119546508 panvk: Advertise VK_KHR_pipeline_library and VK_EXT_graphics_pipeline_library
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
f164819698 panvk: Advertise VK_EXT_shader_module_identifier
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
78605a4ac4 panvk: Advertise VK_EXT_pipeline_creation_cache_control and VK_EXT_pipeline_creation_feedback
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
8ea2931ed1 panvk: Generate proper device and driver UUIDs
This follows what NVK, ANV and V3DV does.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
886c054691 panvk: Advertise VK_KHR_pipeline_executable_properties
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
4dbc0feae2 panvk: Implement executable IR reporting
This report the NIR shader before sent to the back-end compiler and the
resulting assembly.

Caching when requested is disallowed for now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
7d582cc665 panfrost: Add pan_shader_disassemble
Will be used for pipeline executable IR on panvk.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:51 +00:00
Mary Guillemard
81f4e93f60 bi: Move bi_disasm definitions to their own header
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
3622a1bb0d midgard: Make disassembler take a const void*
All access are readonly.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
c309933987 bi: Make disassembler take a const void*
All access are readonly.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
1c2f2955ac pan/va: Ensure no clash with other defs in disassembler
This move most of the disassembler detail to disasm.py.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
7a4b3dcbd1 panvk: Remove panvk_pipeline
This removes panvk_pipeline and shader_create interface to switch
entirely to vk_shader.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
563823c9ca panvk: Implement vk_shader
Next commit will remove panvk_pipeline entirely.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
50925b4947 panvk: Move preprocess logic out of shader_create
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
2a88c30619 panvk: Move NIR lower logic out of shader_create
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
f3639f7900 panvk: Move compile logic out of shader_create
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
67341a8126 panvk: Link shaders at draw time
This moves the linking step at draw time so we can later support
VK_EXT_shader_module.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
a984419a2d panvk: Kill panvk_pipeline_shader and use panvk_shader directly
Copy the shader pointers and linking data attached to the pipeline
at bind time.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
05020699b9 panvk: Move the linking bits to panvk_shader
Needed if we support late linking which is required for
VK_EXT_shader_object.

We also stop pretending the linking is generic and reflect the fact we
always link vertex with fragment shaders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
9c39185e20 panvk: Upload render state in panvk_shader
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
384ebea7ac panvk: Upload copy tables in panvk_shader
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
d54592ec72 panvk: Upload shader in panvk_shader
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
b186220566 panvk: Keep panvk_shader alive in panvk_pipeline_shader
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
a0f49428fd panvk: Remove dynarray from panvk_shader
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Mary Guillemard
e8633b3b49 panvk: Remove panvk_lower_blend
It is unused, get ride of it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Boris Brezillon
2eaa437574 panvk: Use memory pools for internal GPU data attached to vulkan objects
Some panvk objects need to allocate GPU memory but don't have Pool
objects to get this memory from. Use device-wide mempools with
.owns_bos=false, such that small allocations don't have to pay the 4k
granularity price of private BO allocations.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Boris Brezillon
906fb2371a panvk: Prepare panvk_mempool for shared device memory pools
If we want to be able to allocate private device memory for small
objects and don't have a Pool to allocate from, we'd rather provide
some sort of device-wide heap to avoid the memory overhead incurred
by page-size BO granularity.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Boris Brezillon
7b017b1c97 panvk: Store private BOs in lists instead of dynarrays
This we don't get memory allocations in scopes where failures are not
supposed to happen, and this will also simplify things when we get to
implement memory pools at the device level.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Boris Brezillon
0e5140f88c panvk: Refcount private BOs
Will be needed if we want device memory pools.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29161>
2024-06-17 07:31:50 +00:00
Samuel Pitoiset
8fcfadf28e radv: store a pointer to the logical device in dgc_cmdbuf
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29725>
2024-06-17 06:45:44 +00:00
Samuel Pitoiset
7fb401c7b2 radv: add a helper to load the pipeline VA for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29725>
2024-06-17 06:45:44 +00:00
Samuel Pitoiset
57206eb888 radv: remove redundant nir_builder param in some DGC helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29725>
2024-06-17 06:45:44 +00:00
Samuel Pitoiset
7ff6f492d5 radv: add new macros for emiting packets in DGC
This is way cleaner.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29725>
2024-06-17 06:45:44 +00:00
Samuel Pitoiset
85d79376d8 radv: do not use nir_pkt3() when the packet len is constant with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29725>
2024-06-17 06:45:44 +00:00
Samuel Pitoiset
dd66e43bd9 radv: remove dynamic uniform/storage buffers support with DGC
vkd3d-proton is the only user of NV DGC and it doesn't need that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29726>
2024-06-17 06:13:57 +00:00
Alyssa Rosenzweig
fda97d6d0a asahi: be more clever about GS side effects
We need a heuristic for handling GS side effects in the least surprising way
possible. Upgrade our previous heuristic to a better one, moving more side
effects into the prepass from the rast shader. This is technically an optimization but mitigates VDM timeouts in absurd Vulkan CTS cases.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 12:15:22 -04:00
Alyssa Rosenzweig
dcdad4fecb asahi: implement robustness2 for msaa image stores
Same trick as for robustness2 buffer images.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 12:15:22 -04:00
Alyssa Rosenzweig
9a29d08f9f asahi: fix vbo clamp with stride=0
dEQP-VK.pipeline.monolithic.bind_buffers_2.single.stride_0_4_offset_0_0.count_1

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 12:15:22 -04:00
Alyssa Rosenzweig
38c36990b6 asahi: implement rba2 semantics for vbo
Different APIs have different robustness requirements for VBOs. Add a knob to
select the desired robustness so we can implement rba2 in honeykrisp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 12:15:22 -04:00
Alyssa Rosenzweig
d035976c00 libagx: generalize query copies
for xfb in hk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 12:15:22 -04:00
Alyssa Rosenzweig
4a71456a1a libagx: make index buffer fetch robust
for hk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 12:15:22 -04:00
Alyssa Rosenzweig
87f9fe3c58 libagx: fix uint8_t definition
yikes!

this was causing cascading fails with hk.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 10:10:33 -04:00
Alyssa Rosenzweig
88cdcd8f72 agx: fix fmin/fmax with (-0, 0) pair
We need additional lowering to handle negzero properly. fixes float_controls2
fails but strictly the bug was already present!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 10:10:33 -04:00
Alyssa Rosenzweig
ab21d179d6 agx: fix 64-bit bcsel ingestion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29742>
2024-06-16 10:01:46 -04:00
Jianxun Zhang
09277c7ea6 blorp: Fix offset when ambiguating MCS buffer (xe2)
The MCS region to ambiguate needs to shift 4KB from its
starting address. The first 4KB is reserved for hardware.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28919>
2024-06-15 14:57:59 +00:00
Jianxun Zhang
8aa0373a50 blorp: Scaledown rectangle of MSAA fast clear (xe2)
The scaledown rectangle of MSAA fast clear on Xe2 is 8 times
in X and 2 in Y dimension of previous platforms.

Absorb refactoring change suggested by
Nanley Chery <nanley.g.chery@intel.com>

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28919>
2024-06-15 14:57:59 +00:00
Jianxun Zhang
4b64b04963 isl: Add AUX MCS encoding into aux modes (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28919>
2024-06-15 14:57:59 +00:00
Jianxun Zhang
765fb3e158 isl: Add a heading 4KB to MCS surface (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28919>
2024-06-15 14:57:59 +00:00
Faith Ekstrand
f39520e02c nvk: Dirty cbufs in CmdPushDescriptorSetWithTemplate2KHR
Fixes: 091a945b57 ("nvk: Be much more conservative about rebinding cbufs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29737>
2024-06-15 06:14:28 +00:00
Faith Ekstrand
81e6c612f1 nvk: Use NVK_VK_GRAPHICS_STAGE_BITS in dirty_cbufs_for_descriprots()
This is a no-op change for now but it'll be a problem when we hook up
task/mesh if we don't consider those to be graphics stages.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29737>
2024-06-15 06:14:28 +00:00