yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
344a03c0
main
1#version 450 2#extension GL_EXT_shader_16bit_storage : enable 3#extension GL_EXT_shader_8bit_storage : enable 4#extension GL_EXT_buffer_reference : enable 5 6layout (std140 ,binding = 0 )buffer AcBlock {highp uint ac_numPassed ; }; 7 8layout (std430 ,column_major ,buffer_reference )buffer BlockB 9{ 10float16_t a ; 11highp ivec2 b ; 12}; 13layout (std430 ,buffer_reference )buffer BlockC 14{ 15mediump mat2x3 c ; 16}; 17layout (std430 ,row_major ,buffer_reference )buffer BlockD 18{ 19lowp uvec3 d ; 20}; 21layout (push_constant ,std430 )uniform PC { 22BlockB blockB ; 23BlockC blockC ; 24BlockD blockD ; 25}; 26 27bool compare_float (highp float a ,highp float b ) {return abs (a - b )< 0.05 ; } 28bool compare_vec3 (highp vec3 a ,highp vec3 b ) {return compare_float (a .x ,b .x )&& compare_float (a .y ,b .y )&& compare_float (a .z ,b .z ); } 29bool compare_mat2x3 (highp mat2x3 a ,highp mat2x3 b ){return compare_vec3 (a [0 ],b [0 ])&& compare_vec3 (a [1 ],b [1 ]); } 30bool compare_ivec2 (highp ivec2 a ,highp ivec2 b ) {return a == b ; } 31bool compare_uvec3 (highp uvec3 a ,highp uvec3 b ) {return a == b ; } 32bool compare_float16_t (highp float a ,highp float b ) {return abs (a - b )< 0.05 ; } 33 34void main (void ) 35{ 36bool allOk = true; 37allOk = allOk && compare_mat2x3 (blockC .c ,mat2x3 (-5.0 ,1.0 ,-7.0 ,1.0 ,2.0 ,8.0 )); 38if (allOk ) 39ac_numPassed ++ ; 40 41blockD .d = (uvec3 (8u ,1u ,5u )); 42}