@@ -80,14 +80,12 @@ class IImageView : public IDescriptor
80
80
struct SCreationParams
81
81
{
82
82
E_CREATE_FLAGS flags = static_cast <E_CREATE_FLAGS>(0 );
83
- #if 0
84
83
// These are the set of usages for this ImageView, they must be a subset of the usages that `image` was created with.
85
84
// If you leave it as the default NONE we'll inherit all usages from the `image`, setting it to anything else is
86
85
// ONLY useful when creating multiple views of an image created with EXTENDED_USAGE to use different view formats.
87
86
// Example: Create SRGB image with usage STORAGE, and two views with formats SRGB and R32_UINT. Then the SRGB view
88
87
// CANNOT have STORAGE usage because the format doesn't support it, but the R32_UINT can.
89
88
core::bitflag<IImage::E_USAGE_FLAGS> subUsages = EUF_NONE;
90
- #endif
91
89
core::smart_refctd_ptr<ImageType> image;
92
90
E_TYPE viewType;
93
91
E_FORMAT format;
@@ -111,11 +109,11 @@ class IImageView : public IDescriptor
111
109
if (imgParams.)
112
110
return false;
113
111
*/
114
- # if 0
112
+
115
113
// declared usages that are not a subset
116
114
if (!imgParams.usage .hasFlags (_params.subUsages ))
117
115
return false ;
118
- # endif
116
+
119
117
const bool mutableFormat = imgParams.flags .hasFlags (IImage::ECF_MUTABLE_FORMAT_BIT);
120
118
const bool blockTexelViewCompatible = imgParams.flags .hasFlags (IImage::ECF_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT);
121
119
const auto & subresourceRange = _params.subresourceRange ;
@@ -235,7 +233,7 @@ class IImageView : public IDescriptor
235
233
// https://registry.khronos.org/vulkan/specs/1.2/html/vkspec.html#VUID-VkImageViewCreateInfo-viewType-02962
236
234
if (actualLayerCount!=6u )
237
235
return false ;
238
- break ;
236
+ [[fallthrough]] ;
239
237
case ET_CUBE_MAP_ARRAY:
240
238
// https://registry.khronos.org/vulkan/specs/1.2/html/vkspec.html#VUID-VkImageViewCreateInfo-viewType-02961
241
239
// https://registry.khronos.org/vulkan/specs/1.2/html/vkspec.html#VUID-VkImageViewCreateInfo-viewType-02963
0 commit comments