• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2016 Google Inc.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6 //
7 
8 #ifndef HS_GLSL_ONCE
9 #define HS_GLSL_ONCE
10 
11 #define HS_SLAB_THREADS_LOG2    6
12 #define HS_SLAB_THREADS         (1 << HS_SLAB_THREADS_LOG2)
13 #define HS_SLAB_WIDTH_LOG2      6
14 #define HS_SLAB_WIDTH           (1 << HS_SLAB_WIDTH_LOG2)
15 #define HS_SLAB_HEIGHT          16
16 #define HS_SLAB_KEYS            (HS_SLAB_WIDTH * HS_SLAB_HEIGHT)
17 #define HS_REG_LAST(c)          c##16
18 #define HS_KEY_WORDS            1
19 #define HS_VAL_WORDS            0
20 #define HS_BS_SLABS             16
21 #define HS_BS_SLABS_LOG2_RU     4
22 #define HS_BC_SLABS_LOG2_MAX    4
23 #define HS_FM_BLOCK_HEIGHT      1
24 #define HS_FM_SCALE_MIN         1
25 #define HS_FM_SCALE_MAX         1
26 #define HS_HM_BLOCK_HEIGHT      1
27 #define HS_HM_SCALE_MIN         1
28 #define HS_HM_SCALE_MAX         1
29 #define HS_EMPTY
30 
31 #define HS_AMD_GCN
32 
33 #define HS_SLAB_ROWS()    \
34   HS_SLAB_ROW(   1,   0 ) \
35   HS_SLAB_ROW(   2,   1 ) \
36   HS_SLAB_ROW(   3,   2 ) \
37   HS_SLAB_ROW(   4,   3 ) \
38   HS_SLAB_ROW(   5,   4 ) \
39   HS_SLAB_ROW(   6,   5 ) \
40   HS_SLAB_ROW(   7,   6 ) \
41   HS_SLAB_ROW(   8,   7 ) \
42   HS_SLAB_ROW(   9,   8 ) \
43   HS_SLAB_ROW(  10,   9 ) \
44   HS_SLAB_ROW(  11,  10 ) \
45   HS_SLAB_ROW(  12,  11 ) \
46   HS_SLAB_ROW(  13,  12 ) \
47   HS_SLAB_ROW(  14,  13 ) \
48   HS_SLAB_ROW(  15,  14 ) \
49   HS_SLAB_ROW(  16,  15 ) \
50   HS_EMPTY
51 
52 #define HS_TRANSPOSE_SLAB()                \
53   HS_TRANSPOSE_STAGE( 1 )                  \
54   HS_TRANSPOSE_STAGE( 2 )                  \
55   HS_TRANSPOSE_STAGE( 3 )                  \
56   HS_TRANSPOSE_STAGE( 4 )                  \
57   HS_TRANSPOSE_STAGE( 5 )                  \
58   HS_TRANSPOSE_STAGE( 6 )                  \
59   HS_TRANSPOSE_BLEND( r, s,  1,   2,   1 ) \
60   HS_TRANSPOSE_BLEND( r, s,  1,   4,   3 ) \
61   HS_TRANSPOSE_BLEND( r, s,  1,   6,   5 ) \
62   HS_TRANSPOSE_BLEND( r, s,  1,   8,   7 ) \
63   HS_TRANSPOSE_BLEND( r, s,  1,  10,   9 ) \
64   HS_TRANSPOSE_BLEND( r, s,  1,  12,  11 ) \
65   HS_TRANSPOSE_BLEND( r, s,  1,  14,  13 ) \
66   HS_TRANSPOSE_BLEND( r, s,  1,  16,  15 ) \
67   HS_TRANSPOSE_BLEND( s, t,  2,   3,   1 ) \
68   HS_TRANSPOSE_BLEND( s, t,  2,   4,   2 ) \
69   HS_TRANSPOSE_BLEND( s, t,  2,   7,   5 ) \
70   HS_TRANSPOSE_BLEND( s, t,  2,   8,   6 ) \
71   HS_TRANSPOSE_BLEND( s, t,  2,  11,   9 ) \
72   HS_TRANSPOSE_BLEND( s, t,  2,  12,  10 ) \
73   HS_TRANSPOSE_BLEND( s, t,  2,  15,  13 ) \
74   HS_TRANSPOSE_BLEND( s, t,  2,  16,  14 ) \
75   HS_TRANSPOSE_BLEND( t, u,  3,   5,   1 ) \
76   HS_TRANSPOSE_BLEND( t, u,  3,   6,   2 ) \
77   HS_TRANSPOSE_BLEND( t, u,  3,   7,   3 ) \
78   HS_TRANSPOSE_BLEND( t, u,  3,   8,   4 ) \
79   HS_TRANSPOSE_BLEND( t, u,  3,  13,   9 ) \
80   HS_TRANSPOSE_BLEND( t, u,  3,  14,  10 ) \
81   HS_TRANSPOSE_BLEND( t, u,  3,  15,  11 ) \
82   HS_TRANSPOSE_BLEND( t, u,  3,  16,  12 ) \
83   HS_TRANSPOSE_BLEND( u, v,  4,   9,   1 ) \
84   HS_TRANSPOSE_BLEND( u, v,  4,  10,   2 ) \
85   HS_TRANSPOSE_BLEND( u, v,  4,  11,   3 ) \
86   HS_TRANSPOSE_BLEND( u, v,  4,  12,   4 ) \
87   HS_TRANSPOSE_BLEND( u, v,  4,  13,   5 ) \
88   HS_TRANSPOSE_BLEND( u, v,  4,  14,   6 ) \
89   HS_TRANSPOSE_BLEND( u, v,  4,  15,   7 ) \
90   HS_TRANSPOSE_BLEND( u, v,  4,  16,   8 ) \
91   HS_TRANSPOSE_BLEND( v, w,  5,   2,   1 ) \
92   HS_TRANSPOSE_BLEND( v, w,  5,   4,   3 ) \
93   HS_TRANSPOSE_BLEND( v, w,  5,   6,   5 ) \
94   HS_TRANSPOSE_BLEND( v, w,  5,   8,   7 ) \
95   HS_TRANSPOSE_BLEND( v, w,  5,  10,   9 ) \
96   HS_TRANSPOSE_BLEND( v, w,  5,  12,  11 ) \
97   HS_TRANSPOSE_BLEND( v, w,  5,  14,  13 ) \
98   HS_TRANSPOSE_BLEND( v, w,  5,  16,  15 ) \
99   HS_TRANSPOSE_BLEND( w, x,  6,   3,   1 ) \
100   HS_TRANSPOSE_BLEND( w, x,  6,   4,   2 ) \
101   HS_TRANSPOSE_BLEND( w, x,  6,   7,   5 ) \
102   HS_TRANSPOSE_BLEND( w, x,  6,   8,   6 ) \
103   HS_TRANSPOSE_BLEND( w, x,  6,  11,   9 ) \
104   HS_TRANSPOSE_BLEND( w, x,  6,  12,  10 ) \
105   HS_TRANSPOSE_BLEND( w, x,  6,  15,  13 ) \
106   HS_TRANSPOSE_BLEND( w, x,  6,  16,  14 ) \
107   HS_TRANSPOSE_REMAP( x,   1,   1 )        \
108   HS_TRANSPOSE_REMAP( x,   2,   5 )        \
109   HS_TRANSPOSE_REMAP( x,   3,   9 )        \
110   HS_TRANSPOSE_REMAP( x,   4,  13 )        \
111   HS_TRANSPOSE_REMAP( x,   5,   2 )        \
112   HS_TRANSPOSE_REMAP( x,   6,   6 )        \
113   HS_TRANSPOSE_REMAP( x,   7,  10 )        \
114   HS_TRANSPOSE_REMAP( x,   8,  14 )        \
115   HS_TRANSPOSE_REMAP( x,   9,   3 )        \
116   HS_TRANSPOSE_REMAP( x,  10,   7 )        \
117   HS_TRANSPOSE_REMAP( x,  11,  11 )        \
118   HS_TRANSPOSE_REMAP( x,  12,  15 )        \
119   HS_TRANSPOSE_REMAP( x,  13,   4 )        \
120   HS_TRANSPOSE_REMAP( x,  14,   8 )        \
121   HS_TRANSPOSE_REMAP( x,  15,  12 )        \
122   HS_TRANSPOSE_REMAP( x,  16,  16 )        \
123   HS_EMPTY
124 
125 #endif
126 
127 //
128 //
129 //
130 
131