Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dxt1divtable.c « extra - github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: da41508146c2a9fdb68c735458958540871dd42e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdint.h>
#include <stdio.h>

int main()
{
    for( int i=0; i<255*3+1; 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;
}