* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
-* @file gen_formats.cpp
+* @file formats.cpp
*
* @brief auto-generated file
*
{ 0.0f, 0.0f, 0.0f, 0.0f },
1, 1
},
- // R10G10B10_FLOAT_A2_UNORM (0xD5)
+ // padding (0xD5)
{
- "R10G10B10_FLOAT_A2_UNORM",
- { SWR_TYPE_FLOAT, SWR_TYPE_FLOAT, SWR_TYPE_FLOAT, SWR_TYPE_FLOAT },
- { 0, 0, 0, 0x3f800000 }, // Defaults for missing components
- { 0, 1, 2, 3 }, // Swizzle
- { 10, 10, 10, 2 }, // Bits per component
- 32, // Bits per element
- 4, // Bytes per element
- 4, // Num components
- false, // isSRGB
- false, // isBC
- false, // isSubsampled
- false, // isLuminance
- { false, false, false, false }, // Is normalized?
- { 1.0f, 1.0f, 1.0f, 1.0f }, // To float scale factor
- 1, // bcWidth
- 1, // bcHeight
+ nullptr,
+ { SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN },
+ { 0, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 },
+ 0, 0, 0, false, false, false, false,
+ { false, false, false, false },
+ { 0.0f, 0.0f, 0.0f, 0.0f },
+ 1, 1
},
-
// R32_SINT (0xD6)
{
"R32_SINT",
{ 0.0f, 0.0f, 0.0f, 0.0f },
1, 1
},
- // padding (0x180)
+ // DXT1_RGB_SRGB (0x180)
{
- nullptr,
- { SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN },
- { 0, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 },
- 0, 0, 0, false, false, false, false,
- { false, false, false, false },
- { 0.0f, 0.0f, 0.0f, 0.0f },
- 1, 1
+ "DXT1_RGB_SRGB",
+ { SWR_TYPE_UNORM, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN },
+ { 0, 0, 0, 0x3f800000 }, // Defaults for missing components
+ { 0, 1, 2, 3 }, // Swizzle
+ { 8, 8, 8, 8 }, // Bits per component
+ 64, // Bits per element
+ 8, // Bytes per element
+ 1, // Num components
+ false, // isSRGB
+ true, // isBC
+ false, // isSubsampled
+ false, // isLuminance
+ { true, false, false, false }, // Is normalized?
+ { 1.0f / 255.0f, 0, 0, 0 }, // To float scale factor
+ 4, // bcWidth
+ 4, // bcHeight
},
+
// padding (0x181)
{
nullptr,
{ 0.0f, 0.0f, 0.0f, 0.0f },
1, 1
},
- // padding (0x191)
+ // DXT1_RGB (0x191)
{
- nullptr,
- { SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN },
- { 0, 0, 0, 0 },{ 0, 0, 0, 0 },{ 0, 0, 0, 0 },
- 0, 0, 0, false, false, false, false,
- { false, false, false, false },
- { 0.0f, 0.0f, 0.0f, 0.0f },
- 1, 1
+ "DXT1_RGB",
+ { SWR_TYPE_UNORM, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN, SWR_TYPE_UNKNOWN },
+ { 0, 0, 0, 0x3f800000 }, // Defaults for missing components
+ { 0, 1, 2, 3 }, // Swizzle
+ { 8, 8, 8, 8 }, // Bits per component
+ 64, // Bits per element
+ 8, // Bytes per element
+ 1, // Num components
+ false, // isSRGB
+ true, // isBC
+ false, // isSubsampled
+ false, // isLuminance
+ { true, false, false, false }, // Is normalized?
+ { 1.0f / 255.0f, 0, 0, 0 }, // To float scale factor
+ 4, // bcWidth
+ 4, // bcHeight
},
+
// padding (0x192)
{
nullptr,
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
-* @file gen_format_traits.h
+* @file format_traits.h
*
* @brief Format Traits. auto-generated file
*
typedef Format1<8> FormatT;
};
+//////////////////////////////////////////////////////////////////////////
+/// FormatTraits<DXT1_RGB_SRGB> - Format traits specialization for DXT1_RGB_SRGB
+//////////////////////////////////////////////////////////////////////////
+template<> struct FormatTraits<DXT1_RGB_SRGB> :
+ ComponentTraits<SWR_TYPE_UNORM, 8>,
+ FormatSwizzle<0>,
+ Defaults<0, 0, 0, 0x3f800000>
+{
+ static const uint32_t bpp{ 64 };
+ static const uint32_t numComps{ 1 };
+ static const bool hasAlpha{ true };
+ static const uint32_t alphaComp{ 3 };
+ static const bool isSRGB{ false };
+ static const bool isBC{ true };
+ static const bool isSubsampled{ false };
+ static const uint32_t bcWidth{ 4 };
+ static const uint32_t bcHeight{ 4 };
+
+ typedef TransposeSingleComponent<8> TransposeT;
+ typedef Format1<8> FormatT;
+};
+
//////////////////////////////////////////////////////////////////////////
/// FormatTraits<YCRCB_SWAPUVY> - Format traits specialization for YCRCB_SWAPUVY
//////////////////////////////////////////////////////////////////////////
typedef Format4<8, 8, 8, 8> FormatT;
};
+//////////////////////////////////////////////////////////////////////////
+/// FormatTraits<DXT1_RGB> - Format traits specialization for DXT1_RGB
+//////////////////////////////////////////////////////////////////////////
+template<> struct FormatTraits<DXT1_RGB> :
+ ComponentTraits<SWR_TYPE_UNORM, 8>,
+ FormatSwizzle<0>,
+ Defaults<0, 0, 0, 0x3f800000>
+{
+ static const uint32_t bpp{ 64 };
+ static const uint32_t numComps{ 1 };
+ static const bool hasAlpha{ true };
+ static const uint32_t alphaComp{ 3 };
+ static const bool isSRGB{ false };
+ static const bool isBC{ true };
+ static const bool isSubsampled{ false };
+ static const uint32_t bcWidth{ 4 };
+ static const uint32_t bcHeight{ 4 };
+
+ typedef TransposeSingleComponent<8> TransposeT;
+ typedef Format1<8> FormatT;
+};
+
//////////////////////////////////////////////////////////////////////////
/// FormatTraits<R8G8B8_UNORM> - Format traits specialization for R8G8B8_UNORM
//////////////////////////////////////////////////////////////////////////