Commit Graph

16 Commits

Author SHA1 Message Date
Karmjit Mahil b92c40d40a pvr: Add IDF/WDF program for compute pipeline barrier.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17683>
2022-07-29 11:37:05 +00:00
Matt Coster 29a7d924c7 pvr: csbgen: Make all generated enums unambiguous
This change involves two enums:
 * rogue_texstate.xml: All COMPRESSED_* members of FORMAT are moved
   to FORMAT_COMPRESSED (without the prefix). A second field is added
   to IMAGE_WORD0 (texformat_compressed) which overlaps with the
   original (texformat), and
 * rogue_pbestate.xml: REG_WORD0_LINESTRIDE was not a real enum; it's
   removed entirely. It only has value when feature
   pbe_stride_align_1pixel is present, so a FIXME comment was added to
   this effect.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17204>
2022-06-23 15:21:17 +00:00
Matt Coster 7c615b4103 pvr: csbgen: Add *_unpack() functions for all generated struct types
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 4c0941f0d4 pvr: csbgen: Fix "local variable may be undefined" lints
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 9f8556a44a pvr: csbgen: Replace map() and filter() with list comprehension
Guido originally wanted to drop these (along with reduce()) in 3.0, but
compromised to just recommending list comprehension instead [1].

[1]: https://www.artima.com/weblogs/viewpost.jsp?thread=98196

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 2285ddc720 pvr: csbgen: Isolate "main" function with __name__ check
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster a8b80c610b pvr: csbgen: Add typing information
This is generally PEP-484 stuff, but there is one functional change.
The base class Node needed to have an add() method to allow typed
dynamic dispatch. This could have been decorated @abstractmethod, but
that would require an error-raising implementation on all leaf-type
nodes. Instead, I added a base implementation that just errors out with
information from the subclass instance.

As a simple optimization, subclass implementations of add() (instead of
raising the same (or similar) error) now call super().add() in the
case of invalid child nodes.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster f2de3716d8 pvr: csbgen: Remove unused function parameters
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 14ca712362 pvr: csbgen: Remove "dim" functionality from Group
This allowed for nested groups rendered as arrays. Support for this had
mostly been removed already; this removes the additional value to make
typing easier.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 6961c31938 pvr: csbgen: Cleanup imports
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 34a76ec4e6 pvr: csbgen: Make some loops more pythonic
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster b813ca5d3b pvr: csbgen: Add a missing @staticmethod decorator
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Matt Coster 89d6a1cfe4 pvr: csbgen: Formatting pass (PEP-8 plus other minor changes)
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884>
2022-06-08 09:13:22 +00:00
Rajnesh Kanwal 4b6c18fea8 pvr: Fix ISP_RENDER_MODE_TYPE enum in rogue_cr.xml
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/16897>
2022-06-07 14:55:10 +01:00
Karmjit Mahil f7ddd584ab pvr: Implement vkCreateQueryPool() and vkDestroyQueryPool().
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/15880>
2022-04-13 17:58:03 +00:00
Frank Binns 8991e64641 pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs
Co-authored-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Co-authored-by: Alexander Wasey <Alexander.Wasey@imgtec.com>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Alexander Wasey <Alexander.Wasey@imgtec.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243>
2022-03-22 15:04:55 +00:00