Lines Matching refs:to_unorm

1270 SI U32 to_unorm(F v, F scale, F bias = 1.0f) {
1271 // Any time we use round() we probably want to use to_unorm().
1598 // to_unorm() clamps back to gamut. Scaling by 1 since we're already 255-biased.
1599 dst = to_unorm(r, 1, 255)
1600 | to_unorm(g, 1, 255) << 8
1601 | to_unorm(b, 1, 255) << 16
1602 | to_unorm(a, 1, 255) << 24;
1840 r = from_byte(gather(tables->r, to_unorm(r, 255)));
1841 g = from_byte(gather(tables->g, to_unorm(g, 255)));
1842 b = from_byte(gather(tables->b, to_unorm(b, 255)));
1843 a = from_byte(gather(tables->a, to_unorm(a, 255)));
1957 U8 packed = pack(pack(to_unorm(a, 255)));
1982 U16 px = pack( to_unorm(r, 31) << 11
1983 | to_unorm(g, 63) << 5
1984 | to_unorm(b, 31) );
2003 U16 px = pack( to_unorm(r, 15) << 12
2004 | to_unorm(g, 15) << 8
2005 | to_unorm(b, 15) << 4
2006 | to_unorm(a, 15) );
2026 U32 px = to_unorm(r, 255)
2027 | to_unorm(g, 255) << 8
2028 | to_unorm(b, 255) << 16
2029 | to_unorm(a, 255) << 24;
2054 U16 px = pack( to_unorm(r, 255) | to_unorm(g, 255) << 8 );
2077 U16 px = pack(to_unorm(a, 65535));
2102 U32 px = to_unorm(r, 65535)
2103 | to_unorm(g, 65535) << 16;
2123 U16 R = pack(to_unorm(r, 65535)),
2124 G = pack(to_unorm(g, 65535)),
2125 B = pack(to_unorm(b, 65535)),
2126 A = pack(to_unorm(a, 65535));
2148 U32 px = to_unorm(r, 1023)
2149 | to_unorm(g, 1023) << 10
2150 | to_unorm(b, 1023) << 20
2151 | to_unorm(a, 3) << 30;
2198 U16 R = bswap(pack(to_unorm(r, 65535))),
2199 G = bswap(pack(to_unorm(g, 65535))),
2200 B = bswap(pack(to_unorm(b, 65535))),
2201 A = bswap(pack(to_unorm(a, 65535)));