@@ -79,7 +79,7 @@ static constexpr unsigned int BLOCK_MAX_PARTITIONINGS { 1024 };
7979static constexpr unsigned int BLOCK_MAX_TEXELS { 216 };
8080
8181/* * @brief The maximum number of weights used during partition selection for texel clustering. */
82- static constexpr unsigned int BLOCK_MAX_KMEANS_TEXELS { 64 };
82+ static constexpr uint8_t BLOCK_MAX_KMEANS_TEXELS { 64 };
8383
8484/* * @brief The maximum number of weights a block can support. */
8585static constexpr unsigned int BLOCK_MAX_WEIGHTS { 64 };
@@ -514,8 +514,8 @@ struct decimation_info
514514 */
515515struct block_mode
516516{
517- int16_t mode_index;
518- int8_t decimation_mode;
517+ uint16_t mode_index;
518+ uint8_t decimation_mode;
519519 uint8_t quant_mode;
520520 uint8_t is_dual_plane : 1 ;
521521 uint8_t percentile_hit : 1 ;
@@ -560,44 +560,41 @@ struct decimation_mode
560560struct block_size_descriptor
561561{
562562 /* * @brief The block X dimension, in texels. */
563- unsigned int xdim;
563+ uint8_t xdim;
564564
565565 /* * @brief The block Y dimension, in texels. */
566- unsigned int ydim;
566+ uint8_t ydim;
567567
568568 /* * @brief The block Z dimension, in texels. */
569- unsigned int zdim;
569+ uint8_t zdim;
570570
571571 /* * @brief The block total texel count. */
572- unsigned int texel_count;
572+ uint8_t texel_count;
573573
574574 /* * @brief The number of stored decimation modes. */
575575 unsigned int decimation_mode_count;
576576
577+ /* * @brief The number of stored block modes. */
578+ unsigned int block_mode_count;
579+
577580 /* * @brief The active decimation modes, stored in low indices. */
578581 decimation_mode decimation_modes[WEIGHTS_MAX_DECIMATION_MODES];
579582
580583 /* * @brief The active decimation tables, stored in low indices. */
581584 const decimation_info *decimation_tables[WEIGHTS_MAX_DECIMATION_MODES];
582585
583- /* * @brief The number of stored block modes. */
584- unsigned int block_mode_count;
585-
586586 /* * @brief The packed block mode array index, or @c BLOCK_BAD_BLOCK_MODE if not active. */
587587 uint16_t block_mode_packed_index[WEIGHTS_MAX_BLOCK_MODES];
588588
589589 /* * @brief The active block modes, stored in low indices. */
590590 block_mode block_modes[WEIGHTS_MAX_BLOCK_MODES];
591591
592- /* * @brief The texel count for k-means partition selection. */
593- unsigned int kmeans_texel_count;
594-
595- /* * @brief The active texels for k-means partition selection. */
596- unsigned int kmeans_texels[BLOCK_MAX_KMEANS_TEXELS];
597-
598592 /* * @brief The partion tables for all of the possible partitions. */
599593 partition_info partitions[(3 * BLOCK_MAX_PARTITIONINGS) + 1 ];
600594
595+ /* * @brief The active texels for k-means partition selection. */
596+ uint8_t kmeans_texels[BLOCK_MAX_KMEANS_TEXELS];
597+
601598 /* *
602599 * @brief Get the block mode structure for index @c block_mode.
603600 *
0 commit comments