• 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    4
12 #define HS_SLAB_THREADS         (1 << HS_SLAB_THREADS_LOG2)
13 #define HS_SLAB_WIDTH_LOG2      4
14 #define HS_SLAB_WIDTH           (1 << HS_SLAB_WIDTH_LOG2)
15 #define HS_SLAB_HEIGHT          8
16 #define HS_SLAB_KEYS            (HS_SLAB_WIDTH * HS_SLAB_HEIGHT)
17 #define HS_REG_LAST(c)          c##8
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         0
25 #define HS_FM_SCALE_MAX         0
26 #define HS_HM_BLOCK_HEIGHT      1
27 #define HS_HM_SCALE_MIN         0
28 #define HS_HM_SCALE_MAX         0
29 #define HS_EMPTY
30 
31 #define HS_INTEL_GEN8
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_EMPTY
43 
44 #define HS_TRANSPOSE_SLAB()                \
45   HS_TRANSPOSE_STAGE( 1 )                  \
46   HS_TRANSPOSE_STAGE( 2 )                  \
47   HS_TRANSPOSE_STAGE( 3 )                  \
48   HS_TRANSPOSE_STAGE( 4 )                  \
49   HS_TRANSPOSE_BLEND( r, s,  1,   2,   1 ) \
50   HS_TRANSPOSE_BLEND( r, s,  1,   4,   3 ) \
51   HS_TRANSPOSE_BLEND( r, s,  1,   6,   5 ) \
52   HS_TRANSPOSE_BLEND( r, s,  1,   8,   7 ) \
53   HS_TRANSPOSE_BLEND( s, t,  2,   3,   1 ) \
54   HS_TRANSPOSE_BLEND( s, t,  2,   4,   2 ) \
55   HS_TRANSPOSE_BLEND( s, t,  2,   7,   5 ) \
56   HS_TRANSPOSE_BLEND( s, t,  2,   8,   6 ) \
57   HS_TRANSPOSE_BLEND( t, u,  3,   5,   1 ) \
58   HS_TRANSPOSE_BLEND( t, u,  3,   6,   2 ) \
59   HS_TRANSPOSE_BLEND( t, u,  3,   7,   3 ) \
60   HS_TRANSPOSE_BLEND( t, u,  3,   8,   4 ) \
61   HS_TRANSPOSE_BLEND( u, v,  4,   2,   1 ) \
62   HS_TRANSPOSE_BLEND( u, v,  4,   4,   3 ) \
63   HS_TRANSPOSE_BLEND( u, v,  4,   6,   5 ) \
64   HS_TRANSPOSE_BLEND( u, v,  4,   8,   7 ) \
65   HS_TRANSPOSE_REMAP( v,   1,   1 )        \
66   HS_TRANSPOSE_REMAP( v,   2,   5 )        \
67   HS_TRANSPOSE_REMAP( v,   3,   2 )        \
68   HS_TRANSPOSE_REMAP( v,   4,   6 )        \
69   HS_TRANSPOSE_REMAP( v,   5,   3 )        \
70   HS_TRANSPOSE_REMAP( v,   6,   7 )        \
71   HS_TRANSPOSE_REMAP( v,   7,   4 )        \
72   HS_TRANSPOSE_REMAP( v,   8,   8 )        \
73   HS_EMPTY
74 
75 #endif
76 
77 //
78 //
79 //
80 
81