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_MACROS_VENDOR_ONCE 9 #define HS_GLSL_MACROS_VENDOR_ONCE 10 11 // 12 // 13 // 14 15 #include "../hs_glsl_macros.h" 16 17 // 18 // OVERRIDE SUBGROUP LANE ID 19 // 20 21 #define HS_GLSL_SUBGROUP_SIZE() 22 #define HS_SUBGROUP_PREAMBLE() 23 24 #define HS_SUBGROUP_ID() gl_SubgroupID 25 #define HS_SUBGROUP_LANE_ID() gl_SubgroupInvocationID 26 27 // 28 // CHOOSE A COMPARE-EXCHANGE IMPLEMENTATION 29 // 30 31 #if (HS_KEY_WORDS == 1) 32 #define HS_CMP_XCHG(a,b) HS_CMP_XCHG_V0(a,b) 33 #elif (HS_KEY_WORDS == 2) 34 #define HS_CMP_XCHG(a,b) HS_CMP_XCHG_V0(a,b) 35 #endif 36 37 // 38 // CHOOSE A CONDITIONAL MIN/MAX IMPLEMENTATION 39 // 40 41 #if (HS_KEY_WORDS == 1) 42 #define HS_COND_MIN_MAX(lt,a,b) HS_COND_MIN_MAX_V0(lt,a,b) 43 #elif (HS_KEY_WORDS == 2) 44 #define HS_COND_MIN_MAX(lt,a,b) HS_COND_MIN_MAX_V0(lt,a,b) 45 #endif 46 47 // 48 // 49 // 50 51 #endif 52 53 // 54 // 55 // 56