Prefix integer types with underscore

This commit is contained in:
Brad Davis 2018-06-21 09:24:22 -07:00
parent 0ad0f948e1
commit 9ad432463c
8 changed files with 56 additions and 56 deletions

View File

@ -18,7 +18,7 @@
}
],
"types" : {
"8" : {
"_8" : {
"name" : "_8",
"members" : [
{

View File

@ -6,7 +6,7 @@
}
],
"types" : {
"19" : {
"_19" : {
"name" : "Foo",
"members" : [
{
@ -16,12 +16,12 @@
}
]
},
"21" : {
"_21" : {
"name" : "SSBO2",
"members" : [
{
"name" : "out_data",
"type" : "19",
"type" : "_19",
"array" : [
0
],
@ -29,12 +29,12 @@
}
]
},
"28" : {
"_28" : {
"name" : "SSBO",
"members" : [
{
"name" : "in_data",
"type" : "19",
"type" : "_19",
"array" : [
0
],
@ -45,7 +45,7 @@
},
"ssbos" : [
{
"type" : "21",
"type" : "_21",
"name" : "SSBO2",
"writeonly" : true,
"block_size" : 0,
@ -53,7 +53,7 @@
"binding" : 1
},
{
"type" : "28",
"type" : "_28",
"name" : "SSBO",
"readonly" : true,
"block_size" : 0,

View File

@ -6,7 +6,7 @@
}
],
"types" : {
"11" : {
"_11" : {
"name" : "S0",
"members" : [
{
@ -24,7 +24,7 @@
}
]
},
"14" : {
"_14" : {
"name" : "S1",
"members" : [
{
@ -39,7 +39,7 @@
}
]
},
"17" : {
"_17" : {
"name" : "S2",
"members" : [
{
@ -57,7 +57,7 @@
}
]
},
"19" : {
"_19" : {
"name" : "S3",
"members" : [
{
@ -72,7 +72,7 @@
}
]
},
"20" : {
"_20" : {
"name" : "S4",
"members" : [
{
@ -82,12 +82,12 @@
}
]
},
"23" : {
"_23" : {
"name" : "Content",
"members" : [
{
"name" : "m0s",
"type" : "11",
"type" : "_11",
"array" : [
1
],
@ -95,7 +95,7 @@
},
{
"name" : "m1s",
"type" : "14",
"type" : "_14",
"array" : [
1
],
@ -103,7 +103,7 @@
},
{
"name" : "m2s",
"type" : "17",
"type" : "_17",
"array" : [
1
],
@ -111,22 +111,22 @@
},
{
"name" : "m0",
"type" : "11",
"type" : "_11",
"offset" : 64
},
{
"name" : "m1",
"type" : "14",
"type" : "_14",
"offset" : 80
},
{
"name" : "m2",
"type" : "17",
"type" : "_17",
"offset" : 96
},
{
"name" : "m3",
"type" : "19",
"type" : "_19",
"offset" : 128
},
{
@ -136,7 +136,7 @@
},
{
"name" : "m3s",
"type" : "20",
"type" : "_20",
"array" : [
8
],
@ -144,17 +144,17 @@
}
]
},
"36" : {
"_36" : {
"name" : "SSBO1",
"members" : [
{
"name" : "content",
"type" : "23",
"type" : "_23",
"offset" : 0
},
{
"name" : "content1",
"type" : "23",
"type" : "_23",
"array" : [
2
],
@ -162,7 +162,7 @@
},
{
"name" : "content2",
"type" : "23",
"type" : "_23",
"offset" : 672
},
{
@ -229,7 +229,7 @@
}
]
},
"42" : {
"_42" : {
"name" : "S0",
"members" : [
{
@ -247,7 +247,7 @@
}
]
},
"44" : {
"_44" : {
"name" : "S1",
"members" : [
{
@ -262,7 +262,7 @@
}
]
},
"47" : {
"_47" : {
"name" : "S2",
"members" : [
{
@ -280,7 +280,7 @@
}
]
},
"49" : {
"_49" : {
"name" : "S3",
"members" : [
{
@ -295,7 +295,7 @@
}
]
},
"50" : {
"_50" : {
"name" : "S4",
"members" : [
{
@ -305,12 +305,12 @@
}
]
},
"52" : {
"_52" : {
"name" : "Content",
"members" : [
{
"name" : "m0s",
"type" : "42",
"type" : "_42",
"array" : [
1
],
@ -318,7 +318,7 @@
},
{
"name" : "m1s",
"type" : "44",
"type" : "_44",
"array" : [
1
],
@ -326,7 +326,7 @@
},
{
"name" : "m2s",
"type" : "47",
"type" : "_47",
"array" : [
1
],
@ -334,22 +334,22 @@
},
{
"name" : "m0",
"type" : "42",
"type" : "_42",
"offset" : 80
},
{
"name" : "m1",
"type" : "44",
"type" : "_44",
"offset" : 112
},
{
"name" : "m2",
"type" : "47",
"type" : "_47",
"offset" : 128
},
{
"name" : "m3",
"type" : "49",
"type" : "_49",
"offset" : 160
},
{
@ -359,7 +359,7 @@
},
{
"name" : "m3s",
"type" : "50",
"type" : "_50",
"array" : [
8
],
@ -367,17 +367,17 @@
}
]
},
"59" : {
"_59" : {
"name" : "SSBO0",
"members" : [
{
"name" : "content",
"type" : "52",
"type" : "_52",
"offset" : 0
},
{
"name" : "content1",
"type" : "52",
"type" : "_52",
"array" : [
2
],
@ -385,7 +385,7 @@
},
{
"name" : "content2",
"type" : "52",
"type" : "_52",
"offset" : 960
},
{
@ -455,7 +455,7 @@
},
"ssbos" : [
{
"type" : "36",
"type" : "_36",
"name" : "SSBO1",
"restrict" : true,
"block_size" : 1472,
@ -463,7 +463,7 @@
"binding" : 1
},
{
"type" : "59",
"type" : "_59",
"name" : "SSBO0",
"restrict" : true,
"block_size" : 2256,

View File

@ -6,7 +6,7 @@
}
],
"types" : {
"13" : {
"_13" : {
"name" : "PushConstants",
"members" : [
{
@ -38,7 +38,7 @@
],
"push_constants" : [
{
"type" : "13",
"type" : "_13",
"name" : "push",
"push_constant" : true
}

View File

@ -6,7 +6,7 @@
}
],
"types" : {
"137" : {
"_137" : {
"name" : "Foo",
"members" : [
{

View File

@ -6,7 +6,7 @@
}
],
"types" : {
"89" : {
"_89" : {
"name" : "gl_PerVertex",
"members" : [
{
@ -19,7 +19,7 @@
}
]
},
"102" : {
"_102" : {
"name" : "Block",
"members" : [
{
@ -51,7 +51,7 @@
],
"ubos" : [
{
"type" : "102",
"type" : "_102",
"name" : "Block",
"block_size" : 576,
"set" : 0,

View File

@ -6,7 +6,7 @@
}
],
"types" : {
"8" : {
"_8" : {
"name" : "gl_PerVertex",
"members" : [
{

View File

@ -295,7 +295,7 @@ void CompilerReflection::emit_type(const SPIRType &type, bool &emitted_open_tag)
json_stream->emit_json_key_object("types");
emitted_open_tag = true;
}
json_stream->emit_json_key_object(std::to_string(type.self));
json_stream->emit_json_key_object("_" + std::to_string(type.self));
json_stream->emit_json_key_value("name", name);
json_stream->emit_json_key_array("members");
// FIXME ideally we'd like to emit the size of a structure as a
@ -328,7 +328,7 @@ void CompilerReflection::emit_type_member(const SPIRType &type, uint32_t index)
json_stream->emit_json_key_value("name", name);
if (membertype.basetype == SPIRType::Struct)
{
json_stream->emit_json_key_value("type", std::to_string(membertype.self));
json_stream->emit_json_key_value("type", "_" + std::to_string(membertype.self));
}
else
{
@ -454,7 +454,7 @@ void CompilerReflection::emit_resources(const char *tag, const vector<Resource>
if (type.basetype == SPIRType::Struct)
{
json_stream->emit_json_key_value("type", std::to_string(res.base_type_id));
json_stream->emit_json_key_value("type", "_" + std::to_string(res.base_type_id));
}
else
{