@@ -186,6 +186,7 @@ namespace Anvil
186186 * via get_format_component_layout(). This is especially important in the context of packed formats.
187187 *
188188 * @param in_format Vulkan format to use for the query.
189+ * @param in_aspect Image aspect to use for the query.
189190 * @param out_channel0_bits_ptr Deref will be set to the number of bits used for channel 0. Must
190191 * not be nullptr.
191192 * @param out_channel1_bits_ptr Deref will be set to the number of bits used for channel 1. Must
@@ -202,6 +203,31 @@ namespace Anvil
202203 uint32_t * out_channel2_bits_ptr,
203204 uint32_t * out_channel3_bits_ptr);
204205
206+ /* * Tells the number of bits unused for each component in case of Vulkan format specified
207+ * under @param in_format at subresource @param in_aspect.
208+ *
209+ * NOTE: Only YUV KHR fromats are supported.
210+ * NOTE: Number of bits reported for each component uses ordering as reported for the format
211+ * via get_format_component_layout(). This is especially important in the context of packed formats.
212+ *
213+ * @param in_format Vulkan format to use for the query.
214+ * @param in_aspect Image aspect to use for the query.
215+ * @param out_channel0_unused_bits_ptr Deref will be set to the number of bits unused for channel 0. Must
216+ * not be nullptr.
217+ * @param out_channel1_unused_bits_ptr Deref will be set to the number of bits unused for channel 1. Must
218+ * not be nullptr.
219+ * @param out_channel2_unused_bits_ptr Deref will be set to the number of bits unused for channel 2. Must
220+ * not be nullptr.
221+ * @param out_channel3_unused_bits_ptr Deref will be set to the number of bits unused for channel 3. Must
222+ * not be nullptr.
223+ */
224+ static void get_format_n_unused_component_bits (Anvil::Format in_format,
225+ Anvil::ImageAspectFlagBits in_aspect,
226+ uint32_t * out_channel0_unused_bits_ptr,
227+ uint32_t * out_channel1_unused_bits_ptr,
228+ uint32_t * out_channel2_unused_bits_ptr,
229+ uint32_t * out_channel3_unused_bits_ptr);
230+
205231 /* Returns a raw C string for specified format, or NULL if the format is unknown. */
206232 static const char * get_format_name (Anvil::Format in_format);
207233
0 commit comments