@@ -4932,11 +4932,11 @@ int compile_spirv_module(const char* comp_data, int comp_data_size, const Option
4932
4932
char defstr[256 ];
4933
4933
if (def.type == 1 )
4934
4934
{
4935
- sprintf (defstr, " %uu " , def.u8 );
4935
+ sprintf (defstr, " %u " , def.u8 );
4936
4936
}
4937
4937
if (def.type == 2 )
4938
4938
{
4939
- sprintf (defstr, " %uu " , def.u32 );
4939
+ sprintf (defstr, " %u " , def.u32 );
4940
4940
}
4941
4941
if (def.type == 3 )
4942
4942
{
@@ -4951,7 +4951,7 @@ int compile_spirv_module(const char* comp_data, int comp_data_size, const Option
4951
4951
else
4952
4952
{
4953
4953
uint32_t u32 = def.u64 > UINT_MAX ? UINT_MAX : (uint32_t )def.u64 ;
4954
- sprintf (defstr, " %uu " , u32);
4954
+ sprintf (defstr, " %u " , u32);
4955
4955
}
4956
4956
}
4957
4957
if (def.type == 5 )
@@ -4969,18 +4969,18 @@ int compile_spirv_module(const char* comp_data, int comp_data_size, const Option
4969
4969
4970
4970
if (def.type == 0 )
4971
4971
{
4972
- define_macro_data += std::string (" #define __ncnn_ " ) + key + " \" " + def.s + " \"\n " ;
4972
+ define_macro_data += std::string (" #define ncnn_ " ) + key + " \" " + def.s + " \"\n " ;
4973
4973
}
4974
4974
else
4975
4975
{
4976
4976
char defstr[256 ];
4977
4977
if (def.type == 1 )
4978
4978
{
4979
- sprintf (defstr, " %uu " , def.u8 );
4979
+ sprintf (defstr, " %u " , def.u8 );
4980
4980
}
4981
4981
if (def.type == 2 )
4982
4982
{
4983
- sprintf (defstr, " %uu " , def.u32 );
4983
+ sprintf (defstr, " %u " , def.u32 );
4984
4984
}
4985
4985
if (def.type == 3 )
4986
4986
{
@@ -4995,15 +4995,15 @@ int compile_spirv_module(const char* comp_data, int comp_data_size, const Option
4995
4995
else
4996
4996
{
4997
4997
uint32_t u32 = def.u64 > UINT_MAX ? UINT_MAX : (uint32_t )def.u64 ;
4998
- sprintf (defstr, " %uu " , u32);
4998
+ sprintf (defstr, " %u " , u32);
4999
4999
}
5000
5000
}
5001
5001
if (def.type == 5 )
5002
5002
{
5003
5003
sprintf (defstr, " %e" , def.f32 );
5004
5004
}
5005
5005
5006
- define_macro_data += std::string (" #define __ncnn_ " ) + key + " " + defstr + " \n " ;
5006
+ define_macro_data += std::string (" #define ncnn_ " ) + key + " " + defstr + " \n " ;
5007
5007
}
5008
5008
}
5009
5009
@@ -5016,7 +5016,7 @@ int compile_spirv_module(const char* comp_data, int comp_data_size, const Option
5016
5016
if (opt.use_fp16_storage )
5017
5017
{
5018
5018
custom_exts += " #extension GL_EXT_shader_16bit_storage: require\n " ;
5019
- // custom_exts += "struct sfpvec8 { f16vec4 abcd; f16vec4 efgh; };\n";
5019
+ custom_exts += " struct sfpvec8 { f16vec4 abcd; f16vec4 efgh; };\n " ;
5020
5020
}
5021
5021
if (opt.use_fp16_arithmetic )
5022
5022
{
0 commit comments