| @@ -33,7 +33,7 @@ | |||||
| <PackageName Value="LCL"/> | <PackageName Value="LCL"/> | ||||
| </Item1> | </Item1> | ||||
| </RequiredPackages> | </RequiredPackages> | ||||
| <Units Count="49"> | |||||
| <Units Count="50"> | |||||
| <Unit0> | <Unit0> | ||||
| <Filename Value="triangle.lpr"/> | <Filename Value="triangle.lpr"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| @@ -233,6 +233,10 @@ | |||||
| <Filename Value="..\utils\uvkuDescriptorSet.pas"/> | <Filename Value="..\utils\uvkuDescriptorSet.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| </Unit48> | </Unit48> | ||||
| <Unit49> | |||||
| <Filename Value="..\utils\uvkuSemaphore.pas"/> | |||||
| <IsPartOfProject Value="True"/> | |||||
| </Unit49> | |||||
| </Units> | </Units> | ||||
| </ProjectOptions> | </ProjectOptions> | ||||
| <CompilerOptions> | <CompilerOptions> | ||||
| @@ -8,7 +8,7 @@ uses | |||||
| cthreads, | cthreads, | ||||
| {$ENDIF}{$ENDIF} | {$ENDIF}{$ENDIF} | ||||
| SysUtils, Interfaces, Dialogs, Forms, | SysUtils, Interfaces, Dialogs, Forms, | ||||
| uMainForm, Vulkan, uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet; | |||||
| uMainForm, Vulkan, uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet, uvkuSemaphore; | |||||
| {$R *.res} | {$R *.res} | ||||
| @@ -4,13 +4,13 @@ | |||||
| <PathDelim Value="\"/> | <PathDelim Value="\"/> | ||||
| <Version Value="9"/> | <Version Value="9"/> | ||||
| <BuildModes Active="Default"/> | <BuildModes Active="Default"/> | ||||
| <Units Count="70"> | |||||
| <Units Count="71"> | |||||
| <Unit0> | <Unit0> | ||||
| <Filename Value="triangle.lpr"/> | <Filename Value="triangle.lpr"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <CursorPos X="20" Y="11"/> | <CursorPos X="20" Y="11"/> | ||||
| <UsageCount Value="124"/> | |||||
| <UsageCount Value="126"/> | |||||
| </Unit0> | </Unit0> | ||||
| <Unit1> | <Unit1> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| @@ -20,39 +20,41 @@ | |||||
| <ResourceBaseClass Value="Form"/> | <ResourceBaseClass Value="Form"/> | ||||
| <IsVisibleTab Value="True"/> | <IsVisibleTab Value="True"/> | ||||
| <EditorIndex Value="2"/> | <EditorIndex Value="2"/> | ||||
| <TopLine Value="115"/> | |||||
| <CursorPos X="3" Y="131"/> | |||||
| <TopLine Value="1105"/> | |||||
| <CursorPos X="28" Y="1131"/> | |||||
| <ExtraEditorCount Value="1"/> | <ExtraEditorCount Value="1"/> | ||||
| <ExtraEditor1> | <ExtraEditor1> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="29"/> | <TopLine Value="29"/> | ||||
| <CursorPos X="5" Y="46"/> | <CursorPos X="5" Y="46"/> | ||||
| </ExtraEditor1> | </ExtraEditor1> | ||||
| <UsageCount Value="124"/> | |||||
| <UsageCount Value="126"/> | |||||
| <Loaded Value="True"/> | <Loaded Value="True"/> | ||||
| <LoadedDesigner Value="True"/> | <LoadedDesigner Value="True"/> | ||||
| </Unit1> | </Unit1> | ||||
| <Unit2> | <Unit2> | ||||
| <Filename Value="..\Vulkan.pas"/> | <Filename Value="..\Vulkan.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="5"/> | |||||
| <TopLine Value="3006"/> | |||||
| <CursorPos X="79" Y="3022"/> | |||||
| <EditorIndex Value="11"/> | |||||
| <TopLine Value="3097"/> | |||||
| <CursorPos X="3" Y="3113"/> | |||||
| <ExtraEditorCount Value="1"/> | <ExtraEditorCount Value="1"/> | ||||
| <ExtraEditor1> | <ExtraEditor1> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="2730"/> | <TopLine Value="2730"/> | ||||
| <CursorPos Y="2754"/> | <CursorPos Y="2754"/> | ||||
| </ExtraEditor1> | </ExtraEditor1> | ||||
| <UsageCount Value="124"/> | |||||
| <UsageCount Value="126"/> | |||||
| <Loaded Value="True"/> | <Loaded Value="True"/> | ||||
| </Unit2> | </Unit2> | ||||
| <Unit3> | <Unit3> | ||||
| <Filename Value="..\utils\uvkuInstance.pas"/> | <Filename Value="..\utils\uvkuInstance.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | |||||
| <CursorPos X="45" Y="16"/> | |||||
| <UsageCount Value="122"/> | |||||
| <EditorIndex Value="7"/> | |||||
| <TopLine Value="39"/> | |||||
| <CursorPos X="21" Y="52"/> | |||||
| <UsageCount Value="124"/> | |||||
| <Loaded Value="True"/> | |||||
| </Unit3> | </Unit3> | ||||
| <Unit4> | <Unit4> | ||||
| <Filename Value="..\utils\uvkuInstanceFactory.pas"/> | <Filename Value="..\utils\uvkuInstanceFactory.pas"/> | ||||
| @@ -60,7 +62,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="13"/> | <TopLine Value="13"/> | ||||
| <CursorPos X="3" Y="29"/> | <CursorPos X="3" Y="29"/> | ||||
| <UsageCount Value="116"/> | |||||
| <UsageCount Value="118"/> | |||||
| </Unit4> | </Unit4> | ||||
| <Unit5> | <Unit5> | ||||
| <Filename Value="..\utils\uvkuPhysicalDevice.pas"/> | <Filename Value="..\utils\uvkuPhysicalDevice.pas"/> | ||||
| @@ -68,7 +70,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="68"/> | <TopLine Value="68"/> | ||||
| <CursorPos Y="87"/> | <CursorPos Y="87"/> | ||||
| <UsageCount Value="116"/> | |||||
| <UsageCount Value="118"/> | |||||
| </Unit5> | </Unit5> | ||||
| <Unit6> | <Unit6> | ||||
| <Filename Value="..\utils\uvkuAllocationHandler.pas"/> | <Filename Value="..\utils\uvkuAllocationHandler.pas"/> | ||||
| @@ -76,23 +78,24 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="11"/> | <TopLine Value="11"/> | ||||
| <CursorPos Y="36"/> | <CursorPos Y="36"/> | ||||
| <UsageCount Value="106"/> | |||||
| <UsageCount Value="108"/> | |||||
| </Unit6> | </Unit6> | ||||
| <Unit7> | <Unit7> | ||||
| <Filename Value="..\utils\uvkuDevice.pas"/> | <Filename Value="..\utils\uvkuDevice.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <TopLine Value="135"/> | |||||
| <CursorPos X="9" Y="62"/> | |||||
| <UsageCount Value="110"/> | |||||
| <TopLine Value="354"/> | |||||
| <CursorPos X="24" Y="386"/> | |||||
| <UsageCount Value="112"/> | |||||
| <Loaded Value="True"/> | <Loaded Value="True"/> | ||||
| </Unit7> | </Unit7> | ||||
| <Unit8> | <Unit8> | ||||
| <Filename Value="..\utils\uvkuDeviceFactory.pas"/> | <Filename Value="..\utils\uvkuDeviceFactory.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | |||||
| <TopLine Value="11"/> | |||||
| <CursorPos X="10" Y="18"/> | |||||
| <UsageCount Value="108"/> | |||||
| <EditorIndex Value="8"/> | |||||
| <TopLine Value="353"/> | |||||
| <CursorPos Y="385"/> | |||||
| <UsageCount Value="110"/> | |||||
| <Loaded Value="True"/> | |||||
| </Unit8> | </Unit8> | ||||
| <Unit9> | <Unit9> | ||||
| <Filename Value="..\utils\uvkuSurface.pas"/> | <Filename Value="..\utils\uvkuSurface.pas"/> | ||||
| @@ -100,7 +103,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="41"/> | <TopLine Value="41"/> | ||||
| <CursorPos X="94" Y="56"/> | <CursorPos X="94" Y="56"/> | ||||
| <UsageCount Value="103"/> | |||||
| <UsageCount Value="105"/> | |||||
| </Unit9> | </Unit9> | ||||
| <Unit10> | <Unit10> | ||||
| <Filename Value="..\utils\uvkuSurfaceFactory.pas"/> | <Filename Value="..\utils\uvkuSurfaceFactory.pas"/> | ||||
| @@ -108,22 +111,23 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="44"/> | <TopLine Value="44"/> | ||||
| <CursorPos X="33" Y="60"/> | <CursorPos X="33" Y="60"/> | ||||
| <UsageCount Value="102"/> | |||||
| <UsageCount Value="104"/> | |||||
| </Unit10> | </Unit10> | ||||
| <Unit11> | <Unit11> | ||||
| <Filename Value="..\utils\uvkuSwapChainFactory.pas"/> | <Filename Value="..\utils\uvkuSwapChainFactory.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <CursorPos X="3" Y="13"/> | <CursorPos X="3" Y="13"/> | ||||
| <UsageCount Value="93"/> | |||||
| <UsageCount Value="95"/> | |||||
| </Unit11> | </Unit11> | ||||
| <Unit12> | <Unit12> | ||||
| <Filename Value="..\utils\uvkuSwapChain.pas"/> | <Filename Value="..\utils\uvkuSwapChain.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | |||||
| <TopLine Value="7"/> | |||||
| <CursorPos X="36" Y="23"/> | |||||
| <UsageCount Value="92"/> | |||||
| <EditorIndex Value="5"/> | |||||
| <TopLine Value="73"/> | |||||
| <CursorPos X="24" Y="81"/> | |||||
| <UsageCount Value="94"/> | |||||
| <Loaded Value="True"/> | |||||
| </Unit12> | </Unit12> | ||||
| <Unit13> | <Unit13> | ||||
| <Filename Value="..\utils\uvkuImageView.pas"/> | <Filename Value="..\utils\uvkuImageView.pas"/> | ||||
| @@ -131,22 +135,23 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="40"/> | <TopLine Value="40"/> | ||||
| <CursorPos Y="48"/> | <CursorPos Y="48"/> | ||||
| <UsageCount Value="89"/> | |||||
| <UsageCount Value="91"/> | |||||
| </Unit13> | </Unit13> | ||||
| <Unit14> | <Unit14> | ||||
| <Filename Value="..\utils\uvkuImageViewFactory.pas"/> | <Filename Value="..\utils\uvkuImageViewFactory.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <CursorPos X="43" Y="9"/> | <CursorPos X="43" Y="9"/> | ||||
| <UsageCount Value="89"/> | |||||
| <UsageCount Value="91"/> | |||||
| </Unit14> | </Unit14> | ||||
| <Unit15> | <Unit15> | ||||
| <Filename Value="..\utils\uvkuImage.pas"/> | <Filename Value="..\utils\uvkuImage.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | |||||
| <TopLine Value="173"/> | |||||
| <CursorPos X="36" Y="195"/> | |||||
| <UsageCount Value="88"/> | |||||
| <EditorIndex Value="3"/> | |||||
| <TopLine Value="166"/> | |||||
| <CursorPos X="24" Y="198"/> | |||||
| <UsageCount Value="90"/> | |||||
| <Loaded Value="True"/> | |||||
| </Unit15> | </Unit15> | ||||
| <Unit16> | <Unit16> | ||||
| <Filename Value="..\utils\uvkuBase.pas"/> | <Filename Value="..\utils\uvkuBase.pas"/> | ||||
| @@ -154,7 +159,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="10"/> | <TopLine Value="10"/> | ||||
| <CursorPos X="3" Y="26"/> | <CursorPos X="3" Y="26"/> | ||||
| <UsageCount Value="87"/> | |||||
| <UsageCount Value="89"/> | |||||
| </Unit16> | </Unit16> | ||||
| <Unit17> | <Unit17> | ||||
| <Filename Value="..\utils\uvkuDeviceMemory.pas"/> | <Filename Value="..\utils\uvkuDeviceMemory.pas"/> | ||||
| @@ -162,7 +167,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="10"/> | <TopLine Value="10"/> | ||||
| <CursorPos X="17" Y="23"/> | <CursorPos X="17" Y="23"/> | ||||
| <UsageCount Value="85"/> | |||||
| <UsageCount Value="87"/> | |||||
| </Unit17> | </Unit17> | ||||
| <Unit18> | <Unit18> | ||||
| <Filename Value="..\utils\uvkuBuffer.pas"/> | <Filename Value="..\utils\uvkuBuffer.pas"/> | ||||
| @@ -170,7 +175,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="85"/> | <TopLine Value="85"/> | ||||
| <CursorPos X="42" Y="100"/> | <CursorPos X="42" Y="100"/> | ||||
| <UsageCount Value="84"/> | |||||
| <UsageCount Value="86"/> | |||||
| </Unit18> | </Unit18> | ||||
| <Unit19> | <Unit19> | ||||
| <Filename Value="..\utils\uvkuImageFactory.pas"/> | <Filename Value="..\utils\uvkuImageFactory.pas"/> | ||||
| @@ -178,15 +183,15 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="32"/> | <TopLine Value="32"/> | ||||
| <CursorPos Y="41"/> | <CursorPos Y="41"/> | ||||
| <UsageCount Value="84"/> | |||||
| <UsageCount Value="86"/> | |||||
| </Unit19> | </Unit19> | ||||
| <Unit20> | <Unit20> | ||||
| <Filename Value="..\utils\uvkuTypes.pas"/> | <Filename Value="..\utils\uvkuTypes.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="1"/> | <EditorIndex Value="1"/> | ||||
| <TopLine Value="93"/> | <TopLine Value="93"/> | ||||
| <CursorPos X="3" Y="109"/> | |||||
| <UsageCount Value="84"/> | |||||
| <CursorPos X="66" Y="100"/> | |||||
| <UsageCount Value="86"/> | |||||
| <Loaded Value="True"/> | <Loaded Value="True"/> | ||||
| </Unit20> | </Unit20> | ||||
| <Unit21> | <Unit21> | ||||
| @@ -195,7 +200,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="18"/> | <TopLine Value="18"/> | ||||
| <CursorPos Y="27"/> | <CursorPos Y="27"/> | ||||
| <UsageCount Value="83"/> | |||||
| <UsageCount Value="85"/> | |||||
| </Unit21> | </Unit21> | ||||
| <Unit22> | <Unit22> | ||||
| <Filename Value="..\utils\uvkuBufferView.pas"/> | <Filename Value="..\utils\uvkuBufferView.pas"/> | ||||
| @@ -203,14 +208,14 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="52"/> | <TopLine Value="52"/> | ||||
| <CursorPos X="56" Y="76"/> | <CursorPos X="56" Y="76"/> | ||||
| <UsageCount Value="83"/> | |||||
| <UsageCount Value="85"/> | |||||
| </Unit22> | </Unit22> | ||||
| <Unit23> | <Unit23> | ||||
| <Filename Value="..\utils\uvkuBufferViewFactory.pas"/> | <Filename Value="..\utils\uvkuBufferViewFactory.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <CursorPos X="31" Y="45"/> | <CursorPos X="31" Y="45"/> | ||||
| <UsageCount Value="82"/> | |||||
| <UsageCount Value="84"/> | |||||
| </Unit23> | </Unit23> | ||||
| <Unit24> | <Unit24> | ||||
| <Filename Value="..\utils\uvkuCommandPool.pas"/> | <Filename Value="..\utils\uvkuCommandPool.pas"/> | ||||
| @@ -218,7 +223,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="61"/> | <TopLine Value="61"/> | ||||
| <CursorPos X="3" Y="64"/> | <CursorPos X="3" Y="64"/> | ||||
| <UsageCount Value="82"/> | |||||
| <UsageCount Value="84"/> | |||||
| </Unit24> | </Unit24> | ||||
| <Unit25> | <Unit25> | ||||
| <Filename Value="..\utils\uvkuCommandPoolFactory.pas"/> | <Filename Value="..\utils\uvkuCommandPoolFactory.pas"/> | ||||
| @@ -226,32 +231,33 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="23"/> | <TopLine Value="23"/> | ||||
| <CursorPos X="3" Y="34"/> | <CursorPos X="3" Y="34"/> | ||||
| <UsageCount Value="81"/> | |||||
| <UsageCount Value="83"/> | |||||
| </Unit25> | </Unit25> | ||||
| <Unit26> | <Unit26> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="4"/> | |||||
| <TopLine Value="311"/> | |||||
| <CursorPos X="16" Y="267"/> | |||||
| <UsageCount Value="81"/> | |||||
| <EditorIndex Value="10"/> | |||||
| <TopLine Value="198"/> | |||||
| <CursorPos X="24" Y="198"/> | |||||
| <UsageCount Value="83"/> | |||||
| <Loaded Value="True"/> | <Loaded Value="True"/> | ||||
| </Unit26> | </Unit26> | ||||
| <Unit27> | <Unit27> | ||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | <Filename Value="..\utils\uvkuQueue.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | |||||
| <TopLine Value="5"/> | |||||
| <CursorPos X="7" Y="22"/> | |||||
| <UsageCount Value="81"/> | |||||
| <EditorIndex Value="4"/> | |||||
| <TopLine Value="75"/> | |||||
| <CursorPos X="24" Y="107"/> | |||||
| <UsageCount Value="83"/> | |||||
| <Loaded Value="True"/> | |||||
| </Unit27> | </Unit27> | ||||
| <Unit28> | <Unit28> | ||||
| <Filename Value="..\utils\VulkanUtils.pas"/> | <Filename Value="..\utils\VulkanUtils.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="3"/> | |||||
| <TopLine Value="75"/> | |||||
| <CursorPos X="3" Y="90"/> | |||||
| <UsageCount Value="80"/> | |||||
| <EditorIndex Value="9"/> | |||||
| <TopLine Value="125"/> | |||||
| <CursorPos X="75" Y="134"/> | |||||
| <UsageCount Value="82"/> | |||||
| <Loaded Value="True"/> | <Loaded Value="True"/> | ||||
| </Unit28> | </Unit28> | ||||
| <Unit29> | <Unit29> | ||||
| @@ -260,7 +266,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="472"/> | <TopLine Value="472"/> | ||||
| <CursorPos Y="492"/> | <CursorPos Y="492"/> | ||||
| <UsageCount Value="97"/> | |||||
| <UsageCount Value="99"/> | |||||
| </Unit29> | </Unit29> | ||||
| <Unit30> | <Unit30> | ||||
| <Filename Value="..\utils\uvkuRenderPass.pas"/> | <Filename Value="..\utils\uvkuRenderPass.pas"/> | ||||
| @@ -268,7 +274,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="52"/> | <TopLine Value="52"/> | ||||
| <CursorPos Y="77"/> | <CursorPos Y="77"/> | ||||
| <UsageCount Value="78"/> | |||||
| <UsageCount Value="80"/> | |||||
| </Unit30> | </Unit30> | ||||
| <Unit31> | <Unit31> | ||||
| <Filename Value="..\utils\uvkuRenderPassFactory.pas"/> | <Filename Value="..\utils\uvkuRenderPassFactory.pas"/> | ||||
| @@ -276,7 +282,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="286"/> | <TopLine Value="286"/> | ||||
| <CursorPos X="39" Y="304"/> | <CursorPos X="39" Y="304"/> | ||||
| <UsageCount Value="78"/> | |||||
| <UsageCount Value="80"/> | |||||
| </Unit31> | </Unit31> | ||||
| <Unit32> | <Unit32> | ||||
| <Filename Value="..\utils\uvkuFactoryBase.pas"/> | <Filename Value="..\utils\uvkuFactoryBase.pas"/> | ||||
| @@ -284,7 +290,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="7"/> | <TopLine Value="7"/> | ||||
| <CursorPos X="69" Y="9"/> | <CursorPos X="69" Y="9"/> | ||||
| <UsageCount Value="78"/> | |||||
| <UsageCount Value="80"/> | |||||
| </Unit32> | </Unit32> | ||||
| <Unit33> | <Unit33> | ||||
| <Filename Value="..\utils\uvkuFrameBuffer.pas"/> | <Filename Value="..\utils\uvkuFrameBuffer.pas"/> | ||||
| @@ -292,7 +298,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="33"/> | <TopLine Value="33"/> | ||||
| <CursorPos X="150" Y="40"/> | <CursorPos X="150" Y="40"/> | ||||
| <UsageCount Value="76"/> | |||||
| <UsageCount Value="78"/> | |||||
| </Unit33> | </Unit33> | ||||
| <Unit34> | <Unit34> | ||||
| <Filename Value="..\utils\uvkuFrameBufferFactory.pas"/> | <Filename Value="..\utils\uvkuFrameBufferFactory.pas"/> | ||||
| @@ -300,14 +306,14 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="12"/> | <TopLine Value="12"/> | ||||
| <CursorPos X="25" Y="27"/> | <CursorPos X="25" Y="27"/> | ||||
| <UsageCount Value="76"/> | |||||
| <UsageCount Value="78"/> | |||||
| </Unit34> | </Unit34> | ||||
| <Unit35> | <Unit35> | ||||
| <Filename Value="..\utils\uvkuDescriptorSetLayout.pas"/> | <Filename Value="..\utils\uvkuDescriptorSetLayout.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <CursorPos X="150" Y="12"/> | <CursorPos X="150" Y="12"/> | ||||
| <UsageCount Value="76"/> | |||||
| <UsageCount Value="78"/> | |||||
| </Unit35> | </Unit35> | ||||
| <Unit36> | <Unit36> | ||||
| <Filename Value="..\utils\uvkuDescriptorSetLayoutFactory.pas"/> | <Filename Value="..\utils\uvkuDescriptorSetLayoutFactory.pas"/> | ||||
| @@ -315,7 +321,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="89"/> | <TopLine Value="89"/> | ||||
| <CursorPos X="3" Y="106"/> | <CursorPos X="3" Y="106"/> | ||||
| <UsageCount Value="75"/> | |||||
| <UsageCount Value="77"/> | |||||
| </Unit36> | </Unit36> | ||||
| <Unit37> | <Unit37> | ||||
| <Filename Value="..\utils\uvkuPipelineLayout.pas"/> | <Filename Value="..\utils\uvkuPipelineLayout.pas"/> | ||||
| @@ -323,7 +329,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="48"/> | <TopLine Value="48"/> | ||||
| <CursorPos X="150" Y="53"/> | <CursorPos X="150" Y="53"/> | ||||
| <UsageCount Value="75"/> | |||||
| <UsageCount Value="77"/> | |||||
| </Unit37> | </Unit37> | ||||
| <Unit38> | <Unit38> | ||||
| <Filename Value="..\utils\uvkuPipelineLayoutFactory.pas"/> | <Filename Value="..\utils\uvkuPipelineLayoutFactory.pas"/> | ||||
| @@ -331,7 +337,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="10"/> | <TopLine Value="10"/> | ||||
| <CursorPos X="37" Y="112"/> | <CursorPos X="37" Y="112"/> | ||||
| <UsageCount Value="75"/> | |||||
| <UsageCount Value="77"/> | |||||
| </Unit38> | </Unit38> | ||||
| <Unit39> | <Unit39> | ||||
| <Filename Value="..\utils\uvkuShaderModule.pas"/> | <Filename Value="..\utils\uvkuShaderModule.pas"/> | ||||
| @@ -339,7 +345,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="39"/> | <TopLine Value="39"/> | ||||
| <CursorPos Y="61"/> | <CursorPos Y="61"/> | ||||
| <UsageCount Value="73"/> | |||||
| <UsageCount Value="75"/> | |||||
| </Unit39> | </Unit39> | ||||
| <Unit40> | <Unit40> | ||||
| <Filename Value="..\utils\uvkuShaderModuleFactory.pas"/> | <Filename Value="..\utils\uvkuShaderModuleFactory.pas"/> | ||||
| @@ -347,7 +353,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="136"/> | <TopLine Value="136"/> | ||||
| <CursorPos Y="159"/> | <CursorPos Y="159"/> | ||||
| <UsageCount Value="73"/> | |||||
| <UsageCount Value="75"/> | |||||
| </Unit40> | </Unit40> | ||||
| <Unit41> | <Unit41> | ||||
| <Filename Value="..\utils\uvkuPipeline.pas"/> | <Filename Value="..\utils\uvkuPipeline.pas"/> | ||||
| @@ -355,13 +361,13 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="9"/> | <TopLine Value="9"/> | ||||
| <CursorPos Y="12"/> | <CursorPos Y="12"/> | ||||
| <UsageCount Value="71"/> | |||||
| <UsageCount Value="73"/> | |||||
| </Unit41> | </Unit41> | ||||
| <Unit42> | <Unit42> | ||||
| <Filename Value="..\utils\uvkuPipelineFactory.pas"/> | <Filename Value="..\utils\uvkuPipelineFactory.pas"/> | ||||
| <IsPartOfProject Value="True"/> | <IsPartOfProject Value="True"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <UsageCount Value="70"/> | |||||
| <UsageCount Value="72"/> | |||||
| </Unit42> | </Unit42> | ||||
| <Unit43> | <Unit43> | ||||
| <Filename Value="..\utils\uvkuDebugReporter.pas"/> | <Filename Value="..\utils\uvkuDebugReporter.pas"/> | ||||
| @@ -369,7 +375,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="84"/> | <TopLine Value="84"/> | ||||
| <CursorPos X="32" Y="103"/> | <CursorPos X="32" Y="103"/> | ||||
| <UsageCount Value="48"/> | |||||
| <UsageCount Value="50"/> | |||||
| </Unit43> | </Unit43> | ||||
| <Unit44> | <Unit44> | ||||
| <Filename Value="..\utils\uvkuPipelineCache.pas"/> | <Filename Value="..\utils\uvkuPipelineCache.pas"/> | ||||
| @@ -377,7 +383,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="18"/> | <TopLine Value="18"/> | ||||
| <CursorPos X="13" Y="38"/> | <CursorPos X="13" Y="38"/> | ||||
| <UsageCount Value="42"/> | |||||
| <UsageCount Value="44"/> | |||||
| </Unit44> | </Unit44> | ||||
| <Unit45> | <Unit45> | ||||
| <Filename Value="..\utils\uvkuPipelineCacheFactory.pas"/> | <Filename Value="..\utils\uvkuPipelineCacheFactory.pas"/> | ||||
| @@ -385,7 +391,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="33"/> | <TopLine Value="33"/> | ||||
| <CursorPos X="84" Y="61"/> | <CursorPos X="84" Y="61"/> | ||||
| <UsageCount Value="42"/> | |||||
| <UsageCount Value="44"/> | |||||
| </Unit45> | </Unit45> | ||||
| <Unit46> | <Unit46> | ||||
| <Filename Value="..\utils\uvkuDescriptorPool.pas"/> | <Filename Value="..\utils\uvkuDescriptorPool.pas"/> | ||||
| @@ -393,7 +399,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="16"/> | <TopLine Value="16"/> | ||||
| <CursorPos X="5" Y="16"/> | <CursorPos X="5" Y="16"/> | ||||
| <UsageCount Value="29"/> | |||||
| <UsageCount Value="31"/> | |||||
| </Unit46> | </Unit46> | ||||
| <Unit47> | <Unit47> | ||||
| <Filename Value="..\utils\uvkuDescriptorPoolFactory.pas"/> | <Filename Value="..\utils\uvkuDescriptorPoolFactory.pas"/> | ||||
| @@ -401,7 +407,7 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="7"/> | <TopLine Value="7"/> | ||||
| <CursorPos X="68" Y="31"/> | <CursorPos X="68" Y="31"/> | ||||
| <UsageCount Value="29"/> | |||||
| <UsageCount Value="31"/> | |||||
| </Unit47> | </Unit47> | ||||
| <Unit48> | <Unit48> | ||||
| <Filename Value="..\utils\uvkuDescriptorSet.pas"/> | <Filename Value="..\utils\uvkuDescriptorSet.pas"/> | ||||
| @@ -409,287 +415,291 @@ | |||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="11"/> | <TopLine Value="11"/> | ||||
| <CursorPos Y="51"/> | <CursorPos Y="51"/> | ||||
| <UsageCount Value="28"/> | |||||
| <UsageCount Value="30"/> | |||||
| </Unit48> | </Unit48> | ||||
| <Unit49> | <Unit49> | ||||
| <Filename Value="..\utils\uvkuSemaphore.pas"/> | |||||
| <IsPartOfProject Value="True"/> | |||||
| <EditorIndex Value="6"/> | |||||
| <TopLine Value="21"/> | |||||
| <CursorPos X="24" Y="53"/> | |||||
| <UsageCount Value="21"/> | |||||
| <Loaded Value="True"/> | |||||
| </Unit49> | |||||
| <Unit50> | |||||
| <Filename Value="..\utils\uvkuPhysicalDeviceFactory.pas"/> | <Filename Value="..\utils\uvkuPhysicalDeviceFactory.pas"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="5"/> | <TopLine Value="5"/> | ||||
| <CursorPos X="19" Y="17"/> | <CursorPos X="19" Y="17"/> | ||||
| <UsageCount Value="44"/> | |||||
| </Unit49> | |||||
| <Unit50> | |||||
| <UsageCount Value="43"/> | |||||
| </Unit50> | |||||
| <Unit51> | |||||
| <Filename Value="..\..\data\Vulkan.tpl"/> | <Filename Value="..\..\data\Vulkan.tpl"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="44"/> | <TopLine Value="44"/> | ||||
| <CursorPos X="27" Y="22"/> | <CursorPos X="27" Y="22"/> | ||||
| <UsageCount Value="8"/> | |||||
| <UsageCount Value="7"/> | |||||
| <DefaultSyntaxHighlighter Value="None"/> | <DefaultSyntaxHighlighter Value="None"/> | ||||
| </Unit50> | |||||
| <Unit51> | |||||
| </Unit51> | |||||
| <Unit52> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-base\src\custapp.pp"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-base\src\custapp.pp"/> | ||||
| <UnitName Value="CustApp"/> | <UnitName Value="CustApp"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="13"/> | <TopLine Value="13"/> | ||||
| <CursorPos X="3" Y="30"/> | <CursorPos X="3" Y="30"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit51> | |||||
| <Unit52> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit52> | |||||
| <Unit53> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\objpash.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\objpash.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="181"/> | <TopLine Value="181"/> | ||||
| <CursorPos X="23" Y="197"/> | <CursorPos X="23" Y="197"/> | ||||
| <UsageCount Value="8"/> | |||||
| </Unit52> | |||||
| <Unit53> | |||||
| <UsageCount Value="7"/> | |||||
| </Unit53> | |||||
| <Unit54> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\include\customform.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\include\customform.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="910"/> | <TopLine Value="910"/> | ||||
| <CursorPos Y="927"/> | <CursorPos Y="927"/> | ||||
| <UsageCount Value="8"/> | |||||
| </Unit53> | |||||
| <Unit54> | |||||
| <UsageCount Value="7"/> | |||||
| </Unit54> | |||||
| <Unit55> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysstrh.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysstrh.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="96"/> | <TopLine Value="96"/> | ||||
| <CursorPos X="10" Y="112"/> | <CursorPos X="10" Y="112"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit54> | |||||
| <Unit55> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit55> | |||||
| <Unit56> | |||||
| <Filename Value="..\Vulkan_old.pas"/> | <Filename Value="..\Vulkan_old.pas"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <WindowIndex Value="-1"/> | <WindowIndex Value="-1"/> | ||||
| <TopLine Value="2195"/> | <TopLine Value="2195"/> | ||||
| <CursorPos X="3" Y="2211"/> | <CursorPos X="3" Y="2211"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit55> | |||||
| <Unit56> | |||||
| <Filename Value="..\Vulkan.inc"/> | |||||
| <EditorIndex Value="-1"/> | |||||
| <UsageCount Value="8"/> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit56> | </Unit56> | ||||
| <Unit57> | <Unit57> | ||||
| <Filename Value="..\Vulkan.inc"/> | |||||
| <EditorIndex Value="-1"/> | |||||
| <UsageCount Value="7"/> | |||||
| </Unit57> | |||||
| <Unit58> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\forms.pp"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\forms.pp"/> | ||||
| <UnitName Value="Forms"/> | <UnitName Value="Forms"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="1249"/> | <TopLine Value="1249"/> | ||||
| <CursorPos X="3" Y="1268"/> | <CursorPos X="3" Y="1268"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit57> | |||||
| <Unit58> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit58> | |||||
| <Unit59> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\classes\classesh.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\classes\classesh.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="2100"/> | <TopLine Value="2100"/> | ||||
| <CursorPos X="38" Y="2125"/> | <CursorPos X="38" Y="2125"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit58> | |||||
| <Unit59> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit59> | |||||
| <Unit60> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\extctrls.pp"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\extctrls.pp"/> | ||||
| <UnitName Value="ExtCtrls"/> | <UnitName Value="ExtCtrls"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="1023"/> | <TopLine Value="1023"/> | ||||
| <CursorPos X="3" Y="1038"/> | <CursorPos X="3" Y="1038"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit59> | |||||
| <Unit60> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit60> | |||||
| <Unit61> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\controls.pp"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\controls.pp"/> | ||||
| <UnitName Value="Controls"/> | <UnitName Value="Controls"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="2240"/> | <TopLine Value="2240"/> | ||||
| <CursorPos X="3" Y="2255"/> | <CursorPos X="3" Y="2255"/> | ||||
| <UsageCount Value="4"/> | |||||
| </Unit60> | |||||
| <Unit61> | |||||
| <UsageCount Value="3"/> | |||||
| </Unit61> | |||||
| <Unit62> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysutilh.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysutilh.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="22"/> | <TopLine Value="22"/> | ||||
| <CursorPos X="4" Y="37"/> | <CursorPos X="4" Y="37"/> | ||||
| <UsageCount Value="6"/> | |||||
| </Unit61> | |||||
| <Unit62> | |||||
| <UsageCount Value="5"/> | |||||
| </Unit62> | |||||
| <Unit63> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\sysosh.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\sysosh.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="7"/> | <TopLine Value="7"/> | ||||
| <CursorPos X="3" Y="22"/> | <CursorPos X="3" Y="22"/> | ||||
| <UsageCount Value="6"/> | |||||
| </Unit62> | |||||
| <Unit63> | |||||
| <UsageCount Value="5"/> | |||||
| </Unit63> | |||||
| <Unit64> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\systemh.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\systemh.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="93"/> | <TopLine Value="93"/> | ||||
| <CursorPos X="19" Y="108"/> | <CursorPos X="19" Y="108"/> | ||||
| <UsageCount Value="6"/> | |||||
| </Unit63> | |||||
| <Unit64> | |||||
| <UsageCount Value="5"/> | |||||
| </Unit64> | |||||
| <Unit65> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\ascdef.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\ascdef.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="57"/> | <TopLine Value="57"/> | ||||
| <CursorPos X="10" Y="72"/> | <CursorPos X="10" Y="72"/> | ||||
| <UsageCount Value="6"/> | |||||
| </Unit64> | |||||
| <Unit65> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win32\windows.pp"/> | |||||
| <EditorIndex Value="-1"/> | |||||
| <UsageCount Value="6"/> | |||||
| <UsageCount Value="5"/> | |||||
| </Unit65> | </Unit65> | ||||
| <Unit66> | <Unit66> | ||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win32\windows.pp"/> | |||||
| <EditorIndex Value="-1"/> | |||||
| <UsageCount Value="5"/> | |||||
| </Unit66> | |||||
| <Unit67> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\base.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\base.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="84"/> | <TopLine Value="84"/> | ||||
| <CursorPos X="6" Y="99"/> | <CursorPos X="6" Y="99"/> | ||||
| <UsageCount Value="6"/> | |||||
| </Unit66> | |||||
| <Unit67> | |||||
| <UsageCount Value="5"/> | |||||
| </Unit67> | |||||
| <Unit68> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\typinfo.pp"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\typinfo.pp"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="97"/> | <TopLine Value="97"/> | ||||
| <CursorPos X="7" Y="113"/> | <CursorPos X="7" Y="113"/> | ||||
| <UsageCount Value="7"/> | |||||
| </Unit67> | |||||
| <Unit68> | |||||
| <UsageCount Value="6"/> | |||||
| </Unit68> | |||||
| <Unit69> | |||||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\include\application.inc"/> | <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\include\application.inc"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="2148"/> | <TopLine Value="2148"/> | ||||
| <CursorPos Y="2163"/> | <CursorPos Y="2163"/> | ||||
| <UsageCount Value="8"/> | |||||
| </Unit68> | |||||
| <Unit69> | |||||
| <UsageCount Value="7"/> | |||||
| </Unit69> | |||||
| <Unit70> | |||||
| <Filename Value="..\lazopenglcore\uglcCamera.pas"/> | <Filename Value="..\lazopenglcore\uglcCamera.pas"/> | ||||
| <EditorIndex Value="-1"/> | <EditorIndex Value="-1"/> | ||||
| <TopLine Value="31"/> | <TopLine Value="31"/> | ||||
| <CursorPos X="21" Y="66"/> | <CursorPos X="21" Y="66"/> | ||||
| <UsageCount Value="8"/> | |||||
| </Unit69> | |||||
| <UsageCount Value="7"/> | |||||
| </Unit70> | |||||
| </Units> | </Units> | ||||
| <JumpHistory Count="29" HistoryIndex="28"> | |||||
| <JumpHistory Count="30" HistoryIndex="29"> | |||||
| <Position1> | <Position1> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="931" TopLine="920"/> | |||||
| <Caret Line="1106" Column="15" TopLine="1081"/> | |||||
| </Position1> | </Position1> | ||||
| <Position2> | <Position2> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="932" TopLine="920"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="27" Column="25" TopLine="5"/> | |||||
| </Position2> | </Position2> | ||||
| <Position3> | <Position3> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="935" TopLine="920"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="76" Column="9" TopLine="62"/> | |||||
| </Position3> | </Position3> | ||||
| <Position4> | <Position4> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="937" TopLine="920"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="77" Column="8" TopLine="59"/> | |||||
| </Position4> | </Position4> | ||||
| <Position5> | <Position5> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="939" TopLine="920"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="86" Column="17" TopLine="59"/> | |||||
| </Position5> | </Position5> | ||||
| <Position6> | <Position6> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="942" TopLine="920"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="75" Column="47" TopLine="59"/> | |||||
| </Position6> | </Position6> | ||||
| <Position7> | <Position7> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="941" TopLine="920"/> | |||||
| <Caret Line="1106" Column="20" TopLine="1081"/> | |||||
| </Position7> | </Position7> | ||||
| <Position8> | <Position8> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="944" TopLine="920"/> | |||||
| <Caret Line="61" Column="14" TopLine="52"/> | |||||
| </Position8> | </Position8> | ||||
| <Position9> | <Position9> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="947" TopLine="921"/> | |||||
| <Caret Line="331" Column="19" TopLine="320"/> | |||||
| </Position9> | </Position9> | ||||
| <Position10> | <Position10> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="305" Column="24" TopLine="284"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="332" Column="49" TopLine="320"/> | |||||
| </Position10> | </Position10> | ||||
| <Position11> | <Position11> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="301" TopLine="284"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="336" Column="21" TopLine="320"/> | |||||
| </Position11> | </Position11> | ||||
| <Position12> | <Position12> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="933" TopLine="916"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="27" Column="15" TopLine="11"/> | |||||
| </Position12> | </Position12> | ||||
| <Position13> | <Position13> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="935" TopLine="916"/> | |||||
| <Caret Line="602" Column="19" TopLine="585"/> | |||||
| </Position13> | </Position13> | ||||
| <Position14> | <Position14> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="937" TopLine="916"/> | |||||
| <Caret Line="642" Column="19" TopLine="622"/> | |||||
| </Position14> | </Position14> | ||||
| <Position15> | <Position15> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="262" TopLine="246"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="1057" Column="41" TopLine="1048"/> | |||||
| </Position15> | </Position15> | ||||
| <Position16> | <Position16> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="261" TopLine="246"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="9" Column="30" TopLine="2"/> | |||||
| </Position16> | </Position16> | ||||
| <Position17> | <Position17> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="260" TopLine="246"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="1124" Column="64" TopLine="1096"/> | |||||
| </Position17> | </Position17> | ||||
| <Position18> | <Position18> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="259" TopLine="246"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="1127" Column="24" TopLine="1102"/> | |||||
| </Position18> | </Position18> | ||||
| <Position19> | <Position19> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="255" TopLine="246"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="1151" Column="18" TopLine="1125"/> | |||||
| </Position19> | </Position19> | ||||
| <Position20> | <Position20> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="937" TopLine="916"/> | |||||
| <Caret Line="1147" Column="37" TopLine="1126"/> | |||||
| </Position20> | </Position20> | ||||
| <Position21> | <Position21> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="263" TopLine="246"/> | |||||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||||
| <Caret Line="57" TopLine="41"/> | |||||
| </Position21> | </Position21> | ||||
| <Position22> | <Position22> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="939" TopLine="916"/> | |||||
| <Caret Line="1109" Column="26" TopLine="1097"/> | |||||
| </Position22> | </Position22> | ||||
| <Position23> | <Position23> | ||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="930" Column="46" TopLine="916"/> | |||||
| <Filename Value="..\utils\uvkuInstance.pas"/> | |||||
| <Caret Line="86" Column="3" TopLine="80"/> | |||||
| </Position23> | </Position23> | ||||
| <Position24> | <Position24> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="254" TopLine="250"/> | |||||
| <Filename Value="..\utils\uvkuInstance.pas"/> | |||||
| <Caret Line="55" Column="23" TopLine="39"/> | |||||
| </Position24> | </Position24> | ||||
| <Position25> | <Position25> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="935" TopLine="916"/> | |||||
| <Caret Line="1109" Column="26" TopLine="1097"/> | |||||
| </Position25> | </Position25> | ||||
| <Position26> | <Position26> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="258" Column="27" TopLine="249"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="341" Column="32" TopLine="327"/> | |||||
| </Position26> | </Position26> | ||||
| <Position27> | <Position27> | ||||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||||
| <Caret Line="267" Column="16" TopLine="311"/> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="344" Column="62" TopLine="327"/> | |||||
| </Position27> | </Position27> | ||||
| <Position28> | <Position28> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="946" Column="22" TopLine="667"/> | |||||
| <Caret Line="477" Column="30" TopLine="451"/> | |||||
| </Position28> | </Position28> | ||||
| <Position29> | <Position29> | ||||
| <Filename Value="uMainForm.pas"/> | <Filename Value="uMainForm.pas"/> | ||||
| <Caret Line="141" Column="3" TopLine="124"/> | |||||
| <Caret Line="482" Column="60" TopLine="456"/> | |||||
| </Position29> | </Position29> | ||||
| <Position30> | |||||
| <Filename Value="uMainForm.pas"/> | |||||
| <Caret Line="1056" Column="39" TopLine="1039"/> | |||||
| </Position30> | |||||
| </JumpHistory> | </JumpHistory> | ||||
| </ProjectSession> | </ProjectSession> | ||||
| <Debugging> | <Debugging> | ||||
| <BreakPoints Count="1"> | |||||
| <Item1> | |||||
| <Kind Value="bpkSource"/> | |||||
| <WatchScope Value="wpsLocal"/> | |||||
| <WatchKind Value="wpkWrite"/> | |||||
| <Source Value="uMainForm.pas"/> | |||||
| <Line Value="947"/> | |||||
| </Item1> | |||||
| </BreakPoints> | |||||
| <Watches Count="2"> | <Watches Count="2"> | ||||
| <Item1> | <Item1> | ||||
| <Expression Value="self"/> | <Expression Value="self"/> | ||||
| @@ -18,4 +18,9 @@ object MainForm: TMainForm | |||||
| BevelOuter = bvNone | BevelOuter = bvNone | ||||
| TabOrder = 0 | TabOrder = 0 | ||||
| end | end | ||||
| object ApplicationProperties: TApplicationProperties | |||||
| OnIdle = ApplicationPropertiesIdle | |||||
| left = 56 | |||||
| top = 24 | |||||
| end | |||||
| end | end | ||||
| @@ -27,7 +27,9 @@ type | |||||
| end; | end; | ||||
| TMainForm = class(TForm) | TMainForm = class(TForm) | ||||
| ApplicationProperties: TApplicationProperties; | |||||
| RenderPanel: TPanel; | RenderPanel: TPanel; | ||||
| procedure ApplicationPropertiesIdle(Sender: TObject; var Done: Boolean); | |||||
| procedure FormCreate(Sender: TObject); | procedure FormCreate(Sender: TObject); | ||||
| procedure FormDestroy(Sender: TObject); | procedure FormDestroy(Sender: TObject); | ||||
| private | private | ||||
| @@ -77,6 +79,7 @@ type | |||||
| end; | end; | ||||
| procedure UpdateUniformBuffers; | procedure UpdateUniformBuffers; | ||||
| procedure Render; | |||||
| end; | end; | ||||
| var | var | ||||
| @@ -179,9 +182,10 @@ var | |||||
| r2D: TVkRect2D; | r2D: TVkRect2D; | ||||
| begin | begin | ||||
| try | try | ||||
| fCamera := TglcCamera.Create; | |||||
| fAllocHandler := TCustomAllocHandler.Create; | |||||
| AllocCallbacks := fAllocHandler.GetStructure; | |||||
| SetupCommandBuffer := nil; | |||||
| fCamera := TglcCamera.Create; | |||||
| fAllocHandler := TCustomAllocHandler.Create; | |||||
| AllocCallbacks := fAllocHandler.GetStructure; | |||||
| ////////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////////// | ||||
| WriteLn('create instance: '); | WriteLn('create instance: '); | ||||
| @@ -237,7 +241,7 @@ begin | |||||
| DeviceFactory := TvkuDeviceFactory.Create(fInstance); | DeviceFactory := TvkuDeviceFactory.Create(fInstance); | ||||
| try | try | ||||
| DeviceFactory.AllocHandler := fAllocHandler; | DeviceFactory.AllocHandler := fAllocHandler; | ||||
| DeviceFactory.EnabledExtensions.Add('VK_KHR_swapchain'); | |||||
| DeviceFactory.EnabledExtensionNames.Add('VK_KHR_swapchain'); | |||||
| DeviceFactory.QueueCreateInfos.Length := 1; | DeviceFactory.QueueCreateInfos.Length := 1; | ||||
| with DeviceFactory.QueueCreateInfos[0] do begin | with DeviceFactory.QueueCreateInfos[0] do begin | ||||
| Flags := 0; | Flags := 0; | ||||
| @@ -936,6 +940,9 @@ begin | |||||
| 0, | 0, | ||||
| [ fDescriptorSet.Handle ], | [ fDescriptorSet.Handle ], | ||||
| [ ]); | [ ]); | ||||
| BindPipeline( | |||||
| VK_PIPELINE_BIND_POINT_GRAPHICS, | |||||
| fPipeline.Handle); | |||||
| BindVertexBuffers( | BindVertexBuffers( | ||||
| VERTEX_BUFFER_BIND_ID, | VERTEX_BUFFER_BIND_ID, | ||||
| [ fVertex.DataBuffer.Handle ], | [ fVertex.DataBuffer.Handle ], | ||||
| @@ -980,6 +987,12 @@ begin | |||||
| end; | end; | ||||
| end; | end; | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| procedure TMainForm.ApplicationPropertiesIdle(Sender: TObject; var Done: Boolean); | |||||
| begin | |||||
| Render; | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| procedure TMainForm.FormDestroy(Sender: TObject); | procedure TMainForm.FormDestroy(Sender: TObject); | ||||
| @@ -1069,5 +1082,70 @@ begin | |||||
| end; | end; | ||||
| end; | end; | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| procedure TMainForm.Render; | |||||
| var | |||||
| Semaphore: TvkuSemaphore; | |||||
| AllocCallbacks: TVkAllocationCallbacks; | |||||
| CurrentImage: VkUint32; | |||||
| PostPresentBarrier: TVkImageMemoryBarrier; | |||||
| begin | |||||
| fDevice.WaitIdle; | |||||
| // present queue | |||||
| AllocCallbacks := fAllocHandler.GetStructure; | |||||
| Semaphore := TvkuSemaphore.Create( | |||||
| VkSemaphoreCreateFlags([ VK_FENCE_CREATE_SIGNALED_BIT ]), | |||||
| fDevice.DeviceCommands, | |||||
| @AllocCallbacks); | |||||
| try | |||||
| CurrentImage := fSwapChain.AcquireNextImage(High(VkUint64), Semaphore.Handle, VK_INVALID_NDP_HANDLE); | |||||
| fQueue.Submit( | |||||
| [ Semaphore.Handle ], | |||||
| [ ], | |||||
| [ fDrawCommandBuffers[CurrentImage].Handle ], | |||||
| [ ], | |||||
| VK_INVALID_NDP_HANDLE); | |||||
| fQueue.Present( | |||||
| [ ], | |||||
| [ fSwapChain.Handle ], | |||||
| [ CurrentImage ]); | |||||
| finally | |||||
| FreeAndNil(Semaphore); | |||||
| end; | |||||
| // post present image | |||||
| PostPresentBarrier := fImages[CurrentImage].GetMemoryBarrier( | |||||
| [ VK_IMAGE_ASPECT_COLOR_BIT ], | |||||
| VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, | |||||
| VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL); | |||||
| PostPresentBarrier.srcAccessMask := []; | |||||
| PostPresentBarrier.dstAccessMask := [ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT ]; | |||||
| fPostPresentCommandBuffer.BeginCommand; | |||||
| try | |||||
| fPostPresentCommandBuffer.PipelineBarrier( | |||||
| [ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT ], | |||||
| [ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT ], | |||||
| [ ], | |||||
| [ ], | |||||
| [ ], | |||||
| [ PostPresentBarrier ]); | |||||
| finally | |||||
| fPostPresentCommandBuffer.EndCommand; | |||||
| end; | |||||
| // submit queue | |||||
| fQueue.Submit( | |||||
| [ ], | |||||
| [ ], | |||||
| [ fPostPresentCommandBuffer.Handle ], | |||||
| [ ], | |||||
| VK_INVALID_NDP_HANDLE); | |||||
| fQueue.WaitIdle; | |||||
| fDevice.WaitIdle; | |||||
| end; | |||||
| end. | end. | ||||
| @@ -21,6 +21,7 @@ uses | |||||
| uvkuShaderModule, uvkuShaderModuleFactory, | uvkuShaderModule, uvkuShaderModuleFactory, | ||||
| uvkuPipelineLayout, uvkuPipelineLayoutFactory, uvkuPipelineCache, uvkuPipelineCacheFactory, uvkuPipeline, uvkuPipelineFactory, | uvkuPipelineLayout, uvkuPipelineLayoutFactory, uvkuPipelineCache, uvkuPipelineCacheFactory, uvkuPipeline, uvkuPipelineFactory, | ||||
| uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet, | uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet, | ||||
| uvkuSemaphore, | |||||
| uvkuUtils; | uvkuUtils; | ||||
| type | type | ||||
| @@ -62,77 +63,80 @@ type | |||||
| TvkuConsoleDebugReporter = uvkuDebugReporter.TvkuConsoleDebugReporter; | TvkuConsoleDebugReporter = uvkuDebugReporter.TvkuConsoleDebugReporter; | ||||
| { Instance } | { Instance } | ||||
| TvkuInstance = uvkuInstance.TvkuInstance; | |||||
| TvkuInstanceFactory = uvkuInstanceFactory.TvkuInstanceFactory; | |||||
| TvkuInstance = uvkuInstance.TvkuInstance; | |||||
| TvkuInstanceFactory = uvkuInstanceFactory.TvkuInstanceFactory; | |||||
| { Device } | { Device } | ||||
| TvkuPhysicalDevice = uvkuPhysicalDevice.TvkuPhysicalDevice; | |||||
| TvkuDevice = uvkuDevice.TvkuDevice; | |||||
| TvkuDeviceFactory = uvkuDeviceFactory.TvkuDeviceFactory; | |||||
| TvkuDeviceMemory = uvkuDeviceMemory.TvkuDeviceMemory; | |||||
| TvkuQueue = uvkuQueue.TvkuQueue; | |||||
| TvkuPhysicalDevice = uvkuPhysicalDevice.TvkuPhysicalDevice; | |||||
| TvkuDevice = uvkuDevice.TvkuDevice; | |||||
| TvkuDeviceFactory = uvkuDeviceFactory.TvkuDeviceFactory; | |||||
| TvkuDeviceMemory = uvkuDeviceMemory.TvkuDeviceMemory; | |||||
| TvkuQueue = uvkuQueue.TvkuQueue; | |||||
| { Surface } | { Surface } | ||||
| TvkuSurface = uvkuSurface.TvkuSurface; | |||||
| TvkuSurfaceFactory = uvkuSurfaceFactory.TvkuSurfaceFactory; | |||||
| TvkuSurface = uvkuSurface.TvkuSurface; | |||||
| TvkuSurfaceFactory = uvkuSurfaceFactory.TvkuSurfaceFactory; | |||||
| { SwapChain } | { SwapChain } | ||||
| TvkuSwapChain = uvkuSwapChain.TvkuSwapChain; | |||||
| TvkuSwapChainFactory = uvkuSwapChainFactory.TvkuSwapChainFactory; | |||||
| TvkuSwapChain = uvkuSwapChain.TvkuSwapChain; | |||||
| TvkuSwapChainFactory = uvkuSwapChainFactory.TvkuSwapChainFactory; | |||||
| { Image } | { Image } | ||||
| TvkuImage = uvkuImage.TvkuImage; | |||||
| TvkuImageFactory = uvkuImageFactory.TvkuImageFactory; | |||||
| TvkuImageView = uvkuImageView.TvkuImageView; | |||||
| TvkuImageViewFactory = uvkuImageViewFactory.TvkuImageViewFactory; | |||||
| TvkuImage = uvkuImage.TvkuImage; | |||||
| TvkuImageFactory = uvkuImageFactory.TvkuImageFactory; | |||||
| TvkuImageView = uvkuImageView.TvkuImageView; | |||||
| TvkuImageViewFactory = uvkuImageViewFactory.TvkuImageViewFactory; | |||||
| { Buffer } | { Buffer } | ||||
| TvkuBuffer = uvkuBuffer.TvkuBuffer; | |||||
| TvkuBufferFactory = uvkuBufferFactory.TvkuBufferFactory; | |||||
| TvkuBufferView = uvkuBufferView.TvkuBufferView; | |||||
| TvkuBufferViewFactory = uvkuBufferViewFactory.TvkuBufferViewFactory; | |||||
| TvkuBuffer = uvkuBuffer.TvkuBuffer; | |||||
| TvkuBufferFactory = uvkuBufferFactory.TvkuBufferFactory; | |||||
| TvkuBufferView = uvkuBufferView.TvkuBufferView; | |||||
| TvkuBufferViewFactory = uvkuBufferViewFactory.TvkuBufferViewFactory; | |||||
| { Commands } | { Commands } | ||||
| TvkuCommandPool = uvkuCommandPool.TvkuCommandPool; | |||||
| TvkuCommandPoolFactory = uvkuCommandPoolFactory.TvkuCommandPoolFactory; | |||||
| TvkuCommandBuffer = uvkuCommandBuffer.TvkuCommandBuffer; | |||||
| TvkuCommandPool = uvkuCommandPool.TvkuCommandPool; | |||||
| TvkuCommandPoolFactory = uvkuCommandPoolFactory.TvkuCommandPoolFactory; | |||||
| TvkuCommandBuffer = uvkuCommandBuffer.TvkuCommandBuffer; | |||||
| { RenderPass } | { RenderPass } | ||||
| TvkuRenderPass = uvkuRenderPass.TvkuRenderPass; | |||||
| TvkuRenderPassFactory = uvkuRenderPassFactory.TvkuRenderPassFactory; | |||||
| TvkuRenderPass = uvkuRenderPass.TvkuRenderPass; | |||||
| TvkuRenderPassFactory = uvkuRenderPassFactory.TvkuRenderPassFactory; | |||||
| { FrameBuffer } | { FrameBuffer } | ||||
| TvkuFrameBuffer = uvkuFrameBuffer.TvkuFrameBuffer; | |||||
| TvkuFrameBufferFactory = uvkuFrameBufferFactory.TvkuFrameBufferFactory; | |||||
| TvkuFrameBuffer = uvkuFrameBuffer.TvkuFrameBuffer; | |||||
| TvkuFrameBufferFactory = uvkuFrameBufferFactory.TvkuFrameBufferFactory; | |||||
| { DescriptorSetLayout } | { DescriptorSetLayout } | ||||
| TvkuDescriptorSetLayout = uvkuDescriptorSetLayout.TvkuDescriptorSetLayout; | |||||
| TvkuDescriptorSetLayoutFactory = uvkuDescriptorSetLayoutFactory.TvkuDescriptorSetLayoutFactory; | |||||
| TvkuDescriptorSetLayout = uvkuDescriptorSetLayout.TvkuDescriptorSetLayout; | |||||
| TvkuDescriptorSetLayoutFactory = uvkuDescriptorSetLayoutFactory.TvkuDescriptorSetLayoutFactory; | |||||
| { Shader Modules } | { Shader Modules } | ||||
| TvkuShaderModule = uvkuShaderModule.TvkuShaderModule; | |||||
| TvkuShaderModuleFactory = uvkuShaderModuleFactory.TvkuShaderModuleFactory; | |||||
| TvkuShaderModule = uvkuShaderModule.TvkuShaderModule; | |||||
| TvkuShaderModuleFactory = uvkuShaderModuleFactory.TvkuShaderModuleFactory; | |||||
| { Pipeline } | { Pipeline } | ||||
| TvkuPipelineLayout = uvkuPipelineLayout.TvkuPipelineLayout; | |||||
| TvkuPipelineLayoutFactory = uvkuPipelineLayoutFactory.TvkuPipelineLayoutFactory; | |||||
| TvkuPipelineCache = uvkuPipelineCache.TvkuPipelineCache; | |||||
| TvkuPipelineCacheFactory = uvkuPipelineCacheFactory.TvkuPipelineCacheFactory; | |||||
| TvkuPipeline = uvkuPipeline.TvkuPipeline; | |||||
| TvkuGraphicsPipeline = uvkuPipeline.TvkuGraphicsPipeline; | |||||
| TvkuGraphicsPipelineFactory = uvkuPipelineFactory.TvkuGraphicsPipelineFactory; | |||||
| TvkuComputePipeline = uvkuPipeline.TvkuComputePipeline; | |||||
| TvkuComputePipelineFactory = uvkuPipelineFactory.TvkuComputePipelineFactory; | |||||
| TvkuPipelineLayout = uvkuPipelineLayout.TvkuPipelineLayout; | |||||
| TvkuPipelineLayoutFactory = uvkuPipelineLayoutFactory.TvkuPipelineLayoutFactory; | |||||
| TvkuPipelineCache = uvkuPipelineCache.TvkuPipelineCache; | |||||
| TvkuPipelineCacheFactory = uvkuPipelineCacheFactory.TvkuPipelineCacheFactory; | |||||
| TvkuPipeline = uvkuPipeline.TvkuPipeline; | |||||
| TvkuGraphicsPipeline = uvkuPipeline.TvkuGraphicsPipeline; | |||||
| TvkuGraphicsPipelineFactory = uvkuPipelineFactory.TvkuGraphicsPipelineFactory; | |||||
| TvkuComputePipeline = uvkuPipeline.TvkuComputePipeline; | |||||
| TvkuComputePipelineFactory = uvkuPipelineFactory.TvkuComputePipelineFactory; | |||||
| { DescriptorPool } | { DescriptorPool } | ||||
| TvkuDescriptorPool = uvkuDescriptorPool.TvkuDescriptorPool; | |||||
| TvkuDescriptorPoolFactory = uvkuDescriptorPoolFactory.TvkuDescriptorPoolFactory; | |||||
| TvkuDescriptorSet = uvkuDescriptorSet.TvkuDescriptorSet; | |||||
| TvkuDescriptorPool = uvkuDescriptorPool.TvkuDescriptorPool; | |||||
| TvkuDescriptorPoolFactory = uvkuDescriptorPoolFactory.TvkuDescriptorPoolFactory; | |||||
| TvkuDescriptorSet = uvkuDescriptorSet.TvkuDescriptorSet; | |||||
| { Semaphore } | |||||
| TvkuSemaphore = uvkuSemaphore.TvkuSemaphore; | |||||
| { Utils } | { Utils } | ||||
| TvkuException = uvkuUtils.TvkuException; | |||||
| TvkuErrorException = uvkuUtils.TvkuErrorException; | |||||
| TvkuInvalidFuncPtrException = uvkuUtils.TvkuInvalidFuncPtrException; | |||||
| TvkuException = uvkuUtils.TvkuException; | |||||
| TvkuErrorException = uvkuUtils.TvkuErrorException; | |||||
| TvkuInvalidFuncPtrException = uvkuUtils.TvkuInvalidFuncPtrException; | |||||
| function vkExtent2D(const X, Y: VkUint32): TVkExtent2D; | function vkExtent2D(const X, Y: VkUint32): TVkExtent2D; | ||||
| function vkExtent3D(const X, Y, Z: VkUint32): TVkExtent3D; | function vkExtent3D(const X, Y, Z: VkUint32): TVkExtent3D; | ||||
| @@ -56,7 +56,7 @@ procedure TvkuBuffer.CreateHandle(const aCreateInfo: TVkBufferCreateInfo); | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkCreateBuffer(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateBuffer(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create buffer', err); | raise TvkuErrorException.Create('unable to create buffer', err); | ||||
| end; | end; | ||||
| @@ -65,7 +65,7 @@ procedure TvkuBuffer.BindMemory(const aMemory: VkDeviceMemory; const aOffset: Vk | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkBindBufferMemory(fDeviceCommands.Device, fHandle, aMemory, aOffset); | err := fDeviceCommands.vkBindBufferMemory(fDeviceCommands.Device, fHandle, aMemory, aOffset); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to bind buffer memory', err); | raise TvkuErrorException.Create('unable to bind buffer memory', err); | ||||
| fMemory := aMemory; | fMemory := aMemory; | ||||
| end; | end; | ||||
| @@ -102,7 +102,7 @@ begin | |||||
| if not Assigned(aAllocCallbacks) then | if not Assigned(aAllocCallbacks) then | ||||
| aAllocCallbacks := AllocCallbacks; | aAllocCallbacks := AllocCallbacks; | ||||
| err := fDeviceCommands.vkAllocateMemory(fDeviceCommands.Device, @MemAllocInfo, aAllocCallbacks, @Mem); | err := fDeviceCommands.vkAllocateMemory(fDeviceCommands.Device, @MemAllocInfo, aAllocCallbacks, @Mem); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to allocate buffer memory', err); | raise TvkuErrorException.Create('unable to allocate buffer memory', err); | ||||
| fBufferMemory := TvkuDeviceMemory.Create(Mem, true, fDeviceCommands, aAllocCallbacks); | fBufferMemory := TvkuDeviceMemory.Create(Mem, true, fDeviceCommands, aAllocCallbacks); | ||||
| BindMemory(fBufferMemory.Handle, 0); | BindMemory(fBufferMemory.Handle, 0); | ||||
| @@ -44,7 +44,7 @@ procedure TvkuBufferView.CreateHandle(const aCreateInfo: TVkBufferViewCreateInfo | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkCreateBufferView(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateBufferView(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create buffer view', err); | raise TvkuErrorException.Create('unable to create buffer view', err); | ||||
| end; | end; | ||||
| @@ -186,7 +186,7 @@ begin | |||||
| Info.flags := []; // TODO | Info.flags := []; // TODO | ||||
| Info.pInheritanceInfo := nil; // TODO | Info.pInheritanceInfo := nil; // TODO | ||||
| err := DeviceCommands.vkBeginCommandBuffer(fHandle, @Info); | err := DeviceCommands.vkBeginCommandBuffer(fHandle, @Info); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to begin command buffer', err); | raise TvkuErrorException.Create('unable to begin command buffer', err); | ||||
| end; | end; | ||||
| @@ -195,7 +195,7 @@ procedure TvkuCommandBuffer.EndCommand; | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkEndCommandBuffer(fHandle); | err := fDeviceCommands.vkEndCommandBuffer(fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to end command buffer', err); | raise TvkuErrorException.Create('unable to end command buffer', err); | ||||
| end; | end; | ||||
| @@ -54,7 +54,7 @@ procedure TvkuCommandPool.CreateHandle(const aCreateInfo: TVkCommandPoolCreateIn | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkCreateCommandPool(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateCommandPool(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create command pool', err); | raise TvkuErrorException.Create('unable to create command pool', err); | ||||
| end; | end; | ||||
| @@ -78,7 +78,7 @@ begin | |||||
| AllocInfo.commandBufferCount := aCount; | AllocInfo.commandBufferCount := aCount; | ||||
| SetLength(result, aCount); | SetLength(result, aCount); | ||||
| err := fDeviceCommands.vkAllocateCommandBuffers(fDeviceCommands.Device, @AllocInfo, @result[0]); | err := fDeviceCommands.vkAllocateCommandBuffers(fDeviceCommands.Device, @AllocInfo, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create command buffers', err); | raise TvkuErrorException.Create('unable to create command buffers', err); | ||||
| end; | end; | ||||
| @@ -107,7 +107,7 @@ begin | |||||
| VK_DEBUG_REPORT_DEBUG_BIT_EXT | VK_DEBUG_REPORT_DEBUG_BIT_EXT | ||||
| ]; | ]; | ||||
| err := fInstanceCommands.vkCreateDebugReportCallbackEXT(fInstanceCommands.Instance, @CreateInfo, AllocCallbacks, @fHandle); | err := fInstanceCommands.vkCreateDebugReportCallbackEXT(fInstanceCommands.Instance, @CreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create debug report handle', err); | raise TvkuErrorException.Create('unable to create debug report handle', err); | ||||
| end; | end; | ||||
| @@ -55,7 +55,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateDescriptorPool) then | if not Assigned(fDeviceCommands.vkCreateDescriptorPool) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateDescriptorPool'); | raise TvkuInvalidFuncPtrException.Create('vkCreateDescriptorPool'); | ||||
| err := fDeviceCommands.vkCreateDescriptorPool(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateDescriptorPool(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create descriptor pool', err); | raise TvkuErrorException.Create('unable to create descriptor pool', err); | ||||
| end; | end; | ||||
| @@ -81,7 +81,7 @@ begin | |||||
| AllocInfo.pSetLayouts := @aDescriptorSetLayouts[0]; | AllocInfo.pSetLayouts := @aDescriptorSetLayouts[0]; | ||||
| SetLength(result, AllocInfo.descriptorSetCount); | SetLength(result, AllocInfo.descriptorSetCount); | ||||
| err := fDeviceCommands.vkAllocateDescriptorSets(fDeviceCommands.Device, @AllocInfo, @result[0]); | err := fDeviceCommands.vkAllocateDescriptorSets(fDeviceCommands.Device, @AllocInfo, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to allocate descriptor sets', err); | raise TvkuErrorException.Create('unable to allocate descriptor sets', err); | ||||
| end; | end; | ||||
| @@ -98,7 +98,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkFreeDescriptorSets) then | if not Assigned(fDeviceCommands.vkFreeDescriptorSets) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkFreeDescriptorSets'); | raise TvkuInvalidFuncPtrException.Create('vkFreeDescriptorSets'); | ||||
| err := fDeviceCommands.vkFreeDescriptorSets(fDeviceCommands.Device, fHandle, Length(aDescriptorSets), @aDescriptorSets[0]); | err := fDeviceCommands.vkFreeDescriptorSets(fDeviceCommands.Device, fHandle, Length(aDescriptorSets), @aDescriptorSets[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to free descriptor sets', err); | raise TvkuErrorException.Create('unable to free descriptor sets', err); | ||||
| end; | end; | ||||
| @@ -46,7 +46,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateDescriptorSetLayout) then | if not Assigned(fDeviceCommands.vkCreateDescriptorSetLayout) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateDescriptorSetLayout'); | raise TvkuInvalidFuncPtrException.Create('vkCreateDescriptorSetLayout'); | ||||
| err := fDeviceCommands.vkCreateDescriptorSetLayout(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateDescriptorSetLayout(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create descriptor set layout', err); | raise TvkuErrorException.Create('unable to create descriptor set layout', err); | ||||
| end; | end; | ||||
| @@ -113,6 +113,7 @@ type | |||||
| procedure FreeMemory( | procedure FreeMemory( | ||||
| const aMemory: VkDeviceMemory; | const aMemory: VkDeviceMemory; | ||||
| aAllocCallbacks: PVkAllocationCallbacks = nil); | aAllocCallbacks: PVkAllocationCallbacks = nil); | ||||
| procedure WaitIdle; | |||||
| function UpdateDescriptorSet: TvkuUpdateDescriptorSetHelper; | function UpdateDescriptorSet: TvkuUpdateDescriptorSetHelper; | ||||
| @@ -333,7 +334,7 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkCreateDevice) then | if not Assigned(fInstanceCommands.vkCreateDevice) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateDevice'); | raise TvkuInvalidFuncPtrException.Create('vkCreateDevice'); | ||||
| err := fInstanceCommands.vkCreateDevice(aPhyDevice, aCreateInfo, AllocCallbacks, @fHandle); | err := fInstanceCommands.vkCreateDevice(aPhyDevice, aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create device', err); | raise TvkuErrorException.Create('unable to create device', err); | ||||
| fDeviceCommands := LoadDeviceCommands(fInstanceCommands.Instance, fHandle); | fDeviceCommands := LoadDeviceCommands(fInstanceCommands.Instance, fHandle); | ||||
| if not Assigned(fDeviceCommands) then | if not Assigned(fDeviceCommands) then | ||||
| @@ -365,7 +366,7 @@ begin | |||||
| if not Assigned(aAllocCallbacks) then | if not Assigned(aAllocCallbacks) then | ||||
| aAllocCallbacks := AllocCallbacks; | aAllocCallbacks := AllocCallbacks; | ||||
| err := fDeviceCommands.vkAllocateMemory(fHandle, @AllocInfo, aAllocCallbacks, @result); | err := fDeviceCommands.vkAllocateMemory(fHandle, @AllocInfo, aAllocCallbacks, @result); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to allocate device memory', err); | raise TvkuErrorException.Create('unable to allocate device memory', err); | ||||
| end; | end; | ||||
| @@ -377,6 +378,15 @@ begin | |||||
| fDeviceCommands.vkFreeMemory(fHandle, aMemory, aAllocCallbacks); | fDeviceCommands.vkFreeMemory(fHandle, aMemory, aAllocCallbacks); | ||||
| end; | end; | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| procedure TvkuDevice.WaitIdle; | |||||
| var err: TVkResult; | |||||
| begin | |||||
| err := fDeviceCommands.vkDeviceWaitIdle(fHandle); | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to wait for device idle', err); | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| function TvkuDevice.UpdateDescriptorSet: TvkuUpdateDescriptorSetHelper; | function TvkuDevice.UpdateDescriptorSet: TvkuUpdateDescriptorSetHelper; | ||||
| begin | begin | ||||
| @@ -103,14 +103,14 @@ type | |||||
| fvkEnabledExtensionNames: array of PVkChar; | fvkEnabledExtensionNames: array of PVkChar; | ||||
| fvkQueueCreateInfos: array of TVkDeviceQueueCreateInfo; | fvkQueueCreateInfos: array of TVkDeviceQueueCreateInfo; | ||||
| function GetLayers: TStrings; | |||||
| function GetExtensions: TStrings; | |||||
| function GetEnabledLayerNames: TStrings; | |||||
| function GetEnabledExtensionNames: TStrings; | |||||
| public | public | ||||
| property Flags: VkDeviceCreateFlags read fFlags write fFlags; | |||||
| property EnabledLayers: TStrings read GetLayers; | |||||
| property EnabledExtensions: TStrings read GetExtensions; | |||||
| property EnabledFeatures: TvkuPhysicalDeviceFeatures read fEnabledFeatures; | |||||
| property QueueCreateInfos: TvkuQueueCreateInfoList read fQueueCreateInfos; | |||||
| property Flags: VkDeviceCreateFlags read fFlags write fFlags; | |||||
| property EnabledLayerNames: TStrings read GetEnabledLayerNames; | |||||
| property EnabledExtensionNames: TStrings read GetEnabledExtensionNames; | |||||
| property EnabledFeatures: TvkuPhysicalDeviceFeatures read fEnabledFeatures; | |||||
| property QueueCreateInfos: TvkuQueueCreateInfoList read fQueueCreateInfos; | |||||
| function GetStructure: TVkDeviceCreateInfo; | function GetStructure: TVkDeviceCreateInfo; | ||||
| procedure SetStructure(const aData: TVkDeviceCreateInfo); | procedure SetStructure(const aData: TVkDeviceCreateInfo); | ||||
| @@ -288,13 +288,13 @@ end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| //TvkuDeviceFactory////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | //TvkuDeviceFactory////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| function TvkuDeviceFactory.GetLayers: TStrings; | |||||
| function TvkuDeviceFactory.GetEnabledLayerNames: TStrings; | |||||
| begin | begin | ||||
| result := fEnabledLayerNames; | result := fEnabledLayerNames; | ||||
| end; | end; | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| function TvkuDeviceFactory.GetExtensions: TStrings; | |||||
| function TvkuDeviceFactory.GetEnabledExtensionNames: TStrings; | |||||
| begin | begin | ||||
| result := fEnabledExtensionNames; | result := fEnabledExtensionNames; | ||||
| end; | end; | ||||
| @@ -47,7 +47,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkAllocateMemory) then | if not Assigned(fDeviceCommands.vkAllocateMemory) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkAllocateMemory'); | raise TvkuInvalidFuncPtrException.Create('vkAllocateMemory'); | ||||
| err := fDeviceCommands.vkAllocateMemory(fDeviceCommands.Device, @aAllocInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkAllocateMemory(fDeviceCommands.Device, @aAllocInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to allocate device memory', err); | raise TvkuErrorException.Create('unable to allocate device memory', err); | ||||
| end; | end; | ||||
| @@ -56,7 +56,7 @@ function TvkuDeviceMemory.Map(const aOffset: VkDeviceSize; aSize: VkDeviceSize; | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkMapMemory(fDeviceCommands.Device, fHandle, aOffset, aSize, aFlags, @result); | err := fDeviceCommands.vkMapMemory(fDeviceCommands.Device, fHandle, aOffset, aSize, aFlags, @result); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to map device memory', err); | raise TvkuErrorException.Create('unable to map device memory', err); | ||||
| end; | end; | ||||
| @@ -46,7 +46,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateFramebuffer) then | if not Assigned(fDeviceCommands.vkCreateFramebuffer) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateFramebuffer'); | raise TvkuInvalidFuncPtrException.Create('vkCreateFramebuffer'); | ||||
| err := fDeviceCommands.vkCreateFramebuffer(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateFramebuffer(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create frame buffer', err); | raise TvkuErrorException.Create('unable to create frame buffer', err); | ||||
| end; | end; | ||||
| @@ -60,7 +60,7 @@ procedure TvkuImage.CreateHandle(const aCreateInfo: TVkImageCreateInfo); | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkCreateImage(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateImage(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| TvkuErrorException.Create('unable to create image', err); | TvkuErrorException.Create('unable to create image', err); | ||||
| end; | end; | ||||
| @@ -86,8 +86,8 @@ begin | |||||
| result.dstAccessMask := []; | result.dstAccessMask := []; | ||||
| result.oldLayout := aOldLayout; | result.oldLayout := aOldLayout; | ||||
| result.newLayout := aNewLayout; | result.newLayout := aNewLayout; | ||||
| result.srcQueueFamilyIndex := 0; | |||||
| result.dstQueueFamilyIndex := 0; | |||||
| result.srcQueueFamilyIndex := VK_QUEUE_FAMILY_IGNORED; | |||||
| result.dstQueueFamilyIndex := VK_QUEUE_FAMILY_IGNORED; | |||||
| result.image := fHandle; | result.image := fHandle; | ||||
| result.subresourceRange := range; | result.subresourceRange := range; | ||||
| @@ -159,7 +159,7 @@ procedure TvkuImage.BindMemory(const aMemory: VkDeviceMemory; const aOffset: VkD | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkBindImageMemory(fDeviceCommands.Device, fHandle, aMemory, aOffset); | err := fDeviceCommands.vkBindImageMemory(fDeviceCommands.Device, fHandle, aMemory, aOffset); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| TvkuErrorException.Create('unable to bind image memory', err); | TvkuErrorException.Create('unable to bind image memory', err); | ||||
| fMemory := aMemory; | fMemory := aMemory; | ||||
| end; | end; | ||||
| @@ -195,7 +195,7 @@ begin | |||||
| if not Assigned(aAllocCallbacks) then | if not Assigned(aAllocCallbacks) then | ||||
| aAllocCallbacks := AllocCallbacks; | aAllocCallbacks := AllocCallbacks; | ||||
| err := fDeviceCommands.vkAllocateMemory(fDeviceCommands.Device, @MemAllocInfo, aAllocCallbacks, @Mem); | err := fDeviceCommands.vkAllocateMemory(fDeviceCommands.Device, @MemAllocInfo, aAllocCallbacks, @Mem); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to allocate image memory', err); | raise TvkuErrorException.Create('unable to allocate image memory', err); | ||||
| fImageMemory := TvkuDeviceMemory.Create(Mem, true, fDeviceCommands, aAllocCallbacks); | fImageMemory := TvkuDeviceMemory.Create(Mem, true, fDeviceCommands, aAllocCallbacks); | ||||
| BindMemory(fImageMemory.Handle, 0); | BindMemory(fImageMemory.Handle, 0); | ||||
| @@ -46,7 +46,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateImageView) then | if not Assigned(fDeviceCommands.vkCreateImageView) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateImageView'); | raise TvkuInvalidFuncPtrException.Create('vkCreateImageView'); | ||||
| err := fDeviceCommands.vkCreateImageView(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateImageView(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create image view', err); | raise TvkuErrorException.Create('unable to create image view', err); | ||||
| end; | end; | ||||
| @@ -52,12 +52,12 @@ begin | |||||
| exit; | exit; | ||||
| err := InstanceCommands.vkEnumeratePhysicalDevices(fHandle, @c, nil); | err := InstanceCommands.vkEnumeratePhysicalDevices(fHandle, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device number', err); | raise TvkuErrorException.Create('unable to get physical device number', err); | ||||
| SetLength(fPhysicalDevices, c); | SetLength(fPhysicalDevices, c); | ||||
| err := InstanceCommands.vkEnumeratePhysicalDevices(fHandle, @c, @fPhysicalDevices[0]); | err := InstanceCommands.vkEnumeratePhysicalDevices(fHandle, @c, @fPhysicalDevices[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical devices', err); | raise TvkuErrorException.Create('unable to get physical devices', err); | ||||
| end; | end; | ||||
| @@ -66,7 +66,7 @@ procedure TvkuInstance.CreateHandle(const aCreateInfo: PVkInstanceCreateInfo); | |||||
| var e: TVkResult; | var e: TVkResult; | ||||
| begin | begin | ||||
| e := vkCreateInstance(aCreateInfo, AllocCallbacks, @fHandle); | e := vkCreateInstance(aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (e < VK_SUCCESS) then | |||||
| if (e <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create vulkan instance', e); | raise TvkuErrorException.Create('unable to create vulkan instance', e); | ||||
| fInstanceCommands := LoadInstanceCommands(fHandle); | fInstanceCommands := LoadInstanceCommands(fHandle); | ||||
| if not Assigned(InstanceCommands) then | if not Assigned(InstanceCommands) then | ||||
| @@ -114,7 +114,7 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceImageFormatProperties) then | if not Assigned(fInstanceCommands.vkGetPhysicalDeviceImageFormatProperties) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceImageFormatProperties'); | raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceImageFormatProperties'); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceImageFormatProperties(fHandle, aFormat, aImageType, aTiling, aUsage, aFlags, @result); | err := fInstanceCommands.vkGetPhysicalDeviceImageFormatProperties(fHandle, aFormat, aImageType, aTiling, aUsage, aFlags, @result); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device image format properties', err); | raise TvkuErrorException.Create('unable to get physical device image format properties', err); | ||||
| end; | end; | ||||
| @@ -140,7 +140,7 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfaceSupportKHR) then | if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfaceSupportKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfaceSupportKHR', 'VK_KHR_surface'); | raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfaceSupportKHR', 'VK_KHR_surface'); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceSurfaceSupportKHR(fHandle, aQueueFamilyIndex, aSurface, @b); | err := fInstanceCommands.vkGetPhysicalDeviceSurfaceSupportKHR(fHandle, aQueueFamilyIndex, aSurface, @b); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device surface support', err); | raise TvkuErrorException.Create('unable to get physical device surface support', err); | ||||
| result := (b <> 0); | result := (b <> 0); | ||||
| end; | end; | ||||
| @@ -153,7 +153,7 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfaceCapabilitiesKHR) then | if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfaceCapabilitiesKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfaceCapabilitiesKHR', 'VK_KHR_surface'); | raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfaceCapabilitiesKHR', 'VK_KHR_surface'); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(fHandle, aSurface, @result); | err := fInstanceCommands.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(fHandle, aSurface, @result); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device surface capabilities', err); | raise TvkuErrorException.Create('unable to get physical device surface capabilities', err); | ||||
| end; | end; | ||||
| @@ -179,11 +179,11 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR) then | if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfacePresentModesKHR', 'VK_KHR_surface'); | raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfacePresentModesKHR', 'VK_KHR_surface'); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR(fHandle, aSurface, @c, nil); | err := fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR(fHandle, aSurface, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device surface present mode count', err); | raise TvkuErrorException.Create('unable to get physical device surface present mode count', err); | ||||
| SetLength(result, c); | SetLength(result, c); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR(fHandle, aSurface, @c, @result[0]); | err := fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR(fHandle, aSurface, @c, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device surface present modes', err); | raise TvkuErrorException.Create('unable to get physical device surface present modes', err); | ||||
| end; | end; | ||||
| @@ -197,11 +197,11 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR) then | if not Assigned(fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceDisplayPropertiesKHR', 'VK_KHR_display'); | raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceDisplayPropertiesKHR', 'VK_KHR_display'); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR(fHandle, @c, nil); | err := fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR(fHandle, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device display property count', err); | raise TvkuErrorException.Create('unable to get physical device display property count', err); | ||||
| SetLength(result, c); | SetLength(result, c); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR(fHandle, @c, @result[0]); | err := fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR(fHandle, @c, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device display properties', err); | raise TvkuErrorException.Create('unable to get physical device display properties', err); | ||||
| end; | end; | ||||
| @@ -215,11 +215,11 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR) then | if not Assigned(fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceDisplayPlanePropertiesKHR', 'VK_KHR_display'); | raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceDisplayPlanePropertiesKHR', 'VK_KHR_display'); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(fHandle, @c, nil); | err := fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(fHandle, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device display plane property count', err); | raise TvkuErrorException.Create('unable to get physical device display plane property count', err); | ||||
| SetLength(result, c); | SetLength(result, c); | ||||
| err := fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(fHandle, @c, @result[0]); | err := fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(fHandle, @c, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get physical device display plane properties', err); | raise TvkuErrorException.Create('unable to get physical device display plane properties', err); | ||||
| end; | end; | ||||
| @@ -233,11 +233,11 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR) then | if not Assigned(fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetDisplayPlaneSupportedDisplaysKHR', 'VK_KHR_display'); | raise TvkuInvalidFuncPtrException.Create('vkGetDisplayPlaneSupportedDisplaysKHR', 'VK_KHR_display'); | ||||
| err := fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR(fHandle, aPlaneIndex, @c, nil); | err := fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR(fHandle, aPlaneIndex, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get supported display plane count', err); | raise TvkuErrorException.Create('unable to get supported display plane count', err); | ||||
| SetLength(result, c); | SetLength(result, c); | ||||
| err := fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR(fHandle, aPlaneIndex, @c, @result[0]); | err := fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR(fHandle, aPlaneIndex, @c, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get supported display planes', err); | raise TvkuErrorException.Create('unable to get supported display planes', err); | ||||
| end; | end; | ||||
| @@ -251,11 +251,11 @@ begin | |||||
| if not Assigned(fInstanceCommands.vkGetDisplayModePropertiesKHR) then | if not Assigned(fInstanceCommands.vkGetDisplayModePropertiesKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetDisplayModePropertiesKHR', 'VK_KHR_display'); | raise TvkuInvalidFuncPtrException.Create('vkGetDisplayModePropertiesKHR', 'VK_KHR_display'); | ||||
| err := fInstanceCommands.vkGetDisplayModePropertiesKHR(fHandle, aDisplay, @c, nil); | err := fInstanceCommands.vkGetDisplayModePropertiesKHR(fHandle, aDisplay, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get display mode property count', err); | raise TvkuErrorException.Create('unable to get display mode property count', err); | ||||
| SetLength(result, c); | SetLength(result, c); | ||||
| err := fInstanceCommands.vkGetDisplayModePropertiesKHR(fHandle, aDisplay, @c, @result[0]); | err := fInstanceCommands.vkGetDisplayModePropertiesKHR(fHandle, aDisplay, @c, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get display mode properties', err); | raise TvkuErrorException.Create('unable to get display mode properties', err); | ||||
| end; | end; | ||||
| @@ -87,7 +87,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateGraphicsPipelines) then | if not Assigned(fDeviceCommands.vkCreateGraphicsPipelines) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateGraphicsPipelines'); | raise TvkuInvalidFuncPtrException.Create('vkCreateGraphicsPipelines'); | ||||
| err := fDeviceCommands.vkCreateGraphicsPipelines(fDeviceCommands.Device, aPipelineCache, 1, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateGraphicsPipelines(fDeviceCommands.Device, aPipelineCache, 1, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create graphics pipeline', err); | raise TvkuErrorException.Create('unable to create graphics pipeline', err); | ||||
| end; | end; | ||||
| @@ -110,7 +110,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateComputePipelines) then | if not Assigned(fDeviceCommands.vkCreateComputePipelines) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateComputePipelines'); | raise TvkuInvalidFuncPtrException.Create('vkCreateComputePipelines'); | ||||
| err := fDeviceCommands.vkCreateComputePipelines(fDeviceCommands.Device, aPipelineCache, 1, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateComputePipelines(fDeviceCommands.Device, aPipelineCache, 1, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create compute pipeline', err); | raise TvkuErrorException.Create('unable to create compute pipeline', err); | ||||
| end; | end; | ||||
| @@ -44,7 +44,7 @@ procedure TvkuPipelineCache.CreateHandle(const aCreateInfo: TVkPipelineCacheCrea | |||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkCreatePipelineCache(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreatePipelineCache(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| TvkuErrorException.Create('unable to create pipeline cache', err); | TvkuErrorException.Create('unable to create pipeline cache', err); | ||||
| end; | end; | ||||
| @@ -46,7 +46,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreatePipelineLayout) then | if not Assigned(fDeviceCommands.vkCreatePipelineLayout) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreatePipelineLayout'); | raise TvkuInvalidFuncPtrException.Create('vkCreatePipelineLayout'); | ||||
| err := fDeviceCommands.vkCreatePipelineLayout(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreatePipelineLayout(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create pipeline layout', err); | raise TvkuErrorException.Create('unable to create pipeline layout', err); | ||||
| end; | end; | ||||
| @@ -6,7 +6,7 @@ interface | |||||
| uses | uses | ||||
| Classes, SysUtils, | Classes, SysUtils, | ||||
| Vulkan, uvkuBase; | |||||
| Vulkan, uvkuBase, uvkuTypes; | |||||
| type | type | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| @@ -24,6 +24,10 @@ type | |||||
| const aCommandBuffers: array of VkCommandBuffer; | const aCommandBuffers: array of VkCommandBuffer; | ||||
| const aSignalSemaphores: array of VkSemaphore; | const aSignalSemaphores: array of VkSemaphore; | ||||
| const aFence: VkFence); | const aFence: VkFence); | ||||
| function Present( | |||||
| const aWaitSemaphore: array of VkSemaphore; | |||||
| const aSwapChains: array of VkSwapchainKHR; | |||||
| const aImageIndices: array of VkUint32): TVkResultArr; | |||||
| procedure WaitIdle; | procedure WaitIdle; | ||||
| constructor Create( | constructor Create( | ||||
| @@ -49,8 +53,9 @@ var | |||||
| SubmitInfo: TVkSubmitInfo; | SubmitInfo: TVkSubmitInfo; | ||||
| err: TVkResult; | err: TVkResult; | ||||
| begin | begin | ||||
| if Length(aWaitSemaphores) <> Length(aWaitDstStageMask) then | |||||
| raise TvkuException.Create('aWaitSemaphores and aWaitDstStageMask must have the same number of elements'); | |||||
| if (Length(aWaitSemaphores) <> Length(aWaitDstStageMask)) | |||||
| and (Length(aWaitDstStageMask) <> 0) then | |||||
| raise TvkuException.Create('aWaitDstStageMask must have the same number of elements as aWaitSemaphores or must be empty'); | |||||
| FillByte(SubmitInfo, SizeOf(SubmitInfo), 0); | FillByte(SubmitInfo, SizeOf(SubmitInfo), 0); | ||||
| SubmitInfo.sType := VK_STRUCTURE_TYPE_SUBMIT_INFO; | SubmitInfo.sType := VK_STRUCTURE_TYPE_SUBMIT_INFO; | ||||
| @@ -63,16 +68,43 @@ begin | |||||
| SubmitInfo.signalSemaphoreCount := Length(aSignalSemaphores); | SubmitInfo.signalSemaphoreCount := Length(aSignalSemaphores); | ||||
| SubmitInfo.pSignalSemaphores := @aSignalSemaphores[0]; | SubmitInfo.pSignalSemaphores := @aSignalSemaphores[0]; | ||||
| err := fDeviceCommands.vkQueueSubmit(fHandle, 1, @SubmitInfo, aFence); | err := fDeviceCommands.vkQueueSubmit(fHandle, 1, @SubmitInfo, aFence); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to submit queue', err); | raise TvkuErrorException.Create('unable to submit queue', err); | ||||
| end; | end; | ||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| function TvkuQueue.Present( | |||||
| const aWaitSemaphore: array of VkSemaphore; | |||||
| const aSwapChains: array of VkSwapchainKHR; | |||||
| const aImageIndices: array of VkUint32): TVkResultArr; | |||||
| var | |||||
| info: TVkPresentInfoKHR; | |||||
| err: TVkResult; | |||||
| begin | |||||
| if (Length(aSwapChains) <> Length(aImageIndices)) then | |||||
| raise TvkuException.Create('aSwapChains and aImageIndices must have the same number of elements'); | |||||
| SetLength(result, Length(aSwapChains)); | |||||
| FillByte(info, SizeOf(info), 0); | |||||
| info.sType := VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; | |||||
| info.pNext := nil; | |||||
| info.waitSemaphoreCount := Length(aWaitSemaphore); | |||||
| info.pWaitSemaphores := @aWaitSemaphore[0]; | |||||
| info.swapchainCount := Length(aSwapChains); | |||||
| info.pSwapchains := @aSwapChains[0]; | |||||
| info.pImageIndices := @aImageIndices[0]; | |||||
| info.pResults := @result[0]; | |||||
| err := fDeviceCommands.vkQueuePresentKHR(fHandle, @info); | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to present queue', err); | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
| procedure TvkuQueue.WaitIdle; | procedure TvkuQueue.WaitIdle; | ||||
| var err: TVkResult; | var err: TVkResult; | ||||
| begin | begin | ||||
| err := fDeviceCommands.vkQueueWaitIdle(fHandle); | err := fDeviceCommands.vkQueueWaitIdle(fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('error while waiting for queue', err); | raise TvkuErrorException.Create('error while waiting for queue', err); | ||||
| end; | end; | ||||
| @@ -46,7 +46,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateRenderPass) then | if not Assigned(fDeviceCommands.vkCreateRenderPass) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateRenderPass'); | raise TvkuInvalidFuncPtrException.Create('vkCreateRenderPass'); | ||||
| err := fDeviceCommands.vkCreateRenderPass(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateRenderPass(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create render pass', err); | raise TvkuErrorException.Create('unable to create render pass', err); | ||||
| end; | end; | ||||
| @@ -0,0 +1,100 @@ | |||||
| unit uvkuSemaphore; | |||||
| {$mode objfpc}{$H+} | |||||
| interface | |||||
| uses | |||||
| Classes, SysUtils, | |||||
| Vulkan, uvkuBase; | |||||
| type | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| TvkuSemaphore = class(TvkuAllocHandle) | |||||
| private | |||||
| fHandle: VkSemaphore; | |||||
| fDeviceCommands: TVkDeviceCommands; | |||||
| procedure CreateHandle(const aCreateInfo: TVkSemaphoreCreateInfo); | |||||
| public | |||||
| property Handle: VkSemaphore read fHandle; | |||||
| property DeviceCommands: TVkDeviceCommands read fDeviceCommands; | |||||
| constructor Create( | |||||
| const aFlags: VkSemaphoreCreateFlags; | |||||
| const aDeviceCommands: TVkDeviceCommands; | |||||
| const aAllocCallbacks: PVkAllocationCallbacks = nil); | |||||
| constructor Create( | |||||
| const aCreateInfo: TVkSemaphoreCreateInfo; | |||||
| const aDeviceCommands: TVkDeviceCommands; | |||||
| const aAllocCallbacks: PVkAllocationCallbacks = nil); | |||||
| constructor Create( | |||||
| const aHandle: VkSemaphore; | |||||
| const aOwnsHandle: Boolean; | |||||
| const aDeviceCommands: TVkDeviceCommands; | |||||
| const aAllocCallbacks: PVkAllocationCallbacks = nil); | |||||
| destructor Destroy; override; | |||||
| end; | |||||
| implementation | |||||
| uses | |||||
| uvkuUtils; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| //TvkuSemaphore////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| procedure TvkuSemaphore.CreateHandle(const aCreateInfo: TVkSemaphoreCreateInfo); | |||||
| var err: TVkResult; | |||||
| begin | |||||
| if not Assigned(fDeviceCommands.vkCreateSemaphore) then | |||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateSemaphore'); | |||||
| err := fDeviceCommands.vkCreateSemaphore(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create semaphore', err); | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| constructor TvkuSemaphore.Create(const aFlags: VkSemaphoreCreateFlags; const aDeviceCommands: TVkDeviceCommands; | |||||
| const aAllocCallbacks: PVkAllocationCallbacks); | |||||
| var CreateInfo: TVkSemaphoreCreateInfo; | |||||
| begin | |||||
| FillByte(CreateInfo, SizeOf(CreateInfo), 0); | |||||
| CreateInfo.sType := VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; | |||||
| CreateInfo.pNext := nil; | |||||
| CreateInfo.flags := aFlags; | |||||
| Create(CreateInfo, aDeviceCommands, aAllocCallbacks); | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| constructor TvkuSemaphore.Create(const aCreateInfo: TVkSemaphoreCreateInfo; const aDeviceCommands: TVkDeviceCommands; | |||||
| const aAllocCallbacks: PVkAllocationCallbacks); | |||||
| begin | |||||
| inherited Create; | |||||
| fDeviceCommands := aDeviceCommands; | |||||
| SetAllocCallbacks(aAllocCallbacks); | |||||
| CreateHandle(aCreateInfo); | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| constructor TvkuSemaphore.Create(const aHandle: VkSemaphore; const aOwnsHandle: Boolean; | |||||
| const aDeviceCommands: TVkDeviceCommands; const aAllocCallbacks: PVkAllocationCallbacks); | |||||
| begin | |||||
| inherited Create; | |||||
| fHandle := aHandle; | |||||
| fDeviceCommands := aDeviceCommands; | |||||
| OwnsHandle := aOwnsHandle; | |||||
| SetAllocCallbacks(aAllocCallbacks); | |||||
| end; | |||||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||||
| destructor TvkuSemaphore.Destroy; | |||||
| begin | |||||
| if OwnsHandle and (fHandle <> VK_INVALID_NDP_HANDLE) then | |||||
| fDeviceCommands.vkDestroySemaphore(fDeviceCommands.Device, fHandle, AllocCallbacks); | |||||
| fHandle := VK_INVALID_NDP_HANDLE; | |||||
| inherited Destroy; | |||||
| end; | |||||
| end. | |||||
| @@ -46,7 +46,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateShaderModule) then | if not Assigned(fDeviceCommands.vkCreateShaderModule) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateShaderModule'); | raise TvkuInvalidFuncPtrException.Create('vkCreateShaderModule'); | ||||
| err := fDeviceCommands.vkCreateShaderModule(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateShaderModule(fDeviceCommands.Device, @aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create shader module', err); | raise TvkuErrorException.Create('unable to create shader module', err); | ||||
| end; | end; | ||||
| @@ -56,7 +56,7 @@ begin | |||||
| raise TvkuInvalidFuncPtrException.Create('vkCreateWin32SurfaceKHR', 'VK_KHR_win32_surface'); | raise TvkuInvalidFuncPtrException.Create('vkCreateWin32SurfaceKHR', 'VK_KHR_win32_surface'); | ||||
| err := fInstanceCommands.vkCreateWin32SurfaceKHR(fInstanceCommands.Instance, aCreateInfo, AllocCallbacks, @fHandle); | err := fInstanceCommands.vkCreateWin32SurfaceKHR(fInstanceCommands.Instance, aCreateInfo, AllocCallbacks, @fHandle); | ||||
| {$ENDIF} | {$ENDIF} | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create surface', err); | raise TvkuErrorException.Create('unable to create surface', err); | ||||
| end; | end; | ||||
| @@ -49,7 +49,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkCreateSwapchainKHR) then | if not Assigned(fDeviceCommands.vkCreateSwapchainKHR) then | ||||
| raise TvkuException.Create('invalid function pointer: vkCreateSwapchainKHR; did you enabled the VK_KHR_swapchain extension?'); | raise TvkuException.Create('invalid function pointer: vkCreateSwapchainKHR; did you enabled the VK_KHR_swapchain extension?'); | ||||
| err := fDeviceCommands.vkCreateSwapchainKHR(fDeviceCommands.Device, aCreateInfo, AllocCallbacks, @fHandle); | err := fDeviceCommands.vkCreateSwapchainKHR(fDeviceCommands.Device, aCreateInfo, AllocCallbacks, @fHandle); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to create swap chain', err); | raise TvkuErrorException.Create('unable to create swap chain', err); | ||||
| end; | end; | ||||
| @@ -62,11 +62,11 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkGetSwapchainImagesKHR) then | if not Assigned(fDeviceCommands.vkGetSwapchainImagesKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkGetSwapchainImagesKHR', 'VK_KHR_swapchain'); | raise TvkuInvalidFuncPtrException.Create('vkGetSwapchainImagesKHR', 'VK_KHR_swapchain'); | ||||
| err := fDeviceCommands.vkGetSwapchainImagesKHR(fDeviceCommands.Device, fHandle, @c, nil); | err := fDeviceCommands.vkGetSwapchainImagesKHR(fDeviceCommands.Device, fHandle, @c, nil); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get swap chain image count', err); | raise TvkuErrorException.Create('unable to get swap chain image count', err); | ||||
| SetLength(result, c); | SetLength(result, c); | ||||
| err := fDeviceCommands.vkGetSwapchainImagesKHR(fDeviceCommands.Device, fHandle, @c, @result[0]); | err := fDeviceCommands.vkGetSwapchainImagesKHR(fDeviceCommands.Device, fHandle, @c, @result[0]); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to get swap chain images', err); | raise TvkuErrorException.Create('unable to get swap chain images', err); | ||||
| end; | end; | ||||
| @@ -78,7 +78,7 @@ begin | |||||
| if not Assigned(fDeviceCommands.vkAcquireNextImageKHR) then | if not Assigned(fDeviceCommands.vkAcquireNextImageKHR) then | ||||
| raise TvkuInvalidFuncPtrException.Create('vkAcquireNextImageKHR', 'VK_KHR_swapchain'); | raise TvkuInvalidFuncPtrException.Create('vkAcquireNextImageKHR', 'VK_KHR_swapchain'); | ||||
| err := fDeviceCommands.vkAcquireNextImageKHR(fDeviceCommands.Device, fHandle, aTimeout, aSemaphore, aFence, @result); | err := fDeviceCommands.vkAcquireNextImageKHR(fDeviceCommands.Device, fHandle, aTimeout, aSemaphore, aFence, @result); | ||||
| if (err < VK_SUCCESS) then | |||||
| if (err <> VK_SUCCESS) then | |||||
| raise TvkuErrorException.Create('unable to aquire next image', err); | raise TvkuErrorException.Create('unable to aquire next image', err); | ||||
| end; | end; | ||||
| @@ -97,6 +97,7 @@ type | |||||
| TVkDescriptorImageInfoArr = array of TVkDescriptorImageInfo; | TVkDescriptorImageInfoArr = array of TVkDescriptorImageInfo; | ||||
| TVkDescriptorBufferInfoArr = array of TVkDescriptorBufferInfo; | TVkDescriptorBufferInfoArr = array of TVkDescriptorBufferInfo; | ||||
| TVkClearValueArr = array of TVkClearValue; | TVkClearValueArr = array of TVkClearValue; | ||||
| TVkResultArr = array of TVkResult; | |||||
| TVkUint32List = specialize TvkuList<VkUint32>; | TVkUint32List = specialize TvkuList<VkUint32>; | ||||
| TVkFloatList = specialize TvkuList<VkFloat>; | TVkFloatList = specialize TvkuList<VkFloat>; | ||||