Bladeren bron

* refactored generator to match Vulkan spec

master
Bergmann89 10 jaren geleden
bovenliggende
commit
35e5dfbdb1
6 gewijzigde bestanden met toevoegingen van 957 en 858 verwijderingen
  1. +8
    -8
      data/Vulkan.inc
  2. +104
    -36
      data/vulkan.tpl
  3. +8
    -8
      projects/Vulkan.inc
  4. +575
    -471
      projects/Vulkan.pas
  5. +193
    -96
      projects/generator/HeaderGenerator.pas
  6. +69
    -239
      projects/generator/generator.lps

+ 8
- 8
data/Vulkan.inc Bestand weergeven

@@ -1,11 +1,3 @@
{$IFDEF FPC}
{$MODE Delphi}
{$IFNDEF WINDOWS}
{$LINKLIB c}
{$ENDIF}
{$MINENUMSIZE 4}
{$ENDIF}

{$IFDEF Win32} {$IFDEF Win32}
{$DEFINE VK_WIN} {$DEFINE VK_WIN}
{$DEFINE VK_WIN32} {$DEFINE VK_WIN32}
@@ -27,3 +19,11 @@
{$DEFINE VK_MAC} {$DEFINE VK_MAC}
{$DEFINE VK_CDECL} {$DEFINE VK_CDECL}
{$ENDIF} {$ENDIF}

{$IF DEFINED(CPU64)}
{$DEFINE VK_CPU64}
{$ELSEIF DEFINED(CPU32)}
{$DEFINE VK_CPU32}
{$ELSEIF DEFINED(CPU16)}
{$DEFINE VK_CPU16}
{$ENDIF}

+ 104
- 36
data/vulkan.tpl Bestand weergeven

@@ -21,26 +21,42 @@ Original vk.xml comment:
unit Vulkan; unit Vulkan;


{$IFDEF FPC}
{$MODE Delphi}
{$IFNDEF WINDOWS}
{$LINKLIB c}
{$ENDIF}
{$MINENUMSIZE 4}
{$ENDIF}

{$I Vulkan.inc} {$I Vulkan.inc}


interface interface


type type
HINSTANCE = THandle;
HWND = THandle;

VkHandle = Pointer;
VkUint8 = Byte;
VkUint16 = Word;
VkUint32 = Cardinal;
VkUint64 = QWord;
VkInt16 = SmallInt;
VkInt32 = Integer;
VkInt64 = Int64;
VkFloat = Single;
VkDouble = Double;
VkChar = AnsiChar;
VkSize = SizeUInt;
VkUint8 = Byte;
VkUint16 = Word;
VkUint32 = Cardinal;
VkUint64 = QWord;
VkInt16 = SmallInt;
VkInt32 = Integer;
VkInt64 = Int64;
VkFloat = Single;
VkDouble = Double;
VkChar = AnsiChar;
VkSize = SizeUInt;
VkHandle = Pointer;
VkNonDispatchableHandle = {$IFDEF VK_CPU64}Pointer{$ELSE}VkUint64{$ENDIF};

const
VK_INVALID_HANDLE: VkHandle = nil;
VK_INVALID_NDP_HANDLE: VkNonDispatchableHandle = {$IFDEF VK_CPU64}nil{$ELSE}0{$ENDIF};

type
{$IFDEF VK_USE_PLATFORM_WIN32_KHR}
HINSTANCE = VkHandle;
HWND = VkHandle;
{$ENDIF}


PVkVoid = Pointer; PVkVoid = Pointer;
PVkHandle = ^VkHandle; PVkHandle = ^VkHandle;
@@ -72,6 +88,17 @@ type


{%INTERFACE%} {%INTERFACE%}


type
TVkInstanceCommands = packed record
Instance: VkInstance;
{%INSTANCE_COMMANDS.INTERFACE%}
end;

TVkDeviceCommands = packed record
Device: VkDevice;
{%DEVICE_COMMANDS.INTERFACE%}
end;

const const
VULKAN_LIBNAME = 'vulkan-1.dll'; VULKAN_LIBNAME = 'vulkan-1.dll';


@@ -84,7 +111,8 @@ function vkGetVersionMinor(const aVersion: VkVersion): Integer; inline;
function vkGetVersionPatch(const aVersion: VkVersion): Integer; inline; function vkGetVersionPatch(const aVersion: VkVersion): Integer; inline;


function InitializeVulkan(const aLibName: String = VULKAN_LIBNAME): Boolean; function InitializeVulkan(const aLibName: String = VULKAN_LIBNAME): Boolean;
procedure LoadVulkanCommands(const aInstance: VkInstance);
function LoadInstanceCommands(const aInstance: VkInstance; out aCommands: TVkInstanceCommands): Boolean;
function LoadDeviceCommands(const aInstance: VkInstance; const aDevice: VkDevice; out aCommands: TVkDeviceCommands): Boolean;
procedure FinalizeVulkan; procedure FinalizeVulkan;


implementation implementation
@@ -106,6 +134,7 @@ const
var var
vkLibHandle: TvkLibHandle = InvalidLibHandle; vkLibHandle: TvkLibHandle = InvalidLibHandle;


{ ===================================== Library Handling ============================================= }
function vkLoadLibrary(const aLibName: String): TvkLibHandle; function vkLoadLibrary(const aLibName: String): TvkLibHandle;
begin begin
{$IF DEFINED(VK_WIN)} {$IF DEFINED(VK_WIN)}
@@ -115,29 +144,18 @@ begin
{$ENDIF} {$ENDIF}
end; end;


function vkGetProcAddress(const aProcName: String; aInstance: VkInstance = nil; aLibHandle: TvkLibHandle = InvalidLibHandle): TvkVoidFunction;
function vkGetProcAddress(const aProcName: String; aLibHandle: TvkLibHandle = InvalidLibHandle): TvkVoidFunction;
begin begin
result := nil; result := nil;
if (aLibHandle = InvalidLibHandle) then if (aLibHandle = InvalidLibHandle) then
aLibHandle := vkLibHandle; aLibHandle := vkLibHandle;
if Assigned(vkGetInstanceProcAddr) then begin
result := vkGetInstanceProcAddr(aInstance, PVkChar(aProcName));
if Assigned(result) then
exit;
end;
{$IF DEFINED(VK_WIN)} {$IF DEFINED(VK_WIN)}
result := GetProcAddress(aLibHandle, AnsiString(aProcName));
result := TvkVoidFunction(GetProcAddress(aLibHandle, AnsiString(aProcName)));
{$ELSE} {$ELSE}
result := nil; result := nil;
{$ENDIF} {$ENDIF}
end; end;


procedure vkLoadAddresses(const aInstance: VkInstance = nil);
begin
{%IMPLEMENTATION%}
end;

procedure vkFreeLibrary(var aLibHandle: TvkLibHandle); procedure vkFreeLibrary(var aLibHandle: TvkLibHandle);
begin begin
if (aLibHandle <> InvalidLibHandle) then begin if (aLibHandle <> InvalidLibHandle) then begin
@@ -148,6 +166,7 @@ begin
end; end;
end; end;


{ ===================================== Vulkan Version Helpers ======================================= }
function vkMakeVersion(const aMajor, aMinor, aPatch: Integer): VkVersion; function vkMakeVersion(const aMajor, aMinor, aPatch: Integer): VkVersion;
begin begin
result := (aMajor shl 22) or (aMinor shl 12) or aPatch; result := (aMajor shl 22) or (aMinor shl 12) or aPatch;
@@ -168,21 +187,70 @@ begin
result := (aVersion and $FFF); result := (aVersion and $FFF);
end; end;


{ ===================================== Initialize Routines ========================================== }
function InitializeVulkan(const aLibName: String = VULKAN_LIBNAME): Boolean; function InitializeVulkan(const aLibName: String = VULKAN_LIBNAME): Boolean;
var success: Boolean;

function GetProcAddress(const aName: String): TvkVoidFunction;
begin
result := vkGetProcAddress(aName);
if not Assigned(result) then
success := false;
end;

begin begin
FinalizeVulkan; FinalizeVulkan;
vkLibHandle := vkLoadLibrary(aLibName); vkLibHandle := vkLoadLibrary(aLibName);
result := (vkLibHandle <> InvalidLibHandle);
if not result then
success := (vkLibHandle <> InvalidLibHandle);
if not success then
exit; exit;
vkGetInstanceProcAddr := TvkGetInstanceProcAddr(vkGetProcAddress('vkGetInstanceProcAddr'));
vkLoadAddresses(nil);
{%IMPLEMENTATION%}
result := success;
end; end;


procedure LoadVulkanCommands(const aInstance: VkInstance);
function LoadInstanceCommands(const aInstance: VkInstance; out aCommands: TVkInstanceCommands): Boolean;
var
success: Boolean;

function GetProcAddress(const aName: String): TvkVoidFunction;
begin
result := vkGetInstanceProcAddr(aInstance, PVkChar(aName));
if not Assigned(result) then
success := false;
end;

begin begin
vkLoadAddresses(aInstance);
end;
FillByte(aCommands, SizeOf(aCommands), 0);
success := true;
with aCommands do begin
{%INSTANCE_COMMANDS.IMPLEMENTATION%}
end;
result := success;
end;

function LoadDeviceCommands(const aInstance: VkInstance; const aDevice: VkDevice; out aCommands: TVkDeviceCommands): Boolean;
var
vkGetDeviceProcAddr: TvkGetDeviceProcAddr;
success: Boolean;

function GetProcAddress(const aName: String): TvkVoidFunction;
begin
result := vkGetDeviceProcAddr(aDevice, PVkChar(aName));
if not Assigned(result) then
success := false;
end;

begin
FillByte(aCommands, SizeOf(aCommands), 0);
vkGetDeviceProcAddr := TvkGetDeviceProcAddr(vkGetInstanceProcAddr(aInstance, 'vkGetDeviceProcAddr'));
success := true;
with aCommands do begin
{%DEVICE_COMMANDS.IMPLEMENTATION%}
end;
result := success;
end;


procedure FinalizeVulkan; procedure FinalizeVulkan;
begin begin


+ 8
- 8
projects/Vulkan.inc Bestand weergeven

@@ -1,11 +1,3 @@
{$IFDEF FPC}
{$MODE Delphi}
{$IFNDEF WINDOWS}
{$LINKLIB c}
{$ENDIF}
{$MINENUMSIZE 4}
{$ENDIF}

{$IFDEF Win32} {$IFDEF Win32}
{$DEFINE VK_WIN} {$DEFINE VK_WIN}
{$DEFINE VK_WIN32} {$DEFINE VK_WIN32}
@@ -27,3 +19,11 @@
{$DEFINE VK_MAC} {$DEFINE VK_MAC}
{$DEFINE VK_CDECL} {$DEFINE VK_CDECL}
{$ENDIF} {$ENDIF}

{$IF DEFINED(CPU64)}
{$DEFINE VK_CPU64}
{$ELSEIF DEFINED(CPU32)}
{$DEFINE VK_CPU32}
{$ELSEIF DEFINED(CPU16)}
{$DEFINE VK_CPU16}
{$ENDIF}

+ 575
- 471
projects/Vulkan.pas
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 193
- 96
projects/generator/HeaderGenerator.pas Bestand weergeven

@@ -61,10 +61,10 @@ type
TvkObject = class; TvkObject = class;
TvkObjectList = class(specialize TutlList<TvkObject>) TvkObjectList = class(specialize TutlList<TvkObject>)
public public
function IndexOfObj(const aName: DOMstring; const aTypes: TvkObjectTypes): Integer;
function FindObj(const aName: DOMstring; const aTypes: TvkObjectTypes; out aObject): Boolean;
function GetPascalName(const aName: DOMString; const aPointer: Integer; const aArrSize: WideString = ''): WideString;
function GenerateCode(const aName: String; const aCode: TStringTree): Boolean;
function IndexOfObj(const aName: WideString; const aTypes: TvkObjectTypes): Integer;
function FindObj(const aName: WideString; const aTypes: TvkObjectTypes; out aObject): Boolean;
function GetPascalName(const aName: WideString; const aPointer: Integer; const aArrSize: WideString = ''): WideString;
function GenerateCode(const aName: WideString; const aCode: TStringTree): Boolean;
procedure AddObject(const aObj: TvkObject); procedure AddObject(const aObj: TvkObject);
end; end;


@@ -72,8 +72,8 @@ type
TvkObject = class(TObject) TvkObject = class(TObject)
private private
fType: TvkObjectType; fType: TvkObjectType;
fName: DOMString;
fComment: DOMString;
fName: WideString;
fComment: WideString;
fList: TvkObjectList; fList: TvkObjectList;
protected protected
function GetDependencyOrder: Integer; virtual; function GetDependencyOrder: Integer; virtual;
@@ -82,8 +82,8 @@ type
{%H-}constructor Create(const aType: TvkObjectType); {%H-}constructor Create(const aType: TvkObjectType);
public public
property VkType: TvkObjectType read fType; property VkType: TvkObjectType read fType;
property Name: DOMString read fName write fName;
property Comment: DOMString read fComment write fComment;
property Name: WideString read fName write fName;
property Comment: WideString read fComment write fComment;
property List: TvkObjectList read fList write fList; property List: TvkObjectList read fList write fList;


function GetPascalName(const aPointer: Integer; const aArrSize: WideString): WideString; function GetPascalName(const aPointer: Integer; const aArrSize: WideString): WideString;
@@ -96,14 +96,14 @@ type
//////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////
TvkTypeBase = class(TvkObject) TvkTypeBase = class(TvkObject)
private private
fParent: DOMString;
fAlias: DOMString;
fParent: WideString;
fAlias: WideString;
protected protected
function GetDependencyOrder: Integer; override; function GetDependencyOrder: Integer; override;
procedure GenPascalName(var aName: WideString; const aPointer: Integer; const aArrSize: WideString); override; procedure GenPascalName(var aName: WideString; const aPointer: Integer; const aArrSize: WideString); override;
public public
property Parent: DOMString read fParent write fParent;
property Alias: DOMString read fAlias write fAlias;
property Parent: WideString read fParent write fParent;
property Alias: WideString read fAlias write fAlias;


procedure GenerateCode(const aCode: TStringTree); override; procedure GenerateCode(const aCode: TStringTree); override;
end; end;
@@ -117,8 +117,12 @@ type


//////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////
TvkHandle = class(TvkTypeBase) TvkHandle = class(TvkTypeBase)
private
fNonDispatchable: Boolean;
public public
property NonDispatchable: Boolean read fNonDispatchable write fNonDispatchable;
procedure ReadXml(const xml: TDOMNode); override; procedure ReadXml(const xml: TDOMNode); override;
procedure GenerateCode(const aCode: TStringTree); override;
constructor Create; constructor Create;
end; end;


@@ -126,8 +130,8 @@ type
TvkFunctionBase = class(TvkObject) TvkFunctionBase = class(TvkObject)
private type private type
TArgument = class(TObject) TArgument = class(TObject)
Typ: DOMString;
Name: DOMString;
Typ: WideString;
Name: WideString;
IsPointer: Integer; IsPointer: Integer;
IsConst: Boolean; IsConst: Boolean;
end; end;
@@ -169,9 +173,9 @@ type
TvkStruct = class(TvkObject) TvkStruct = class(TvkObject)
private type private type
TMember = class(TObject) TMember = class(TObject)
Typ: DOMString;
Name: DOMString;
ArrSize: DOMString;
Typ: WideString;
Name: WideString;
ArrSize: WideString;
IsPointer: Integer; IsPointer: Integer;
IsConst: Boolean; IsConst: Boolean;
end; end;
@@ -197,18 +201,18 @@ type
TvkEnum = class(TvkObject) TvkEnum = class(TvkObject)
private type private type
TValue = class(TObject) TValue = class(TObject)
Name: DOMString;
Name: WideString;
Value: Variant; Value: Variant;
IsBit: Boolean; IsBit: Boolean;
end; end;
TValueList = specialize TutlList<TValue>; TValueList = specialize TutlList<TValue>;
private private
fExpands: DOMString;
fExpands: WideString;
fValues: TValueList; fValues: TValueList;
protected protected
procedure GenPascalName(var aName: WideString; const aPointer: Integer; const aArrSize: WideString); override; procedure GenPascalName(var aName: WideString; const aPointer: Integer; const aArrSize: WideString); override;
public public
property Expands: DOMString read fExpands write fExpands;
property Expands: WideString read fExpands write fExpands;
property Values: TValueList read fValues; property Values: TValueList read fValues;
procedure ReadXml(const xml: TDOMNode); override; procedure ReadXml(const xml: TDOMNode); override;
procedure GenerateCode(const aCode: TStringTree); override; procedure GenerateCode(const aCode: TStringTree); override;
@@ -273,6 +277,9 @@ const
KEYWORD_VAR = 'VAR'; KEYWORD_VAR = 'VAR';
KEYWORD_CODE = 'CODE'; KEYWORD_CODE = 'CODE';


KEYWORD_INSTANCE_COMMANDS = 'INSTANCE_COMMANDS';
KEYWORD_DEVICE_COMMANDS = 'DEVICE_COMMANDS';

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function PointerCount(const aStr: AnsiString): Integer; function PointerCount(const aStr: AnsiString): Integer;
var i: Integer; var i: Integer;
@@ -340,7 +347,7 @@ begin
rx := TRegExpr.Create('^(T|P)?(Vk)?(.)'); rx := TRegExpr.Create('^(T|P)?(Vk)?(.)');
try try
if rx.Exec(String(aType)) if rx.Exec(String(aType))
then result := WideString(LowerCase(rx.Match[3]) + s)
then result := WideString(LowerCase(rx.Match[3])) + s
else result := 'm' + s; else result := 'm' + s;
finally finally
FreeAndNil(rx); FreeAndNil(rx);
@@ -365,13 +372,13 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure WriteResolveWarning(const aName: DOMString);
procedure WriteResolveWarning(const aName: WideString);
begin begin
WriteLn('WARNING! unable to resolve identifier: ' + aName); WriteLn('WARNING! unable to resolve identifier: ' + aName);
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function GetNodeValue(xml: TDOMNode; const aName: WideString): DOMString;
function GetNodeValue(xml: TDOMNode; const aName: WideString): WideString;
var x: TDOMNode; var x: TDOMNode;
begin begin
x := xml.FindNode(aName); x := xml.FindNode(aName);
@@ -381,7 +388,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TryGetNodeValue(xml: TDOMNode; const aName: WideString; out aValue: DOMString): Boolean;
function TryGetNodeValue(xml: TDOMNode; const aName: WideString; out aValue: WideString): Boolean;
var x: TDOMNode; var x: TDOMNode;
begin begin
x := xml.FindNode(aName); x := xml.FindNode(aName);
@@ -391,7 +398,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function GetNodeValue(xml: TDOMNode; const aName: WideString; const aDefault: DOMString): DOMString;
function GetNodeValue(xml: TDOMNode; const aName: WideString; const aDefault: WideString): WideString;
var x: TDOMNode; var x: TDOMNode;
begin begin
x := xml.FindNode(aName); x := xml.FindNode(aName);
@@ -401,7 +408,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function GetNodeAttrib(xml: TDOMNode; const aName: WideString): DOMString;
function GetNodeAttrib(xml: TDOMNode; const aName: WideString): WideString;
var x: TDOMNode; var x: TDOMNode;
begin begin
if xml.HasAttributes then begin if xml.HasAttributes then begin
@@ -415,7 +422,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TryGetNodeAttrib(xml: TDOMNode; const aName: WideString; out aValue: DOMString): Boolean;
function TryGetNodeAttrib(xml: TDOMNode; const aName: WideString; out aValue: WideString): Boolean;
var x: TDOMNode; var x: TDOMNode;
begin begin
result := true; result := true;
@@ -430,7 +437,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function GetNodeAttrib(xml: TDOMNode; const aName: WideString; const aDefault: DOMString): DOMString;
function GetNodeAttrib(xml: TDOMNode; const aName: WideString; const aDefault: WideString): WideString;
var x: TDOMNode; var x: TDOMNode;
begin begin
result := aDefault; result := aDefault;
@@ -577,7 +584,7 @@ end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//THeaderGenerator.TvkObjectList//////////////////////////////////////////////////////////////////////////////////////// //THeaderGenerator.TvkObjectList////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function THeaderGenerator.TvkObjectList.IndexOfObj(const aName: DOMstring; const aTypes: TvkObjectTypes): Integer;
function THeaderGenerator.TvkObjectList.IndexOfObj(const aName: WideString; const aTypes: TvkObjectTypes): Integer;
var o: TvkObject; var o: TvkObject;
begin begin
if (aName = '') then if (aName = '') then
@@ -592,7 +599,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function THeaderGenerator.TvkObjectList.FindObj(const aName: DOMstring; const aTypes: TvkObjectTypes; out aObject): Boolean;
function THeaderGenerator.TvkObjectList.FindObj(const aName: WideString; const aTypes: TvkObjectTypes; out aObject): Boolean;
var i: Integer; var i: Integer;
begin begin
i := IndexOfObj(aName, aTypes); i := IndexOfObj(aName, aTypes);
@@ -603,7 +610,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function THeaderGenerator.TvkObjectList.GetPascalName(const aName: DOMString; const aPointer: Integer;
function THeaderGenerator.TvkObjectList.GetPascalName(const aName: WideString; const aPointer: Integer;
const aArrSize: WideString): WideString; const aArrSize: WideString): WideString;
var o: TvkObject; var o: TvkObject;
begin begin
@@ -613,7 +620,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function THeaderGenerator.TvkObjectList.GenerateCode(const aName: String; const aCode: TStringTree): Boolean;
function THeaderGenerator.TvkObjectList.GenerateCode(const aName: WideString; const aCode: TStringTree): Boolean;
var o: TvkObject; var o: TvkObject;
begin begin
result := FindObj(aName, VK_OBJECT_ALL, o); result := FindObj(aName, VK_OBJECT_ALL, o);
@@ -689,7 +696,7 @@ end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class procedure THeaderGenerator.TvkObject.CreateFromXml(const xml: TDOMNode; const aList: TvkObjectList); class procedure THeaderGenerator.TvkObject.CreateFromXml(const xml: TDOMNode; const aList: TvkObjectList);
var var
s, n: DOMString;
s, n: WideString;


procedure GenerateVersionEnum; procedure GenerateVersionEnum;
var var
@@ -760,7 +767,7 @@ var
c.Name := GetNodeAttrib(x, 'name'); c.Name := GetNodeAttrib(x, 'name');
c.Value := StrToValue(String(GetNodeAttrib(x, 'value'))); c.Value := StrToValue(String(GetNodeAttrib(x, 'value')));
if (c.Value = Unassigned) then if (c.Value = Unassigned) then
raise Exception.Create('Invalid constant value: ' + GetNodeAttrib(x, 'value'));
raise Exception.Create('Invalid constant value: ' + String(GetNodeAttrib(x, 'value')));
aList.AddObject(c); aList.AddObject(c);
except except
FreeAndNil(c); FreeAndNil(c);
@@ -846,7 +853,7 @@ begin
st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_TYPES); st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_TYPES);
if (st.LinesBefore.Count = 0) then if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('type { simple types }'); st.LinesBefore.Add('type { simple types }');
st := st.GetOrCreateItem(fName);
st := st.GetOrCreateItem(String(fName));
if (st.LinesBefore.Count = 0) and (fParent <> '') and Assigned(List) then begin if (st.LinesBefore.Count = 0) and (fParent <> '') and Assigned(List) then begin
st.LinesBefore.Add(Format(' %-62s = %s;', [ fName, List.GetPascalName(fParent, 0) ])); st.LinesBefore.Add(Format(' %-62s = %s;', [ fName, List.GetPascalName(fParent, 0) ]));
st.LinesBefore.Add(Format(' P%-61s = ^%0:s;', [ fName ])); st.LinesBefore.Add(Format(' P%-61s = ^%0:s;', [ fName ]));
@@ -883,9 +890,36 @@ end;
procedure THeaderGenerator.TvkHandle.ReadXml(const xml: TDOMNode); procedure THeaderGenerator.TvkHandle.ReadXml(const xml: TDOMNode);
begin begin
inherited ReadXml(xml); inherited ReadXml(xml);
Name := GetNodeValue (xml, 'name');
//Parent := GetNodeAttrib(xml, 'parent', 'VkHandle');
Parent := 'VkHandle';
Name := GetNodeValue (xml, 'name');
fNonDispatchable := (GetNodeValue(xml, 'type') = 'VK_DEFINE_NON_DISPATCHABLE_HANDLE');
Parent := GetNodeAttrib(xml, 'parent', '');
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure THeaderGenerator.TvkHandle.GenerateCode(const aCode: TStringTree);
var
st: TStringTree;
s: String;
begin
if Assigned(fList) and (fParent <> '') then
fList.GenerateCode(fParent, aCode);
if Assigned(fList) and (fAlias <> '') then
fList.GenerateCode(fAlias, aCode);

st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_TYPES);
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('type { simple types }');
st := st.GetOrCreateItem(String(fName));
if (st.LinesBefore.Count = 0) then begin
s := '^_' + String(fName);
if fNonDispatchable then
s := '{$IFDEF VK_CPU64}' + s + '{$ELSE}VkNonDispatchableHandle{$ENDIF}';
st.LinesBefore.Add(Format(' %-62s = record end;', [ '_' + fName, s ]));
st.LinesBefore.Add(Format(' %-62s = %s;', [ fName, s ]));
st.LinesBefore.Add(Format(' P%-61s = ^%0:s;', [ fName ]));
st.LinesBefore.Add(Format(' PP%-60s = ^P%0:s;', [ fName ]));
st.LinesBefore.Add('');
end;
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -933,14 +967,14 @@ begin
fList.GenerateCode(a.Typ, aCode); fList.GenerateCode(a.Typ, aCode);
end; end;


st := aSub.GetOrCreateItem(GetPascalName(0, ''));
st := aSub.GetOrCreateItem(String(GetPascalName(0, '')));
if (st.LinesBefore.Count = 0) then begin if (st.LinesBefore.Count = 0) then begin
// head // head
s := WideString(Format(' %s', [ GetPascalName(0, '') ])); s := WideString(Format(' %s', [ GetPascalName(0, '') ]));
if (ReturnValue.Typ = 'void') and (ReturnValue.IsPointer = 0) if (ReturnValue.Typ = 'void') and (ReturnValue.IsPointer = 0)
then s := s + ' = procedure(' then s := s + ' = procedure('
else s := s + ' = function ('; else s := s + ' = function (';
st.LinesBefore.Add(s);
st.LinesBefore.Add(String(s));


// params // params
for i := 0 to fArguments.Count-1 do begin for i := 0 to fArguments.Count-1 do begin
@@ -949,10 +983,10 @@ begin
if a.IsConst if a.IsConst
then s := s + 'const ' then s := s + 'const '
else s := s + ' '; else s := s + ' ';
s := s + Format('%-30s%s', [ PrepareName(a.Name, a.Typ)+':', List.GetPascalName(a.Typ, a.IsPointer) ]);
s := s + WideString(Format('%-30s%s', [ PrepareName(a.Name, a.Typ)+':', List.GetPascalName(a.Typ, a.IsPointer) ]));
if (i < fArguments.Count-1) then if (i < fArguments.Count-1) then
s := s + '; '; s := s + '; ';
st.LinesBefore.Add(s);
st.LinesBefore.Add(String(s));
end; end;


// result // result
@@ -960,7 +994,7 @@ begin
if (ReturnValue.Typ <> 'void') or (ReturnValue.IsPointer > 0) then if (ReturnValue.Typ <> 'void') or (ReturnValue.IsPointer > 0) then
s := s + ': ' + List.GetPascalName(ReturnValue.Typ, ReturnValue.IsPointer); s := s + ': ' + List.GetPascalName(ReturnValue.Typ, ReturnValue.IsPointer);
s := s + '; {$IFDEF VK_CDECL}cdecl{$ELSE}stdcall{$ENDIF};'; s := s + '; {$IFDEF VK_CDECL}cdecl{$ELSE}stdcall{$ENDIF};';
st.LinesBefore.Add(s);
st.LinesBefore.Add(String(s));
st.LinesBefore.Add(''); st.LinesBefore.Add('');
end; end;
end; end;
@@ -1118,7 +1152,32 @@ end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure THeaderGenerator.TvkCommand.GenerateCode(const aCode: TStringTree); procedure THeaderGenerator.TvkCommand.GenerateCode(const aCode: TStringTree);
var st: TStringTree;

function GetStringTree(const aType: WideString): TStringTree;
var h: TvkTypeBase;
begin
result := nil;

if (fName = 'vkGetInstanceProcAddr') then
exit;

if (aType = 'VkInstance') or (fName = 'vkGetDeviceProcAddr') then begin
result := aCode.GetOrCreateItem(KEYWORD_INSTANCE_COMMANDS);
exit;
end;

if (aType = 'VkDevice') then begin
result := aCode.GetOrCreateItem(KEYWORD_DEVICE_COMMANDS);
exit;
end;

if not Assigned(List) or not List.FindObj(aType, [otHandle, otType], h) or (h.Parent = '') then
exit;
result := GetStringTree(h.Parent);
end;

var
st: TStringTree;
begin begin
inherited GenerateCode(aCode); inherited GenerateCode(aCode);
st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_COMMAND); st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_COMMAND);
@@ -1126,17 +1185,33 @@ begin
st.LinesBefore.Add('type { commands }'); st.LinesBefore.Add('type { commands }');
GenerateFunctionPtr(aCode, st); GenerateFunctionPtr(aCode, st);


st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_VAR);
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('var');
st := nil;
if (Arguments.Count > 0) then
st := GetStringTree(Arguments[0].Typ);


st := st.GetOrCreateItem(fName);
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add(Format(' %-50s%s;', [fName + ':', GetPascalName(0, '')]));
if Assigned(st) then begin
with st.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(String(fName)) do begin
if (LinesBefore.Count = 0) then
LinesBefore.Add(Format('%-50s%s;', [fName + ':', GetPascalName(0, '')]));
end;


st := aCode.GetOrCreateItem(KEYWORD_IMPL).GetOrCreateItem(KEYWORD_CODE).GetOrCreateItem(fName);
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add(Format(' %-50s := T%0:-50s(vkGetProcAddress(%-50saInstance));', [fName, '''' + fName + ''',']));
with st.GetOrCreateItem(KEYWORD_IMPL).GetOrCreateItem(String(fName)) do begin
if (LinesBefore.Count = 0) then
LinesBefore.Add(Format('%-50s := T%0:-50s(GetProcAddress(''%0:s''));', [fName]));
end;
end else begin
st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_VAR);
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('var');

st := st.GetOrCreateItem(String(fName));
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add(Format(' %-50s%s;', [fName + ':', GetPascalName(0, '')]));

st := aCode.GetOrCreateItem(KEYWORD_IMPL).GetOrCreateItem(KEYWORD_CODE).GetOrCreateItem(String(fName));
if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add(Format('%-50s := T%0:-50s(GetProcAddress(''%0:s''));', [fName]));
end;
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1248,7 +1323,7 @@ begin
st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_STRUCT); st := aCode.GetOrCreateItem(KEYWORD_INTF).GetOrCreateItem(KEYWORD_STRUCT);
if (st.LinesBefore.Count = 0) then if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('type { structures }'); st.LinesBefore.Add('type { structures }');
st := st.GetOrCreateItem(GetPascalName(0, ''));
st := st.GetOrCreateItem(String(GetPascalName(0, '')));
if (st.LinesBefore.Count = 0) then begin if (st.LinesBefore.Count = 0) then begin
postfix := ';'; postfix := ';';
indent := 50; indent := 50;
@@ -1356,7 +1431,7 @@ begin
.GetOrCreateItem(KEYWORD_ENUM); .GetOrCreateItem(KEYWORD_ENUM);
if (st.LinesBefore.Count = 0) then if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('type { enumerations }'); st.LinesBefore.Add('type { enumerations }');
st := st.GetOrCreateItem(fName);
st := st.GetOrCreateItem(String(fName));
if (st.LinesBefore.Count = 0) then begin if (st.LinesBefore.Count = 0) then begin
st.LinesBefore.Add(Format(' %s = (', [GetPascalName(0, '')])); st.LinesBefore.Add(Format(' %s = (', [GetPascalName(0, '')]));
postfix := ','; postfix := ',';
@@ -1405,7 +1480,7 @@ begin
.GetOrCreateItem(KEYWORD_CONST); .GetOrCreateItem(KEYWORD_CONST);
if (st.LinesBefore.Count = 0) then if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add('const'); st.LinesBefore.Add('const');
st := st.GetOrCreateItem(fName);
st := st.GetOrCreateItem(String(fName));
if (st.LinesBefore.Count = 0) then if (st.LinesBefore.Count = 0) then
st.LinesBefore.Add(Format(' %-62s = %s;', [fName, fValue])); st.LinesBefore.Add(Format(' %-62s = %s;', [fName, fValue]));
end; end;
@@ -1428,16 +1503,21 @@ var
Code: TStringTree; Code: TStringTree;
PosMap: TPosMap; PosMap: TPosMap;


procedure UpdateComment(const aRoot: TStringTree; const aName: String);
procedure UpdateComment(const aNames: array of String);
var var
i: Integer; i: Integer;
s, tmp: String;
name, s, tmp: String;
st: TStringTree; st: TStringTree;
begin begin
st := aRoot.GetOrCreateItem(aName);
if PosMap.TryGetValue(aName, i) and (st.ItemCount > i) and (CurrentName <> '') then
with st.CreateItemAt(aName + CurrentName, i).LinesBefore do begin
s := ' ' + CurrentName + ' ';
name := '';
st := Code;
for s in aNames do begin
st := st.GetOrCreateItem(s);
name := name + '.' + s;
end;
if PosMap.TryGetValue(name, i) and (st.ItemCount > i) and (CurrentName <> '') then
with st.CreateItemAt(name + String(CurrentName), i).LinesBefore do begin
s := ' ' + String(CurrentName) + ' ';
if ((Length(s) and 1) = 1) then if ((Length(s) and 1) = 1) then
s := s + '='; s := s + '=';
tmp := StringOfChar('=', (100 - Length(s)) div 2); tmp := StringOfChar('=', (100 - Length(s)) div 2);
@@ -1445,23 +1525,26 @@ var
Add(''); Add('');
Add(s); Add(s);
end; end;
PosMap[aName] := st.ItemCount;
PosMap[name] := st.ItemCount;
end; end;


procedure UpdateComments; procedure UpdateComments;
var st: TStringTree;
begin begin
st := Code.GetOrCreateItem(KEYWORD_INTF);
UpdateComment(st, KEYWORD_CONST);
UpdateComment(st, KEYWORD_TYPES);
UpdateComment(st, KEYWORD_ENUM);
UpdateComment(st, KEYWORD_FUNCPTR);
UpdateComment(st, KEYWORD_STRUCT);
UpdateComment(st, KEYWORD_COMMAND);
UpdateComment(st, KEYWORD_VAR);

st := Code.GetOrCreateItem(KEYWORD_IMPL);
UpdateComment(st, KEYWORD_CODE);
UpdateComment([KEYWORD_INTF, KEYWORD_CONST]);
UpdateComment([KEYWORD_INTF, KEYWORD_TYPES]);
UpdateComment([KEYWORD_INTF, KEYWORD_ENUM]);
UpdateComment([KEYWORD_INTF, KEYWORD_FUNCPTR]);
UpdateComment([KEYWORD_INTF, KEYWORD_STRUCT]);
UpdateComment([KEYWORD_INTF, KEYWORD_COMMAND]);
UpdateComment([KEYWORD_INTF, KEYWORD_VAR]);

UpdateComment([KEYWORD_IMPL, KEYWORD_VAR]);

UpdateComment([KEYWORD_INSTANCE_COMMANDS, KEYWORD_INTF]);
UpdateComment([KEYWORD_INSTANCE_COMMANDS, KEYWORD_IMPL]);

UpdateComment([KEYWORD_DEVICE_COMMANDS, KEYWORD_INTF]);
UpdateComment([KEYWORD_DEVICE_COMMANDS, KEYWORD_IMPL]);
end; end;


procedure AddGuard(const aTree: TStringTree; const aName: String); procedure AddGuard(const aTree: TStringTree; const aName: String);
@@ -1509,16 +1592,16 @@ var
var var
i: Integer; i: Integer;
begin begin
i := fObjects.IndexOfObj(aName, VK_OBJECT_ALL);
i := fObjects.IndexOfObj(WideString(aName), VK_OBJECT_ALL);
if (i >= 0) then if (i >= 0) then
fObjects[i].GenerateCode(Code); fObjects[i].GenerateCode(Code);
end; end;


function GenerateEnum(const xml: TDOMNode): Boolean; function GenerateEnum(const xml: TDOMNode): Boolean;
var var
name: DOMString;
ex: DOMString;
value: DOMString;
name: WideString;
ex: WideString;
value: WideString;
offset: Integer; offset: Integer;
s: String; s: String;
c: TvkConst; c: TvkConst;
@@ -1528,14 +1611,14 @@ var
if TryGetNodeAttrib(xml, 'extends', ex) then begin if TryGetNodeAttrib(xml, 'extends', ex) then begin
if (CurrentNumber <= 0) then if (CurrentNumber <= 0) then
raise Exception.Create('current extension has no number'); raise Exception.Create('current extension has no number');
offset := StrToInt(GetNodeAttrib(xml, 'offset'));
offset := StrToInt(String(GetNodeAttrib(xml, 'offset')));
offset := 1000000000 + 1000 * (CurrentNumber-1) + offset; offset := 1000000000 + 1000 * (CurrentNumber-1) + offset;
if (GetNodeAttrib(xml, 'dir', '') = '-') then if (GetNodeAttrib(xml, 'dir', '') = '-') then
offset := -1 * offset; offset := -1 * offset;
Code Code
.GetOrCreateItem(KEYWORD_INTF) .GetOrCreateItem(KEYWORD_INTF)
.GetOrCreateItem(KEYWORD_ENUM) .GetOrCreateItem(KEYWORD_ENUM)
.GetOrCreateItem(ex)
.GetOrCreateItem(String(ex))
.GetOrCreateItem(KEYWORD_ENUM_VALUES) .GetOrCreateItem(KEYWORD_ENUM_VALUES)
.LinesBefore.Add(Format(' %-60s = %s,', [name, IntToStr(offset)])); .LinesBefore.Add(Format(' %-60s = %s,', [name, IntToStr(offset)]));
end else begin end else begin
@@ -1565,10 +1648,10 @@ var
if (x.NodeName = 'type') or if (x.NodeName = 'type') or
(x.NodeName = 'command') then (x.NodeName = 'command') then
begin begin
GenerateFeatureCode(GetNodeAttrib(x, 'name'));
GenerateFeatureCode(String(GetNodeAttrib(x, 'name')));
end else if (x.NodeName = 'enum') then begin end else if (x.NodeName = 'enum') then begin
if not GenerateEnum(x) then if not GenerateEnum(x) then
GenerateFeatureCode(GetNodeAttrib(x, 'name'));
GenerateFeatureCode(String(GetNodeAttrib(x, 'name')));
end; end;
x := x.NextSibling; x := x.NextSibling;
end; end;
@@ -1577,11 +1660,11 @@ var
procedure Generate(const xml: TDOMNode); procedure Generate(const xml: TDOMNode);
var var
x: TDOMNode; x: TDOMNode;
g: DOMString;
g: WideString;
begin begin
UpdateComments; UpdateComments;
g := GetNodeAttrib(xml, 'protect', ''); g := GetNodeAttrib(xml, 'protect', '');
CreateGuard(g);
CreateGuard(String(g));
try try
CurrentName := GetNodeAttrib(xml, 'name'); CurrentName := GetNodeAttrib(xml, 'name');
if not TryStrToInt(String(GetNodeAttrib(xml, 'number', '-1')), CurrentNumber) then if not TryStrToInt(String(GetNodeAttrib(xml, 'number', '-1')), CurrentNumber) then
@@ -1594,7 +1677,7 @@ var
x := x.NextSibling; x := x.NextSibling;
end; end;
finally finally
CloseGuard(g);
CloseGuard(String(g));
UpdateComments; UpdateComments;
CurrentName := ''; CurrentName := '';
end; end;
@@ -1619,7 +1702,6 @@ var
procedure EnableExtensions; procedure EnableExtensions;
var var
x: TDOMNode; x: TDOMNode;
g: String;
begin begin
x := fDocument.DocumentElement.FindNode('extensions'); x := fDocument.DocumentElement.FindNode('extensions');
if not Assigned(x) then if not Assigned(x) then
@@ -1665,32 +1747,47 @@ var


procedure PrepareTemplate; procedure PrepareTemplate;
var var
sl: TStringList;
sl, tk: TStringList;
s, n: String; s, n: String;
st: TStringTree; st: TStringTree;
p0, p1: Integer;
p0, p1, SpaceCount, i: Integer;
begin begin
sl := TStringList.Create; sl := TStringList.Create;
tk := TStringList.Create;
try try
tk.Delimiter := '.';
sl.LoadFromFile(aTemplate); sl.LoadFromFile(aTemplate);
s := sl.Text; s := sl.Text;
p0 := Pos('{%', s); p0 := Pos('{%', s);
while (p0 > 0) do begin while (p0 > 0) do begin
SpaceCount := 0;
while (p0-1 > 0) and (s[p0-1] = ' ') do begin
inc(SpaceCount);
dec(p0);
end;
p1 := Pos('%}', s, p0); p1 := Pos('%}', s, p0);
if (p1 <= 0) then if (p1 <= 0) then
raise Exception.Create('unclosed tag in template'); raise Exception.Create('unclosed tag in template');
n := Trim(Copy(s, p0+2, p1-p0-2));
st := Code.Items[n];
n := Copy(s, p0, p1 - p0 + 2);
if Assigned(st)
then s := StringReplace(s, n, st.Text, [rfReplaceAll])
else s := StringReplace(s, n, '', [rfReplaceAll]);
n := Trim(Copy(s, p0+SpaceCount+2, p1-p0-SpaceCount-2));
tk.DelimitedText := n;
st := Code;
for n in tk do
st := st.GetOrCreateItem(n);
n := Copy(s, p0, p1 - p0 + 2);
if Assigned(st) then begin
sl.Text := st.Text;
for i := 0 to sl.Count-1 do
sl[i] := StringOfChar(' ', SpaceCount) + sl[i];
s := StringReplace(s, n, sl.Text, [rfReplaceAll])
end else
s := StringReplace(s, n, '', [rfReplaceAll]);
p0 := Pos('{%', s, p0); p0 := Pos('{%', s, p0);
end; end;
sl.Text := Trim(s); sl.Text := Trim(s);
RemoveEmptyLines(sl); RemoveEmptyLines(sl);
sl.SaveToFile(aOutput); sl.SaveToFile(aOutput);
finally finally
FreeAndNil(tk);
FreeAndNil(sl); FreeAndNil(sl);
end; end;
end; end;
@@ -1776,7 +1873,7 @@ end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure THeaderGenerator.Clear; procedure THeaderGenerator.Clear;


procedure CreateBaseType(const aName, aAlias, aParent: DOMString);
procedure CreateBaseType(const aName, aAlias, aParent: WideString);
var t: TvkTypeBase; var t: TvkTypeBase;
begin begin
t := TvkTypeBase.Create(otType); t := TvkTypeBase.Create(otType);


+ 69
- 239
projects/generator/generator.lps Bestand weergeven

@@ -4,335 +4,165 @@
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="9"/> <Version Value="9"/>
<BuildModes Active="Default"/> <BuildModes Active="Default"/>
<Units Count="25">
<Units Count="5">
<Unit0> <Unit0>
<Filename Value="generator.lpr"/> <Filename Value="generator.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<CursorPos Y="11"/>
<UsageCount Value="76"/>
<CursorPos X="3" Y="11"/>
<UsageCount Value="21"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="HeaderGenerator.pas"/> <Filename Value="HeaderGenerator.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<EditorIndex Value="4"/>
<TopLine Value="1125"/>
<CursorPos X="36" Y="1134"/>
<UsageCount Value="76"/>
<EditorIndex Value="1"/>
<UsageCount Value="21"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="Logger.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="5"/>
<CursorPos X="21" Y="27"/>
<UsageCount Value="26"/>
</Unit2>
<Unit3>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-xml\src\dom.pp"/>
<UnitName Value="DOM"/>
<EditorIndex Value="-1"/>
<TopLine Value="102"/>
<CursorPos X="3" Y="118"/>
<UsageCount Value="12"/>
</Unit3>
<Unit4>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-xml\src\xmlutils.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="12"/>
<CursorPos X="3" Y="28"/>
<UsageCount Value="12"/>
</Unit4>
<Unit5>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysutilh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="96"/>
<CursorPos X="19" Y="112"/>
<UsageCount Value="11"/>
</Unit5>
<Unit6>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysstrh.inc"/>
<EditorIndex Value="6"/>
<TopLine Value="57"/>
<CursorPos X="10" Y="72"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\systemh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="96"/>
<CursorPos X="16" Y="111"/>
<UsageCount Value="8"/>
</Unit7>
<Unit8>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\sysosh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="7"/>
<CursorPos X="3" Y="22"/>
<Filename Value="uutlGenerics.pas"/>
<EditorIndex Value="3"/>
<TopLine Value="1374"/>
<CursorPos X="63" Y="1393"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit8>
<Unit9>
<Filename Value="Vulkan.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="2438"/>
<CursorPos X="19" Y="2443"/>
<UsageCount Value="11"/>
</Unit9>
<Unit10>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\objpas.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="20"/>
<CursorPos X="23" Y="35"/>
<UsageCount Value="8"/>
</Unit10>
<Unit11>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\fgl.pp"/>
<EditorIndex Value="9"/>
<TopLine Value="1712"/>
<CursorPos Y="1735"/>
<UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="..\..\..\libTextSuite\OpenGlCore\dglOpenGL.pas"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="15048"/>
<CursorPos X="11" Y="14967"/>
<UsageCount Value="11"/>
</Unit12>
<Unit13>
<Filename Value="..\..\data\Vulkan.tpl"/>
<EditorIndex Value="-1"/>
<CursorPos X="40" Y="11"/>
<UsageCount Value="10"/>
<DefaultSyntaxHighlighter Value="None"/>
</Unit13>
<Unit14>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\dynlibh.inc"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="-1"/>
<TopLine Value="35"/>
<CursorPos X="25" Y="55"/>
<UsageCount Value="9"/>
</Unit14>
<Unit15>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\sysdlh.inc"/>
<EditorIndex Value="-1"/>
<CursorPos X="3" Y="17"/>
<UsageCount Value="8"/>
</Unit15>
<Unit16>
</Unit2>
<Unit3>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="4610"/>
<CursorPos X="9" Y="4689"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="..\Vulkan_new.pas"/>
<UnitName Value="Vulkan"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="350"/>
<UsageCount Value="8"/>
</Unit17>
<Unit18>
<Filename Value="..\Vulkan_old.pas"/>
<EditorIndex Value="3"/>
<TopLine Value="83"/>
<EditorIndex Value="2"/>
<TopLine Value="4423"/>
<CursorPos X="33" Y="4655"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="..\..\..\SpaceCrush\src\openglcore\uglcContext.pas"/>
</Unit3>
<Unit4>
<Filename Value="..\utils\uvkuSurfaceFactory.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="94"/>
<UsageCount Value="8"/>
</Unit19>
<Unit20>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\classes\classesh.inc"/>
<EditorIndex Value="10"/>
<TopLine Value="693"/>
<CursorPos X="14" Y="708"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysstr.inc"/>
<EditorIndex Value="7"/>
<TopLine Value="468"/>
<CursorPos X="5" Y="470"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit21>
<Unit22>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\ustringh.inc"/>
<EditorIndex Value="8"/>
<TopLine Value="89"/>
<CursorPos X="5" Y="104"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit22>
<Unit23>
<Filename Value="uutlGenerics.pas"/>
<EditorIndex Value="5"/>
<TopLine Value="1959"/>
<CursorPos X="18" Y="1974"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit23>
<Unit24>
<Filename Value="..\..\data\Vulkan.inc"/>
<EditorIndex Value="2"/>
<CursorPos X="19" Y="10"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit24>
<TopLine Value="247"/>
<CursorPos X="4" Y="275"/>
<UsageCount Value="10"/>
</Unit4>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="28">
<JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="HeaderGenerator.pas"/> <Filename Value="HeaderGenerator.pas"/>
<Caret Line="437" TopLine="421"/>
<Caret Line="1193" Column="73" TopLine="1178"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="HeaderGenerator.pas"/> <Filename Value="HeaderGenerator.pas"/>
<Caret Line="1585" Column="38" TopLine="1583"/>
<Caret Line="997" Column="33" TopLine="984"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="HeaderGenerator.pas"/> <Filename Value="HeaderGenerator.pas"/>
<Caret Line="962" Column="24" TopLine="948"/>
<Caret Line="989" Column="35" TopLine="974"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4443" Column="42" TopLine="4436"/>
<Filename Value="HeaderGenerator.pas"/>
<Caret Line="986" Column="7" TopLine="971"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="HeaderGenerator.pas"/> <Filename Value="HeaderGenerator.pas"/>
<Caret Line="1474" TopLine="1451"/>
<Caret Line="961" Column="3" TopLine="945"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4425" Column="61" TopLine="4410"/>
<Filename Value="HeaderGenerator.pas"/>
<Caret Line="912" Column="41" TopLine="897"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4431" Column="10" TopLine="4416"/>
<Filename Value="HeaderGenerator.pas"/>
<Caret Line="914" Column="17" TopLine="899"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4427" Column="10" TopLine="4416"/>
<Filename Value="HeaderGenerator.pas"/>
<Caret Line="970" Column="59" TopLine="955"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4431" Column="36" TopLine="4416"/>
<Filename Value="HeaderGenerator.pas"/>
<Caret Line="977" Column="33" TopLine="963"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4425" Column="21" TopLine="4416"/>
<Filename Value="uutlGenerics.pas"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4447" Column="57" TopLine="4432"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="777" Column="19" TopLine="762"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4431" Column="76" TopLine="4410"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="791" Column="28" TopLine="776"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4434" Column="26" TopLine="4416"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="817" Column="10" TopLine="802"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4700" Column="19" TopLine="4683"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="885" Column="77" TopLine="870"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4393" Column="7" TopLine="4376"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="830" TopLine="819"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4394" Column="21" TopLine="4379"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="885" Column="90" TopLine="870"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4700" Column="3" TopLine="4683"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="889" Column="77" TopLine="874"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4698" Column="40" TopLine="4683"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="920" Column="27" TopLine="905"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4699" Column="6" TopLine="4478"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="1014" Column="29" TopLine="999"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4434" Column="24" TopLine="4410"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="1027" Column="12" TopLine="1012"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4435" Column="23" TopLine="4419"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="1038" Column="19" TopLine="1023"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4436" Column="15" TopLine="4421"/>
<Filename Value="uutlGenerics.pas"/>
<Caret Line="1073" Column="46" TopLine="1058"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="..\Vulkan.pas"/>
<Caret Line="4435" TopLine="4421"/>
<Filename Value="generator.lpr"/>
<Caret Line="9" Column="58"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4450" Column="112" TopLine="4431"/>
<Caret Line="4455" Column="18" TopLine="4434"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4448" Column="6" TopLine="4425"/>
<Caret Line="4644" Column="115" TopLine="4641"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4429" Column="27" TopLine="4416"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4431" Column="67" TopLine="4416"/>
<Caret Line="4306" Column="20" TopLine="4299"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4486" TopLine="4481"/>
<Caret Line="4663" Column="5" TopLine="4649"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4689" Column="9" TopLine="4625"/>
<Caret Line="690" Column="70" TopLine="675"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="..\Vulkan.pas"/> <Filename Value="..\Vulkan.pas"/>
<Caret Line="4445" TopLine="4438"/>
<Caret Line="4565" Column="21" TopLine="4550"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectSession> </ProjectSession>
<Debugging>
<Watches Count="5">
<Item1>
<Expression Value="fName"/>
</Item1>
<Item2>
<Expression Value="result.fName"/>
</Item2>
<Item3>
<Expression Value="result.fReturnValue.Typ"/>
</Item3>
<Item4>
<Expression Value="m.Typ"/>
</Item4>
<Item5>
<Expression Value="self.fName"/>
</Item5>
</Watches>
</Debugging>
</CONFIG> </CONFIG>

Laden…
Annuleren
Opslaan