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 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 2 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_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_STAGE( 5 ) \ 50 HS_TRANSPOSE_STAGE( 6 ) \ 51 HS_TRANSPOSE_BLEND( r, s, 1, 2, 1 ) \ 52 HS_TRANSPOSE_BLEND( r, s, 1, 4, 3 ) \ 53 HS_TRANSPOSE_BLEND( r, s, 1, 6, 5 ) \ 54 HS_TRANSPOSE_BLEND( r, s, 1, 8, 7 ) \ 55 HS_TRANSPOSE_BLEND( s, t, 2, 3, 1 ) \ 56 HS_TRANSPOSE_BLEND( s, t, 2, 4, 2 ) \ 57 HS_TRANSPOSE_BLEND( s, t, 2, 7, 5 ) \ 58 HS_TRANSPOSE_BLEND( s, t, 2, 8, 6 ) \ 59 HS_TRANSPOSE_BLEND( t, u, 3, 5, 1 ) \ 60 HS_TRANSPOSE_BLEND( t, u, 3, 6, 2 ) \ 61 HS_TRANSPOSE_BLEND( t, u, 3, 7, 3 ) \ 62 HS_TRANSPOSE_BLEND( t, u, 3, 8, 4 ) \ 63 HS_TRANSPOSE_BLEND( u, v, 4, 2, 1 ) \ 64 HS_TRANSPOSE_BLEND( u, v, 4, 4, 3 ) \ 65 HS_TRANSPOSE_BLEND( u, v, 4, 6, 5 ) \ 66 HS_TRANSPOSE_BLEND( u, v, 4, 8, 7 ) \ 67 HS_TRANSPOSE_BLEND( v, w, 5, 3, 1 ) \ 68 HS_TRANSPOSE_BLEND( v, w, 5, 4, 2 ) \ 69 HS_TRANSPOSE_BLEND( v, w, 5, 7, 5 ) \ 70 HS_TRANSPOSE_BLEND( v, w, 5, 8, 6 ) \ 71 HS_TRANSPOSE_BLEND( w, x, 6, 5, 1 ) \ 72 HS_TRANSPOSE_BLEND( w, x, 6, 6, 2 ) \ 73 HS_TRANSPOSE_BLEND( w, x, 6, 7, 3 ) \ 74 HS_TRANSPOSE_BLEND( w, x, 6, 8, 4 ) \ 75 HS_TRANSPOSE_REMAP( x, 1, 1 ) \ 76 HS_TRANSPOSE_REMAP( x, 2, 2 ) \ 77 HS_TRANSPOSE_REMAP( x, 3, 3 ) \ 78 HS_TRANSPOSE_REMAP( x, 4, 4 ) \ 79 HS_TRANSPOSE_REMAP( x, 5, 5 ) \ 80 HS_TRANSPOSE_REMAP( x, 6, 6 ) \ 81 HS_TRANSPOSE_REMAP( x, 7, 7 ) \ 82 HS_TRANSPOSE_REMAP( x, 8, 8 ) \ 83 HS_EMPTY 84 85 #endif 86 87 // 88 // 89 // 90 91