mirror of https://github.com/mosra/magnum.git
Browse Source
Instead of prefixing every value with (Compressed)PixelFormat::,
printing that just once. Also moved the name table to an external header
so it can be used later for configuration value parsing. Compared to
the previous commit, Bloaty reports a save, meaning these two commits in
total save about 4 kB:
VM SIZE FILE SIZE
-------------- --------------
+687% +3.70Ki .rela.dyn +3.70Ki +687%
+15e2% +1.26Ki .data.rel.ro +1.26Ki +15e2%
[ = ] 0 .strtab +100 +0.1%
[ = ] 0 .symtab +48 +0.2%
-50.0% -8 [LOAD [RW]] -8 -50.0%
-3.1% -888 .eh_frame -888 -3.1%
-1.5% -1.92Ki .text -1.92Ki -1.5%
[ = ] 0 [Unmapped] -1.97Ki -32.2%
-38.5% -4.19Ki .rodata -4.19Ki -38.5%
-0.7% -2.02Ki TOTAL -3.85Ki -1.0%
pull/388/head
4 changed files with 201 additions and 227 deletions
@ -0,0 +1,80 @@
|
||||
/*
|
||||
This file is part of Magnum. |
||||
|
||||
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 |
||||
Vladimír Vondruš <mosra@centrum.cz> |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a |
||||
copy of this software and associated documentation files (the "Software"), |
||||
to deal in the Software without restriction, including without limitation |
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||
and/or sell copies of the Software, and to permit persons to whom the |
||||
Software is furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included |
||||
in all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||
DEALINGS IN THE SOFTWARE. |
||||
*/ |
||||
|
||||
/* Each entry is just the name, for debug output and configuration to string */ |
||||
#ifdef _c |
||||
_c(R8Unorm) |
||||
_c(RG8Unorm) |
||||
_c(RGB8Unorm) |
||||
_c(RGBA8Unorm) |
||||
_c(R8Snorm) |
||||
_c(RG8Snorm) |
||||
_c(RGB8Snorm) |
||||
_c(RGBA8Snorm) |
||||
_c(R8Srgb) |
||||
_c(RG8Srgb) |
||||
_c(RGB8Srgb) |
||||
_c(RGBA8Srgb) |
||||
_c(R8UI) |
||||
_c(RG8UI) |
||||
_c(RGB8UI) |
||||
_c(RGBA8UI) |
||||
_c(R8I) |
||||
_c(RG8I) |
||||
_c(RGB8I) |
||||
_c(RGBA8I) |
||||
_c(R16Unorm) |
||||
_c(RG16Unorm) |
||||
_c(RGB16Unorm) |
||||
_c(RGBA16Unorm) |
||||
_c(R16Snorm) |
||||
_c(RG16Snorm) |
||||
_c(RGB16Snorm) |
||||
_c(RGBA16Snorm) |
||||
_c(R16UI) |
||||
_c(RG16UI) |
||||
_c(RGB16UI) |
||||
_c(RGBA16UI) |
||||
_c(R16I) |
||||
_c(RG16I) |
||||
_c(RGB16I) |
||||
_c(RGBA16I) |
||||
_c(R32UI) |
||||
_c(RG32UI) |
||||
_c(RGB32UI) |
||||
_c(RGBA32UI) |
||||
_c(R32I) |
||||
_c(RG32I) |
||||
_c(RGB32I) |
||||
_c(RGBA32I) |
||||
_c(R16F) |
||||
_c(RG16F) |
||||
_c(RGB16F) |
||||
_c(RGBA16F) |
||||
_c(R32F) |
||||
_c(RG32F) |
||||
_c(RGB32F) |
||||
_c(RGBA32F) |
||||
#endif |
||||
Loading…
Reference in new issue