mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vkgen] Don't queue types for fields with custom parsers
This ensures that unused parser blocks do not get emitted. In the testing of the upcoming support for fixed arrays, the blend color constants were being double emitted (both as custom and normal parser) due to being an array. gcc did not like that (what with all those warning flags).
This commit is contained in:
parent
a522464fc1
commit
c73e4efcb7
4 changed files with 22 additions and 0 deletions
|
@ -65,4 +65,9 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
-(int) searchType
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
-writeField;
|
||||
-writeSymbol;
|
||||
-(string) name;
|
||||
-(int) searchType;
|
||||
@end
|
||||
|
||||
#endif//__renderer_vulkan_vkgen_vkfielddef_h
|
||||
|
|
|
@ -95,4 +95,9 @@
|
|||
return field_name;
|
||||
}
|
||||
|
||||
-(int) searchType
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,8 +30,19 @@
|
|||
-(void) queueFieldTypes
|
||||
{
|
||||
qfot_struct_t *strct =&type.strct;
|
||||
PLItem *field_dict = [parse getObjectForKey:[self name]];
|
||||
|
||||
for (int i = 0; i < strct.num_fields; i++) {
|
||||
qfot_var_t *var = &strct.fields[i];
|
||||
if (field_dict) {
|
||||
PLItem *item = [field_dict getObjectForKey:var.name];
|
||||
FieldDef *def = [FieldDef fielddef:item
|
||||
struct:self
|
||||
field:var.name];
|
||||
if (![def searchType]) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Type *type = [Type findType:var.type];
|
||||
[type addToQueue];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue