This commit is contained in:
Бранимир Караџић
2024-12-07 22:49:58 -08:00
parent 0d1c78e779
commit b7130927db
2 changed files with 6 additions and 6 deletions

View File

@@ -122,7 +122,7 @@ namespace bimg
{ 32, 1, 1, 4, 1, 1, 32, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Float) }, // D32F { 32, 1, 1, 4, 1, 1, 32, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Float) }, // D32F
{ 8, 1, 1, 1, 1, 1, 0, 8, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // D0S8 { 8, 1, 1, 1, 1, 1, 0, 8, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // D0S8
}; };
BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_imageBlockInfo) ); static_assert(TextureFormat::Count == BX_COUNTOF(s_imageBlockInfo) );
static const char* s_textureFormatName[] = static const char* s_textureFormatName[] =
{ {
@@ -223,7 +223,7 @@ namespace bimg
"D32F", // D32F "D32F", // D32F
"D0S8", // D0S8 "D0S8", // D0S8
}; };
BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormatName) ); static_assert(TextureFormat::Count == BX_COUNTOF(s_textureFormatName) );
bool isCompressed(TextureFormat::Enum _format) bool isCompressed(TextureFormat::Enum _format)
{ {
@@ -1156,7 +1156,7 @@ namespace bimg
{ bx::packR32F, bx::unpackR32F }, // D32F { bx::packR32F, bx::unpackR32F }, // D32F
{ bx::packR8, bx::unpackR8 }, // D0S8 { bx::packR8, bx::unpackR8 }, // D0S8
}; };
BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_packUnpack) ); static_assert(TextureFormat::Count == BX_COUNTOF(s_packUnpack) );
PackFn getPack(TextureFormat::Enum _format) PackFn getPack(TextureFormat::Enum _format)
{ {
@@ -4124,7 +4124,7 @@ namespace bimg
{ KTX_RGB10_A2, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_INT_2_10_10_10_REV, }, // RGB10A2 { KTX_RGB10_A2, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_INT_2_10_10_10_REV, }, // RGB10A2
{ KTX_R11F_G11F_B10F, KTX_ZERO, KTX_RGB, KTX_UNSIGNED_INT_10F_11F_11F_REV, }, // RG11B10F { KTX_R11F_G11F_B10F, KTX_ZERO, KTX_RGB, KTX_UNSIGNED_INT_10F_11F_11F_REV, }, // RG11B10F
}; };
BX_STATIC_ASSERT(TextureFormat::UnknownDepth == BX_COUNTOF(s_translateKtxFormat) ); static_assert(TextureFormat::UnknownDepth == BX_COUNTOF(s_translateKtxFormat) );
struct KtxFormatInfo2 struct KtxFormatInfo2
{ {

View File

@@ -39,7 +39,7 @@ namespace bimg
squish::kColourIterativeClusterFit, // Highest squish::kColourIterativeClusterFit, // Highest
squish::kColourRangeFit, // Fastest squish::kColourRangeFit, // Fastest
}; };
BX_STATIC_ASSERT(Quality::Count == BX_COUNTOF(s_squishQuality) ); static_assert(Quality::Count == BX_COUNTOF(s_squishQuality) );
static const float s_astcQuality[] = static const float s_astcQuality[] =
{ {
@@ -52,7 +52,7 @@ namespace bimg
ASTCENC_PRE_THOROUGH, // Highest ASTCENC_PRE_THOROUGH, // Highest
ASTCENC_PRE_FAST, // Fastest ASTCENC_PRE_FAST, // Fastest
}; };
BX_STATIC_ASSERT(Quality::Count == BX_COUNTOF(s_astcQuality) ); static_assert(Quality::Count == BX_COUNTOF(s_astcQuality) );
void imageEncodeFromRgba8(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, Quality::Enum _quality, bx::Error* _err) void imageEncodeFromRgba8(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, Quality::Enum _quality, bx::Error* _err)
{ {