yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
05cfcc16
16.3.0
1#version 450 core 2 3#extension GL_EXT_bfloat16 : require 4#extension GL_EXT_float_e5m2 : require 5#extension GL_KHR_cooperative_matrix : enable 6#extension GL_NV_cooperative_matrix2 : enable 7#extension GL_KHR_memory_scope_semantics : enable 8#extension GL_EXT_shader_explicit_arithmetic_types : enable 9#extension GL_EXT_scalar_block_layout : enable 10 11layout ( local_size_x = 1 , local_size_y = 1 , local_size_z = 1 ) in ; 12 13const floate5m2_t bc10 = floate5m2_t ( 10 ) ; 14const fe5m2vec2 b2c20 = fe5m2vec2 ( 20 ) ; 15layout ( constant_id = 1 ) const floate5m2_t bsc10 = floate5m2_t ( 10 ) ; 16 17struct S { floate5m2_t b ; } ; 18const S sc = S ( bc10 ) ; 19 20const floate5m2_t bca [ 2 ] = { bc10 , bc10 } ; 21 22shared floate5m2_t bfs [ 10 ] ; 23 24layout ( scalar ) buffer B { 25fe5m2vec3 b3 ; 26fe5m2vec2 b2 ; 27floate5m2_t b1 ; 28} buf ; 29 30floate5m2_t funcfe5m2 ( floate5m2_t x ) 31{ 32return x ; 33} 34 35floate5m2_t funcf32 ( float32_t x ) 36{ 37return floate5m2_t ( x ) ; 38} 39 40floate5m2_t funcf64 ( float64_t x ) 41{ 42return floate5m2_t ( x ) ; 43} 44 45void main () 46{ 47float f = 2.0 ; 48floate5m2_t b = floate5m2_t ( 1.0 ) ; 49floate5m2_t ( f ) ; 50fe5m2vec2 b2 = fe5m2vec2 ( f ) ; 51 52uint8_t u8 = uint8_t ( 5 ) ; 53uint16_t u16 = uint16_t ( 5 ) ; 54uint32_t u32 = 5 ; 55uint64_t u64 = 5 ; 56int8_t i8 = int8_t ( 6 ) ; 57int16_t i16 = int16_t ( 6 ) ; 58int32_t i32 = 6 ; 59int64_t i64 = 6 ; 60floate5m2_t fe5m2 = floate5m2_t ( 7 ) ; 61float16_t f16 = float16_t ( 7 ) ; 62float32_t f32 = 7 ; 63float64_t f64 = 7 ; 64b = floate5m2_t ( u8 ) ; 65b = floate5m2_t ( u16 ) ; 66b = floate5m2_t ( u32 ) ; 67b = floate5m2_t ( u64 ) ; 68b = floate5m2_t ( i8 ) ; 69b = floate5m2_t ( i16 ) ; 70b = floate5m2_t ( i32 ) ; 71b = floate5m2_t ( i64 ) ; 72b = floate5m2_t ( fe5m2 ) ; 73b = floate5m2_t ( f16 ) ; 74b = floate5m2_t ( f32 ) ; 75b = floate5m2_t ( f64 ) ; 76u8 = uint8_t ( b ) ; 77u16 = uint16_t ( b ) ; 78u32 = uint32_t ( b ) ; 79u64 = uint64_t ( b ) ; 80i8 = int8_t ( b ) ; 81i16 = int16_t ( b ) ; 82i32 = int32_t ( b ) ; 83i64 = int64_t ( b ) ; 84fe5m2 = floate5m2_t ( b ) ; 85f16 = float16_t ( b ) ; 86f32 = float32_t ( b ) ; 87f64 = float64_t ( b ) ; 88 89f16 = b ; 90f32 = b ; 91f64 = b ; 92 93b = buf . b1 ; 94b2 = buf . b2 ; 95fe5m2vec3 b3 = buf . b3 ; 96 97coopmat < floate5m2_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > cmA = coopmat < floate5m2_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > ( 3.0 ) ; 98 99coopmat < float , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > cmAf = coopmat < float , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > ( cmA ) ; 100 101funcfe5m2 ( b ) ; 102funcf32 ( b ) ; 103funcf64 ( b ) ; 104 105int8_t i8_1 = floate5m2BitsToIntEXT ( b ) ; 106i8vec2 i8_2 = floate5m2BitsToIntEXT ( b2 ) ; 107i8vec3 i8_3 = floate5m2BitsToIntEXT ( fe5m2vec3 ( b2 , b )) ; 108i8vec4 i8_4 = floate5m2BitsToIntEXT ( fe5m2vec4 ( b2 , b2 )) ; 109 110uint8_t u8_1 = floate5m2BitsToUintEXT ( b ) ; 111u8vec2 u8_2 = floate5m2BitsToUintEXT ( b2 ) ; 112u8vec3 u8_3 = floate5m2BitsToUintEXT ( fe5m2vec3 ( b2 , b )) ; 113u8vec4 u8_4 = floate5m2BitsToUintEXT ( fe5m2vec4 ( b2 , b2 )) ; 114 115floate5m2_t f8_1 = intBitsToFloate5m2EXT ( i8_1 ) ; 116fe5m2vec2 f8_2 = intBitsToFloate5m2EXT ( i8_2 ) ; 117fe5m2vec3 f8_3 = intBitsToFloate5m2EXT ( i8_3 ) ; 118fe5m2vec4 f8_4 = intBitsToFloate5m2EXT ( i8_4 ) ; 119 120f8_1 = uintBitsToFloate5m2EXT ( u8_1 ) ; 121f8_2 = uintBitsToFloate5m2EXT ( u8_2 ) ; 122f8_3 = uintBitsToFloate5m2EXT ( u8_3 ) ; 123f8_4 = uintBitsToFloate5m2EXT ( u8_4 ) ; 124} 125 126floate5m2_t func2 ( fe5m2vec4 v [ 2 ] , int i ) 127{ 128floate5m2_t b ; 129b = ( fe5m2vec2 ( v [ 0 ]))[ i ] ; 130b = ( fe5m2vec2 ( v [ 1 ])) . y ; 131 132v [ i ] . z = v [ i ][ i ] ; 133 134S s ; 135s . b = b ; 136 137b = ( i != 0 ) ? b : floate5m2_t ( 2 ) ; 138 139if ( i == 2 ) { 140b = v [ 0 ] . x ; 141} else { 142b = v [ 1 ] . y ; 143} 144 145return b ; 146} 147 148void saturatedconverts () 149{ 150float f = 1.0 ; 151vec2 f2 = vec2 ( f ) ; 152floate5m2_t b ; 153fe5m2vec2 b2 ; 154uint32_t u ; 155int32_t i ; 156saturatedConvertEXT ( b , f ) ; 157saturatedConvertEXT ( b2 , f2 ) ; 158saturatedConvertEXT ( b , u ) ; 159saturatedConvertEXT ( b , i ) ; 160 161coopmat < float16_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseAccumulator > matf16C ; 162coopmat < float16_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > matf16A ; 163coopmat < floate5m2_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > mate5m2A ; 164 165mate5m2A = coopmat < floate5m2_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > ( matf16A ) ; 166mate5m2A = coopmat < floate5m2_t , gl_ScopeSubgroup , 16 , 16 , gl_MatrixUseA > ( matf16C ) ; 167saturatedConvertEXT ( mate5m2A , matf16A ) ; 168saturatedConvertEXT ( mate5m2A , matf16C ) ; 169}