mirror of
https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
synced 2025-06-01 09:27:54 +00:00
formats: Remove vkuFormatElementIsTexel
This commit is contained in:
parent
7b23ba7a5f
commit
249718532d
3 changed files with 4 additions and 36 deletions
|
@ -270,9 +270,6 @@ inline VkExtent3D vkuFormatTexelBlockExtent(VkFormat format);
|
|||
// Returns the Compatibility Class of a VkFormat as defined by the spec
|
||||
inline enum VKU_FORMAT_COMPATIBILITY_CLASS vkuFormatCompatibilityClass(VkFormat format);
|
||||
|
||||
// Return true if a VkFormat is 'normal', with one texel per format element
|
||||
inline bool vkuFormatElementIsTexel(VkFormat format);
|
||||
|
||||
// Return size, in bytes, of one element of a VkFormat
|
||||
// Format must not be a depth, stencil, or multiplane format
|
||||
inline uint32_t vkuFormatElementSize(VkFormat format);
|
||||
|
@ -2039,14 +2036,6 @@ inline VkExtent3D vkuFormatTexelBlockExtent(VkFormat format) { return vkuGetForm
|
|||
|
||||
inline enum VKU_FORMAT_COMPATIBILITY_CLASS vkuFormatCompatibilityClass(VkFormat format) { return vkuGetFormatInfo(format).compatibility; }
|
||||
|
||||
inline bool vkuFormatElementIsTexel(VkFormat format) {
|
||||
if (vkuFormatIsPacked(format) || vkuFormatIsCompressed(format) || vkuFormatIsSinglePlane_422(format) || vkuFormatIsMultiplane(format)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline uint32_t vkuFormatElementSize(VkFormat format) {
|
||||
return vkuFormatElementSizeWithAspect(format, VK_IMAGE_ASPECT_COLOR_BIT);
|
||||
}
|
||||
|
|
|
@ -216,9 +216,6 @@ inline VkExtent3D vkuFormatTexelBlockExtent(VkFormat format);
|
|||
// Returns the Compatibility Class of a VkFormat as defined by the spec
|
||||
inline enum VKU_FORMAT_COMPATIBILITY_CLASS vkuFormatCompatibilityClass(VkFormat format);
|
||||
|
||||
// Return true if a VkFormat is 'normal', with one texel per format element
|
||||
inline bool vkuFormatElementIsTexel(VkFormat format);
|
||||
|
||||
// Return size, in bytes, of one element of a VkFormat
|
||||
// Format must not be a depth, stencil, or multiplane format
|
||||
inline uint32_t vkuFormatElementSize(VkFormat format);
|
||||
|
@ -563,14 +560,6 @@ inline VkExtent3D vkuFormatTexelBlockExtent(VkFormat format) { return vkuGetForm
|
|||
|
||||
inline enum VKU_FORMAT_COMPATIBILITY_CLASS vkuFormatCompatibilityClass(VkFormat format) { return vkuGetFormatInfo(format).compatibility; }
|
||||
|
||||
inline bool vkuFormatElementIsTexel(VkFormat format) {
|
||||
if (vkuFormatIsPacked(format) || vkuFormatIsCompressed(format) || vkuFormatIsSinglePlane_422(format) || vkuFormatIsMultiplane(format)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
inline uint32_t vkuFormatElementSize(VkFormat format) {
|
||||
return vkuFormatElementSizeWithAspect(format, VK_IMAGE_ASPECT_COLOR_BIT);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright 2023 The Khronos Group Inc.
|
||||
// Copyright 2023 Valve Corporation
|
||||
// Copyright 2023 LunarG, Inc.
|
||||
// Copyright 2023-2025 The Khronos Group Inc.
|
||||
// Copyright 2023-2025 Valve Corporation
|
||||
// Copyright 2023-2025 LunarG, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
@ -503,17 +503,7 @@ TEST(format_utils, vkuFormatCompatibilityClass) {
|
|||
}
|
||||
}
|
||||
}
|
||||
TEST(format_utils, vkuFormatElementIsTexel) {
|
||||
constexpr auto formats = magic_enum::enum_values<VkFormat>();
|
||||
for (auto format : formats) {
|
||||
if (!(vkuFormatIsPacked(format) || vkuFormatIsCompressed(format) || vkuFormatIsSinglePlane_422(format) ||
|
||||
vkuFormatIsMultiplane(format))) {
|
||||
EXPECT_TRUE(vkuFormatElementIsTexel(format));
|
||||
} else {
|
||||
EXPECT_FALSE(vkuFormatElementIsTexel(format));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST(format_utils, vkuFormatElementSizeWithAspect) {
|
||||
EXPECT_EQ(vkuFormatElementSizeWithAspect(VK_FORMAT_R64G64_SFLOAT, VK_IMAGE_ASPECT_NONE), 16u);
|
||||
EXPECT_EQ(vkuFormatElementSizeWithAspect(VK_FORMAT_R64G64_SFLOAT, VK_IMAGE_ASPECT_STENCIL_BIT), 0u);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue