mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 06:34:36 +00:00
Add DXT1 div table generator.
This commit is contained in:
parent
370fead4b2
commit
b73f428739
22
extra/dxt1divtable.c
Normal file
22
extra/dxt1divtable.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
for( int i=0; i<255*3; i++ )
|
||||
{
|
||||
// replace 4 with 2 for ARM NEON table
|
||||
uint32_t range = ( 4 << 16 ) / ( 1+i );
|
||||
if( range > 0xFFFF ) range = 0xFFFF;
|
||||
if( i % 16 == 15 )
|
||||
{
|
||||
printf( "0x%04x,\n", range );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "0x%04x, ", range );
|
||||
}
|
||||
}
|
||||
printf( "\n" );
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user