IDL: Updated codegen.

This commit is contained in:
Бранимир Караџић 2019-07-07 18:41:26 -07:00
parent 93ce9492a8
commit 102b3d2b39
3 changed files with 9 additions and 6 deletions

View File

@ -123,6 +123,7 @@ internal struct bgfx
OpPassZShift = 28,
OpPassZMask = 0xf0000000,
}
[Flags]
public enum ClearFlags : ushort
{
@ -282,6 +283,7 @@ internal struct bgfx
ReservedShift = 31,
ReservedMask = 0x80000000,
}
[Flags]
public enum CapsFlags : ulong
{

View File

@ -102,7 +102,7 @@ function gen.gen()
table.insert(tmp, v)
any = true
end
if any then
if any and tmp[#tmp] ~= "" then
table.insert(tmp, "")
end
end
@ -120,10 +120,6 @@ end
local lastCombinedFlag
local function FlagBlock(typ)
if typ == nil then
return
end
local format = "0x%08x"
local enumType = " : uint"
if typ.bits == 64 then
@ -173,7 +169,11 @@ end
local function lastCombinedFlagBlock()
if lastCombinedFlag then
FlagBlock(combined[lastCombinedFlag])
local typ = combined[lastCombinedFlag]
if typ then
FlagBlock(combined[lastCombinedFlag])
yield("")
end
lastCombinedFlag = nil
end
end

View File

@ -336,6 +336,7 @@ function codegen.nameconversion(all_types, all_funcs)
if substruct[v.name] then
error ( "Duplicate sub struct " .. v.name .. " in " .. v.namespace)
end
v.parent_class = super
substruct[#substruct+1] = v
substruct[v.name] = v
end