Commit graph

1411 commits

Author SHA1 Message Date
Erik Faye-Lund
c1e4c073cd pvr: limit hw-defs to rogue
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Because we are using these carefully picked HW-defs in common code here,
we need to set PVR_BUILD_ARCH_ROGUE first.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
13d12b33c0 pvr: make some winsys files multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
e762592bff pvr: build pvr_arch_*.c as a multi-arch sources
This will allow us to build this multiple times for different
architectures. For now, it only defines a single architecture, because
that's what we currently support. But this makes room for future
architectures, that will follow relatively soon.

Co-authored-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
346e365daa pvr: pass device-info to a few winsys functions
These will have to start knowing about the arch...

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
ba2c40cd03 pvr: use rogue-prefix for rogue-specific code
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
6ae6dd7db6 pvr: make blit/clear-code rogue-specific
For Volcanic, we're planning on on using vk_meta instead of these, so
let's mark them as rogue-only for now.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Erik Faye-Lund
e1064e57a7 pvr: only build pvr_dump_csb.c for rogue
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:05 +01:00
Ashish Chauhan
6b4577e12d pvr: prepare for multi-gen compilation
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 10:35:02 +01:00
Erik Faye-Lund
edca79bc41 pvr: prepare winsys files for multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
f473c5fa97 pvr: mark pvr_framebuffer.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
e11fac9f26 pvr: mark pvr_mrt.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
3d84905198 pvr: mark pvr_query_compute.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Ashish Chauhan
be52ea2af7 pvr: mark pvr_queue.c as multi-arch
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
d0d443abd7 pvr: mark pvr_sampler.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
921a04aac6 pvr: mark pvr_job_common.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
6bd378131a pvr: mark pvr_hw_pass.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Ashish Chauhan
949e41a664 pvr: split pvr_formats.c
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
0b97360139 pvr: split pvr_image.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
8c7f0ad749 pvr: mark pvr_job_context.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Ashish Chauhan
1f1a6cdadf pvr: split pvr_spm.c
Signed-off-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
8af73b5614 pvr: mark pvr_job_transfer.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
11f59c942e pvr: mark pvr_job_render.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
d07bf4b190 pvr: mark pvr_cmd_query.c as per-arch
This is riddled with per-arch details; this should all be per-arch I
think.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
bd9d87592e pvr: mark pvr_cmd_buffer.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
6e57d71c0a pvr: mark pvr_job_compute.c as per-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
eb56f9a200 pvr: mark pvr_tex_state.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
6c14ff34e8 pvr: mark pvr_pass.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:04 +01:00
Erik Faye-Lund
f789eb0d7d pvr: mark pvr_border.c as multi-arch
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
120a89e2a9 pvr: split pvr_descriptor_set.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
1facaaba69 pvr: split pvr_csb.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
2c828a8825 pvr: split pvr_device.c
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
b5400c8ddf pvr: factor out framebuffer-specific code
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
5c70230c49 pvr: factor out pvr_rt_dataset to separate module
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
9b3ab2c8cf pvr: factor out cmdbuf functions from pvr_query.c
These functions needs to be per-arch, so let's split them out.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
90f60b9b7e pvr: limit availability of HW defs
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
5b3c05006d pvr: store format-table in pvr_physical_device
This way we can look up in it without having to know what architecture
we're using.

Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
49d94897af pvr: add missing forward-decl
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Erik Faye-Lund
429e29ec42 pvr: add missing include
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38922>
2025-12-19 09:52:03 +01:00
Emma Anholt
059d301c79 nir: Drop the mode argument of nir_lower_vars_to_scratch().
It only makes sense for function temps, and that's the only way it's been
used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37245>
2025-12-17 19:50:28 +00:00
Icenowy Zheng
6bda88bfdb pvr: copy WSI can_present_on_device function from PanVK
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Both PVR and PanVK are drivers for generic embedded GPU IP cores, so
just take the can_present_on_device implementation from PanVK, which
allows any platform devices for presentation.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38985>
2025-12-17 14:53:39 +00:00
Alyssa Rosenzweig
079e9ae606 treewide: use BITSET_*_COUNT
Mix of Coccinelle patch, manual fix ups, sed, etc. Probably best to review the diff
as-if hand written:

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
Christian Gmeiner
b393518bdf treewide: Use wsi_common_is_swapchain_image() helper
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace the duplicated swapchain image detection pattern across all
Vulkan drivers with the new wsi_common_is_swapchain_image() helper.

Since the swapchain handle can be extracted from VkImageCreateInfo's
pNext chain inside wsi_common_create_swapchain_image(), remove the
now-redundant VkSwapchainKHR parameter from that function.

This removes the #ifdef guards for Android/WSI platforms from each
driver, as the helper now handles this uniformly.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38541>
2025-12-11 20:20:39 +00:00
Erik Faye-Lund
708d331a04 pvr: run clang-format
This fixes up a bunch of clang-format issues that was missed recently.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38886>
2025-12-11 19:07:40 +00:00
Erik Faye-Lund
306de6782c pvr: disable has_gs_rta_support for ge7800 as well
The MR adding support for ge7800 (!38211) was submitted while the MR
that disabled has_gs_rta_support (!38024) was under review. It seems
nobody noticed that we missed disabling it here as well.

Let's fix that up, so we don't try to use this when it's not expected to
work.

Fixes: c60232c0c5 ("pvr: temporarily disable gs_rta_support on all cores")
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38909>
2025-12-11 18:52:36 +00:00
Erik Faye-Lund
be7f39a519 pvr: rename colliding symbol
We already have a function called  pvr_render_targets_init() in
pvr_device.c. Having two symbols with the same name, even though they
both are static only leads to confusion.

So let's rename one of them to clear things up.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38888>
2025-12-11 15:40:47 +00:00
Erik Faye-Lund
8fa6aabb33 pvr: break out pvr_free_list into a separate module
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
17f99c870b pvr: replace constant-returning function with a macro
Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
745d576516 pvr: make queries arch-agnostic
The only HW-definition we depend on here is the occlusion query minimum
alignment. But this value doesn't differ per arch, so let's just make it
a global define for now.

This should probably have a better name and location. But AFAICT, this
applies to a lot in this header. So let's untangle this down the road
instead.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
70270348e8 pvr: fixup some includes
This just pre-emptively fixes up some includes that will bite us in the
future if not fixed.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00
Erik Faye-Lund
5dd76663a7 pvr: add helpers to query limits based on device-info
These are only implemented for Rogue so far, which is fine because
that's all we currently support. Once we add support for more
generations, these helpers need updating.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
2025-12-11 15:26:05 +00:00