Commit Graph

112 Commits

Author SHA1 Message Date
Rajnesh Kanwal eacf944e52 pvr: Implement vkCreateSampler and vkDestroySampler APIs.
Implements vkCreateSampler and vkDestroySampler APIs.

Also fixes maxSamplerLodBias value from 15.0f to 16.0f
as it's the max supported by our hardware.

Also changing maxSamplerAnisotropy from 16.0f to 1.0f to
temporarily disable anisotropy as we are missing software
support for it.

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/15557>
2022-03-25 12:12:08 +00:00
Boris Brezillon 81ba3ab5d9 pvr: Stop using VK_OUTARRAY_MAKE()
We're trying to replace VK_OUTARRAY_MAKE() by VK_OUTARRAY_MAKE_TYPED()
so people don't get tempted to use it and make things incompatible with
MSVC (which doesn't support typeof()).

Suggested-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15522>
2022-03-25 11:00:02 +00:00
Matt Coster 97c4ce44e9 pvr: Gate offline compiler build behind -Dtools=imagination
This matches the behavior of e.g. panfrost's bifrost_compiler target.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15284>
2022-03-24 11:39:39 +00:00
Erik Faye-Lund 3b6ceea3e6 pvr: do not use fallthrough for unreachable code
unreachable() doesn't lead to executing the code that follows it,
neither in debug nor release builds. So falling through doesn't make any
sense.

This fixes a compile-error on clang.

Let's move the default-block to the end to make it clearer that there's
no intended fallthrough.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15531>
2022-03-24 11:25:45 +00:00
Erik Faye-Lund 54c7a245ca pvr: do not use fallthrough for unreachable code
unreachable() doesn't lead to executing the code that follows it,
neither in debug nor release builds. So falling through doesn't make any
sense.

This fixes a compile-error on clang.

Let's move the default-block to the end to make it clearer that there's
no intended fallthrough.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15531>
2022-03-24 11:25:45 +00:00
Erik Faye-Lund 80a2974826 pvr: zero-initialize variable
Because of incomplete codepaths further down in this function, we end up
trying to use this variable without initialization. Let's initialize it
to zero, just to keep the compiler happy.

This avoids a compile-time warning, which would get treated as an error
on CI.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15525>
2022-03-23 16:49:14 +00:00
Erik Faye-Lund fd7203ce80 pvr: use a helper to translate stencil-ops
This gives us a single place to handle the conversion, and fixes a
compilation warning by adding an explicit cast.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15525>
2022-03-23 16:49:14 +00:00
Erik Faye-Lund cc171840ff pvr: use a helper to translate compare-ops
This gives us a single place to handle the conversion, and fixes a
compilation warning by adding an explicit cast.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15525>
2022-03-23 16:49:14 +00:00
Erik Faye-Lund a9eddf9edc pvr: fixup typos when allocating object
These objects should have been allocated with
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT as the last argument, not the specific
object type.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15521>
2022-03-23 14:17:34 +01:00
Erik Faye-Lund abf995b1da pvr: use zloadformat instead of zstoreformat
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15521>
2022-03-23 14:17:34 +01:00
Thomas H.P. Andersen 8138086889 pvr: fix overlapping comparison
The comparison here will always be true. This changes it so
height is only set if the type is not a 1D.

Fixes a warning with clang

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15514>
2022-03-23 13:04:38 +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