Mesa (main): pvr: Remove vk_format_is_pure_integer and use common helper.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 14:02:37 UTC 2022
Module: Mesa
Branch: main
Commit: 0c3c1a8be42819f89fc0abfe352d7d4e61567896
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c3c1a8be42819f89fc0abfe352d7d4e61567896
Author: Rajnesh Kanwal <rajnesh.kanwal at imgtec.com>
Date: Mon May 16 14:45:31 2022 +0100
pvr: Remove vk_format_is_pure_integer and use common helper.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal at imgtec.com>
Reviewed-by: Frank Binns <frank.binns at imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
---
src/imagination/vulkan/pvr_formats.c | 2 +-
src/imagination/vulkan/pvr_job_common.c | 2 +-
src/imagination/vulkan/vk_format.h | 6 ------
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/imagination/vulkan/pvr_formats.c b/src/imagination/vulkan/pvr_formats.c
index 49ea9f14485..d18f169abf8 100644
--- a/src/imagination/vulkan/pvr_formats.c
+++ b/src/imagination/vulkan/pvr_formats.c
@@ -314,7 +314,7 @@ unsupported:
bool pvr_format_is_pbe_downscalable(VkFormat vk_format)
{
- if (vk_format_is_pure_integer(vk_format)) {
+ if (vk_format_is_int(vk_format)) {
/* PBE downscale behavior for integer formats does not match Vulkan
* spec. Vulkan requires a single sample to be chosen instead of
* taking the average sample color.
diff --git a/src/imagination/vulkan/pvr_job_common.c b/src/imagination/vulkan/pvr_job_common.c
index 4ca0b5c484d..b8ed5266674 100644
--- a/src/imagination/vulkan/pvr_job_common.c
+++ b/src/imagination/vulkan/pvr_job_common.c
@@ -74,7 +74,7 @@ void pvr_pbe_get_src_format_and_gamma(VkFormat vk_format,
*gamma_out = default_gamma;
if (vk_format_has_32bit_component(vk_format) ||
- vk_format_is_pure_integer(vk_format)) {
+ vk_format_is_int(vk_format)) {
*src_format_out = PVRX(PBESTATE_SOURCE_FORMAT_8_PER_CHANNEL);
} else if (vk_format_is_float(vk_format)) {
*src_format_out = PVRX(PBESTATE_SOURCE_FORMAT_F16_PER_CHANNEL);
diff --git a/src/imagination/vulkan/vk_format.h b/src/imagination/vulkan/vk_format.h
index 5aa5e36f8d6..6c351dc7513 100644
--- a/src/imagination/vulkan/vk_format.h
+++ b/src/imagination/vulkan/vk_format.h
@@ -55,12 +55,6 @@ vk_format_is_alpha_on_msb(VkFormat vk_format)
#endif
}
-static inline bool
-vk_format_is_pure_integer(VkFormat vk_format)
-{
- return util_format_is_pure_integer(vk_format_to_pipe_format(vk_format));
-}
-
static inline uint
vk_format_get_channel_width(VkFormat vk_format, uint32_t channel)
{
More information about the mesa-commit
mailing list