| @@ -33,7 +33,7 @@ | |||
| <PackageName Value="LCL"/> | |||
| </Item1> | |||
| </RequiredPackages> | |||
| <Units Count="49"> | |||
| <Units Count="50"> | |||
| <Unit0> | |||
| <Filename Value="triangle.lpr"/> | |||
| <IsPartOfProject Value="True"/> | |||
| @@ -233,6 +233,10 @@ | |||
| <Filename Value="..\utils\uvkuDescriptorSet.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| </Unit48> | |||
| <Unit49> | |||
| <Filename Value="..\utils\uvkuSemaphore.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| </Unit49> | |||
| </Units> | |||
| </ProjectOptions> | |||
| <CompilerOptions> | |||
| @@ -8,7 +8,7 @@ uses | |||
| cthreads, | |||
| {$ENDIF}{$ENDIF} | |||
| SysUtils, Interfaces, Dialogs, Forms, | |||
| uMainForm, Vulkan, uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet; | |||
| uMainForm, Vulkan, uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet, uvkuSemaphore; | |||
| {$R *.res} | |||
| @@ -4,13 +4,13 @@ | |||
| <PathDelim Value="\"/> | |||
| <Version Value="9"/> | |||
| <BuildModes Active="Default"/> | |||
| <Units Count="70"> | |||
| <Units Count="71"> | |||
| <Unit0> | |||
| <Filename Value="triangle.lpr"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="-1"/> | |||
| <CursorPos X="20" Y="11"/> | |||
| <UsageCount Value="124"/> | |||
| <UsageCount Value="126"/> | |||
| </Unit0> | |||
| <Unit1> | |||
| <Filename Value="uMainForm.pas"/> | |||
| @@ -20,39 +20,41 @@ | |||
| <ResourceBaseClass Value="Form"/> | |||
| <IsVisibleTab Value="True"/> | |||
| <EditorIndex Value="2"/> | |||
| <TopLine Value="115"/> | |||
| <CursorPos X="3" Y="131"/> | |||
| <TopLine Value="1105"/> | |||
| <CursorPos X="28" Y="1131"/> | |||
| <ExtraEditorCount Value="1"/> | |||
| <ExtraEditor1> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="29"/> | |||
| <CursorPos X="5" Y="46"/> | |||
| </ExtraEditor1> | |||
| <UsageCount Value="124"/> | |||
| <UsageCount Value="126"/> | |||
| <Loaded Value="True"/> | |||
| <LoadedDesigner Value="True"/> | |||
| </Unit1> | |||
| <Unit2> | |||
| <Filename Value="..\Vulkan.pas"/> | |||
| <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"/> | |||
| <ExtraEditor1> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="2730"/> | |||
| <CursorPos Y="2754"/> | |||
| </ExtraEditor1> | |||
| <UsageCount Value="124"/> | |||
| <UsageCount Value="126"/> | |||
| <Loaded Value="True"/> | |||
| </Unit2> | |||
| <Unit3> | |||
| <Filename Value="..\utils\uvkuInstance.pas"/> | |||
| <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> | |||
| <Unit4> | |||
| <Filename Value="..\utils\uvkuInstanceFactory.pas"/> | |||
| @@ -60,7 +62,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="13"/> | |||
| <CursorPos X="3" Y="29"/> | |||
| <UsageCount Value="116"/> | |||
| <UsageCount Value="118"/> | |||
| </Unit4> | |||
| <Unit5> | |||
| <Filename Value="..\utils\uvkuPhysicalDevice.pas"/> | |||
| @@ -68,7 +70,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="68"/> | |||
| <CursorPos Y="87"/> | |||
| <UsageCount Value="116"/> | |||
| <UsageCount Value="118"/> | |||
| </Unit5> | |||
| <Unit6> | |||
| <Filename Value="..\utils\uvkuAllocationHandler.pas"/> | |||
| @@ -76,23 +78,24 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="11"/> | |||
| <CursorPos Y="36"/> | |||
| <UsageCount Value="106"/> | |||
| <UsageCount Value="108"/> | |||
| </Unit6> | |||
| <Unit7> | |||
| <Filename Value="..\utils\uvkuDevice.pas"/> | |||
| <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"/> | |||
| </Unit7> | |||
| <Unit8> | |||
| <Filename Value="..\utils\uvkuDeviceFactory.pas"/> | |||
| <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> | |||
| <Unit9> | |||
| <Filename Value="..\utils\uvkuSurface.pas"/> | |||
| @@ -100,7 +103,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="41"/> | |||
| <CursorPos X="94" Y="56"/> | |||
| <UsageCount Value="103"/> | |||
| <UsageCount Value="105"/> | |||
| </Unit9> | |||
| <Unit10> | |||
| <Filename Value="..\utils\uvkuSurfaceFactory.pas"/> | |||
| @@ -108,22 +111,23 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="44"/> | |||
| <CursorPos X="33" Y="60"/> | |||
| <UsageCount Value="102"/> | |||
| <UsageCount Value="104"/> | |||
| </Unit10> | |||
| <Unit11> | |||
| <Filename Value="..\utils\uvkuSwapChainFactory.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="-1"/> | |||
| <CursorPos X="3" Y="13"/> | |||
| <UsageCount Value="93"/> | |||
| <UsageCount Value="95"/> | |||
| </Unit11> | |||
| <Unit12> | |||
| <Filename Value="..\utils\uvkuSwapChain.pas"/> | |||
| <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> | |||
| <Unit13> | |||
| <Filename Value="..\utils\uvkuImageView.pas"/> | |||
| @@ -131,22 +135,23 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="40"/> | |||
| <CursorPos Y="48"/> | |||
| <UsageCount Value="89"/> | |||
| <UsageCount Value="91"/> | |||
| </Unit13> | |||
| <Unit14> | |||
| <Filename Value="..\utils\uvkuImageViewFactory.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="-1"/> | |||
| <CursorPos X="43" Y="9"/> | |||
| <UsageCount Value="89"/> | |||
| <UsageCount Value="91"/> | |||
| </Unit14> | |||
| <Unit15> | |||
| <Filename Value="..\utils\uvkuImage.pas"/> | |||
| <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> | |||
| <Unit16> | |||
| <Filename Value="..\utils\uvkuBase.pas"/> | |||
| @@ -154,7 +159,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="10"/> | |||
| <CursorPos X="3" Y="26"/> | |||
| <UsageCount Value="87"/> | |||
| <UsageCount Value="89"/> | |||
| </Unit16> | |||
| <Unit17> | |||
| <Filename Value="..\utils\uvkuDeviceMemory.pas"/> | |||
| @@ -162,7 +167,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="10"/> | |||
| <CursorPos X="17" Y="23"/> | |||
| <UsageCount Value="85"/> | |||
| <UsageCount Value="87"/> | |||
| </Unit17> | |||
| <Unit18> | |||
| <Filename Value="..\utils\uvkuBuffer.pas"/> | |||
| @@ -170,7 +175,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="85"/> | |||
| <CursorPos X="42" Y="100"/> | |||
| <UsageCount Value="84"/> | |||
| <UsageCount Value="86"/> | |||
| </Unit18> | |||
| <Unit19> | |||
| <Filename Value="..\utils\uvkuImageFactory.pas"/> | |||
| @@ -178,15 +183,15 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="32"/> | |||
| <CursorPos Y="41"/> | |||
| <UsageCount Value="84"/> | |||
| <UsageCount Value="86"/> | |||
| </Unit19> | |||
| <Unit20> | |||
| <Filename Value="..\utils\uvkuTypes.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="1"/> | |||
| <TopLine Value="93"/> | |||
| <CursorPos X="3" Y="109"/> | |||
| <UsageCount Value="84"/> | |||
| <CursorPos X="66" Y="100"/> | |||
| <UsageCount Value="86"/> | |||
| <Loaded Value="True"/> | |||
| </Unit20> | |||
| <Unit21> | |||
| @@ -195,7 +200,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="18"/> | |||
| <CursorPos Y="27"/> | |||
| <UsageCount Value="83"/> | |||
| <UsageCount Value="85"/> | |||
| </Unit21> | |||
| <Unit22> | |||
| <Filename Value="..\utils\uvkuBufferView.pas"/> | |||
| @@ -203,14 +208,14 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="52"/> | |||
| <CursorPos X="56" Y="76"/> | |||
| <UsageCount Value="83"/> | |||
| <UsageCount Value="85"/> | |||
| </Unit22> | |||
| <Unit23> | |||
| <Filename Value="..\utils\uvkuBufferViewFactory.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="-1"/> | |||
| <CursorPos X="31" Y="45"/> | |||
| <UsageCount Value="82"/> | |||
| <UsageCount Value="84"/> | |||
| </Unit23> | |||
| <Unit24> | |||
| <Filename Value="..\utils\uvkuCommandPool.pas"/> | |||
| @@ -218,7 +223,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="61"/> | |||
| <CursorPos X="3" Y="64"/> | |||
| <UsageCount Value="82"/> | |||
| <UsageCount Value="84"/> | |||
| </Unit24> | |||
| <Unit25> | |||
| <Filename Value="..\utils\uvkuCommandPoolFactory.pas"/> | |||
| @@ -226,32 +231,33 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="23"/> | |||
| <CursorPos X="3" Y="34"/> | |||
| <UsageCount Value="81"/> | |||
| <UsageCount Value="83"/> | |||
| </Unit25> | |||
| <Unit26> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <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"/> | |||
| </Unit26> | |||
| <Unit27> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <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> | |||
| <Unit28> | |||
| <Filename Value="..\utils\VulkanUtils.pas"/> | |||
| <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"/> | |||
| </Unit28> | |||
| <Unit29> | |||
| @@ -260,7 +266,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="472"/> | |||
| <CursorPos Y="492"/> | |||
| <UsageCount Value="97"/> | |||
| <UsageCount Value="99"/> | |||
| </Unit29> | |||
| <Unit30> | |||
| <Filename Value="..\utils\uvkuRenderPass.pas"/> | |||
| @@ -268,7 +274,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="52"/> | |||
| <CursorPos Y="77"/> | |||
| <UsageCount Value="78"/> | |||
| <UsageCount Value="80"/> | |||
| </Unit30> | |||
| <Unit31> | |||
| <Filename Value="..\utils\uvkuRenderPassFactory.pas"/> | |||
| @@ -276,7 +282,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="286"/> | |||
| <CursorPos X="39" Y="304"/> | |||
| <UsageCount Value="78"/> | |||
| <UsageCount Value="80"/> | |||
| </Unit31> | |||
| <Unit32> | |||
| <Filename Value="..\utils\uvkuFactoryBase.pas"/> | |||
| @@ -284,7 +290,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="7"/> | |||
| <CursorPos X="69" Y="9"/> | |||
| <UsageCount Value="78"/> | |||
| <UsageCount Value="80"/> | |||
| </Unit32> | |||
| <Unit33> | |||
| <Filename Value="..\utils\uvkuFrameBuffer.pas"/> | |||
| @@ -292,7 +298,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="33"/> | |||
| <CursorPos X="150" Y="40"/> | |||
| <UsageCount Value="76"/> | |||
| <UsageCount Value="78"/> | |||
| </Unit33> | |||
| <Unit34> | |||
| <Filename Value="..\utils\uvkuFrameBufferFactory.pas"/> | |||
| @@ -300,14 +306,14 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="12"/> | |||
| <CursorPos X="25" Y="27"/> | |||
| <UsageCount Value="76"/> | |||
| <UsageCount Value="78"/> | |||
| </Unit34> | |||
| <Unit35> | |||
| <Filename Value="..\utils\uvkuDescriptorSetLayout.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="-1"/> | |||
| <CursorPos X="150" Y="12"/> | |||
| <UsageCount Value="76"/> | |||
| <UsageCount Value="78"/> | |||
| </Unit35> | |||
| <Unit36> | |||
| <Filename Value="..\utils\uvkuDescriptorSetLayoutFactory.pas"/> | |||
| @@ -315,7 +321,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="89"/> | |||
| <CursorPos X="3" Y="106"/> | |||
| <UsageCount Value="75"/> | |||
| <UsageCount Value="77"/> | |||
| </Unit36> | |||
| <Unit37> | |||
| <Filename Value="..\utils\uvkuPipelineLayout.pas"/> | |||
| @@ -323,7 +329,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="48"/> | |||
| <CursorPos X="150" Y="53"/> | |||
| <UsageCount Value="75"/> | |||
| <UsageCount Value="77"/> | |||
| </Unit37> | |||
| <Unit38> | |||
| <Filename Value="..\utils\uvkuPipelineLayoutFactory.pas"/> | |||
| @@ -331,7 +337,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="10"/> | |||
| <CursorPos X="37" Y="112"/> | |||
| <UsageCount Value="75"/> | |||
| <UsageCount Value="77"/> | |||
| </Unit38> | |||
| <Unit39> | |||
| <Filename Value="..\utils\uvkuShaderModule.pas"/> | |||
| @@ -339,7 +345,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="39"/> | |||
| <CursorPos Y="61"/> | |||
| <UsageCount Value="73"/> | |||
| <UsageCount Value="75"/> | |||
| </Unit39> | |||
| <Unit40> | |||
| <Filename Value="..\utils\uvkuShaderModuleFactory.pas"/> | |||
| @@ -347,7 +353,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="136"/> | |||
| <CursorPos Y="159"/> | |||
| <UsageCount Value="73"/> | |||
| <UsageCount Value="75"/> | |||
| </Unit40> | |||
| <Unit41> | |||
| <Filename Value="..\utils\uvkuPipeline.pas"/> | |||
| @@ -355,13 +361,13 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="9"/> | |||
| <CursorPos Y="12"/> | |||
| <UsageCount Value="71"/> | |||
| <UsageCount Value="73"/> | |||
| </Unit41> | |||
| <Unit42> | |||
| <Filename Value="..\utils\uvkuPipelineFactory.pas"/> | |||
| <IsPartOfProject Value="True"/> | |||
| <EditorIndex Value="-1"/> | |||
| <UsageCount Value="70"/> | |||
| <UsageCount Value="72"/> | |||
| </Unit42> | |||
| <Unit43> | |||
| <Filename Value="..\utils\uvkuDebugReporter.pas"/> | |||
| @@ -369,7 +375,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="84"/> | |||
| <CursorPos X="32" Y="103"/> | |||
| <UsageCount Value="48"/> | |||
| <UsageCount Value="50"/> | |||
| </Unit43> | |||
| <Unit44> | |||
| <Filename Value="..\utils\uvkuPipelineCache.pas"/> | |||
| @@ -377,7 +383,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="18"/> | |||
| <CursorPos X="13" Y="38"/> | |||
| <UsageCount Value="42"/> | |||
| <UsageCount Value="44"/> | |||
| </Unit44> | |||
| <Unit45> | |||
| <Filename Value="..\utils\uvkuPipelineCacheFactory.pas"/> | |||
| @@ -385,7 +391,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="33"/> | |||
| <CursorPos X="84" Y="61"/> | |||
| <UsageCount Value="42"/> | |||
| <UsageCount Value="44"/> | |||
| </Unit45> | |||
| <Unit46> | |||
| <Filename Value="..\utils\uvkuDescriptorPool.pas"/> | |||
| @@ -393,7 +399,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="16"/> | |||
| <CursorPos X="5" Y="16"/> | |||
| <UsageCount Value="29"/> | |||
| <UsageCount Value="31"/> | |||
| </Unit46> | |||
| <Unit47> | |||
| <Filename Value="..\utils\uvkuDescriptorPoolFactory.pas"/> | |||
| @@ -401,7 +407,7 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="7"/> | |||
| <CursorPos X="68" Y="31"/> | |||
| <UsageCount Value="29"/> | |||
| <UsageCount Value="31"/> | |||
| </Unit47> | |||
| <Unit48> | |||
| <Filename Value="..\utils\uvkuDescriptorSet.pas"/> | |||
| @@ -409,287 +415,291 @@ | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="11"/> | |||
| <CursorPos Y="51"/> | |||
| <UsageCount Value="28"/> | |||
| <UsageCount Value="30"/> | |||
| </Unit48> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="5"/> | |||
| <CursorPos X="19" Y="17"/> | |||
| <UsageCount Value="44"/> | |||
| </Unit49> | |||
| <Unit50> | |||
| <UsageCount Value="43"/> | |||
| </Unit50> | |||
| <Unit51> | |||
| <Filename Value="..\..\data\Vulkan.tpl"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="44"/> | |||
| <CursorPos X="27" Y="22"/> | |||
| <UsageCount Value="8"/> | |||
| <UsageCount Value="7"/> | |||
| <DefaultSyntaxHighlighter Value="None"/> | |||
| </Unit50> | |||
| <Unit51> | |||
| </Unit51> | |||
| <Unit52> | |||
| <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-base\src\custapp.pp"/> | |||
| <UnitName Value="CustApp"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="13"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="181"/> | |||
| <CursorPos X="23" Y="197"/> | |||
| <UsageCount Value="8"/> | |||
| </Unit52> | |||
| <Unit53> | |||
| <UsageCount Value="7"/> | |||
| </Unit53> | |||
| <Unit54> | |||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\include\customform.inc"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="910"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="96"/> | |||
| <CursorPos X="10" Y="112"/> | |||
| <UsageCount Value="4"/> | |||
| </Unit54> | |||
| <Unit55> | |||
| <UsageCount Value="3"/> | |||
| </Unit55> | |||
| <Unit56> | |||
| <Filename Value="..\Vulkan_old.pas"/> | |||
| <EditorIndex Value="-1"/> | |||
| <WindowIndex Value="-1"/> | |||
| <TopLine Value="2195"/> | |||
| <CursorPos X="3" Y="2211"/> | |||
| <UsageCount Value="4"/> | |||
| </Unit55> | |||
| <Unit56> | |||
| <Filename Value="..\Vulkan.inc"/> | |||
| <EditorIndex Value="-1"/> | |||
| <UsageCount Value="8"/> | |||
| <UsageCount Value="3"/> | |||
| </Unit56> | |||
| <Unit57> | |||
| <Filename Value="..\Vulkan.inc"/> | |||
| <EditorIndex Value="-1"/> | |||
| <UsageCount Value="7"/> | |||
| </Unit57> | |||
| <Unit58> | |||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\forms.pp"/> | |||
| <UnitName Value="Forms"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="1249"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="2100"/> | |||
| <CursorPos X="38" Y="2125"/> | |||
| <UsageCount Value="4"/> | |||
| </Unit58> | |||
| <Unit59> | |||
| <UsageCount Value="3"/> | |||
| </Unit59> | |||
| <Unit60> | |||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\extctrls.pp"/> | |||
| <UnitName Value="ExtCtrls"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="1023"/> | |||
| <CursorPos X="3" Y="1038"/> | |||
| <UsageCount Value="4"/> | |||
| </Unit59> | |||
| <Unit60> | |||
| <UsageCount Value="3"/> | |||
| </Unit60> | |||
| <Unit61> | |||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\controls.pp"/> | |||
| <UnitName Value="Controls"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="2240"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="22"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="7"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="93"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="57"/> | |||
| <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> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="84"/> | |||
| <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"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="97"/> | |||
| <CursorPos X="7" Y="113"/> | |||
| <UsageCount Value="7"/> | |||
| </Unit67> | |||
| <Unit68> | |||
| <UsageCount Value="6"/> | |||
| </Unit68> | |||
| <Unit69> | |||
| <Filename Value="C:\Zusatzprogramme\Lazarus\lcl\include\application.inc"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="2148"/> | |||
| <CursorPos Y="2163"/> | |||
| <UsageCount Value="8"/> | |||
| </Unit68> | |||
| <Unit69> | |||
| <UsageCount Value="7"/> | |||
| </Unit69> | |||
| <Unit70> | |||
| <Filename Value="..\lazopenglcore\uglcCamera.pas"/> | |||
| <EditorIndex Value="-1"/> | |||
| <TopLine Value="31"/> | |||
| <CursorPos X="21" Y="66"/> | |||
| <UsageCount Value="8"/> | |||
| </Unit69> | |||
| <UsageCount Value="7"/> | |||
| </Unit70> | |||
| </Units> | |||
| <JumpHistory Count="29" HistoryIndex="28"> | |||
| <JumpHistory Count="30" HistoryIndex="29"> | |||
| <Position1> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="931" TopLine="920"/> | |||
| <Caret Line="1106" Column="15" TopLine="1081"/> | |||
| </Position1> | |||
| <Position2> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="932" TopLine="920"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="27" Column="25" TopLine="5"/> | |||
| </Position2> | |||
| <Position3> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="935" TopLine="920"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="76" Column="9" TopLine="62"/> | |||
| </Position3> | |||
| <Position4> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="937" TopLine="920"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="77" Column="8" TopLine="59"/> | |||
| </Position4> | |||
| <Position5> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="939" TopLine="920"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="86" Column="17" TopLine="59"/> | |||
| </Position5> | |||
| <Position6> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="942" TopLine="920"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="75" Column="47" TopLine="59"/> | |||
| </Position6> | |||
| <Position7> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="941" TopLine="920"/> | |||
| <Caret Line="1106" Column="20" TopLine="1081"/> | |||
| </Position7> | |||
| <Position8> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="944" TopLine="920"/> | |||
| <Caret Line="61" Column="14" TopLine="52"/> | |||
| </Position8> | |||
| <Position9> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="947" TopLine="921"/> | |||
| <Caret Line="331" Column="19" TopLine="320"/> | |||
| </Position9> | |||
| <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> | |||
| <Position11> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="301" TopLine="284"/> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="336" Column="21" TopLine="320"/> | |||
| </Position11> | |||
| <Position12> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="933" TopLine="916"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="27" Column="15" TopLine="11"/> | |||
| </Position12> | |||
| <Position13> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="935" TopLine="916"/> | |||
| <Caret Line="602" Column="19" TopLine="585"/> | |||
| </Position13> | |||
| <Position14> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="937" TopLine="916"/> | |||
| <Caret Line="642" Column="19" TopLine="622"/> | |||
| </Position14> | |||
| <Position15> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="262" TopLine="246"/> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="1057" Column="41" TopLine="1048"/> | |||
| </Position15> | |||
| <Position16> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="261" TopLine="246"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="9" Column="30" TopLine="2"/> | |||
| </Position16> | |||
| <Position17> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="260" TopLine="246"/> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="1124" Column="64" TopLine="1096"/> | |||
| </Position17> | |||
| <Position18> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="259" TopLine="246"/> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="1127" Column="24" TopLine="1102"/> | |||
| </Position18> | |||
| <Position19> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="255" TopLine="246"/> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="1151" Column="18" TopLine="1125"/> | |||
| </Position19> | |||
| <Position20> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="937" TopLine="916"/> | |||
| <Caret Line="1147" Column="37" TopLine="1126"/> | |||
| </Position20> | |||
| <Position21> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="263" TopLine="246"/> | |||
| <Filename Value="..\utils\uvkuQueue.pas"/> | |||
| <Caret Line="57" TopLine="41"/> | |||
| </Position21> | |||
| <Position22> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="939" TopLine="916"/> | |||
| <Caret Line="1109" Column="26" TopLine="1097"/> | |||
| </Position22> | |||
| <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> | |||
| <Position24> | |||
| <Filename Value="..\utils\uvkuCommandBuffer.pas"/> | |||
| <Caret Line="254" TopLine="250"/> | |||
| <Filename Value="..\utils\uvkuInstance.pas"/> | |||
| <Caret Line="55" Column="23" TopLine="39"/> | |||
| </Position24> | |||
| <Position25> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="935" TopLine="916"/> | |||
| <Caret Line="1109" Column="26" TopLine="1097"/> | |||
| </Position25> | |||
| <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> | |||
| <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> | |||
| <Position28> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="946" Column="22" TopLine="667"/> | |||
| <Caret Line="477" Column="30" TopLine="451"/> | |||
| </Position28> | |||
| <Position29> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="141" Column="3" TopLine="124"/> | |||
| <Caret Line="482" Column="60" TopLine="456"/> | |||
| </Position29> | |||
| <Position30> | |||
| <Filename Value="uMainForm.pas"/> | |||
| <Caret Line="1056" Column="39" TopLine="1039"/> | |||
| </Position30> | |||
| </JumpHistory> | |||
| </ProjectSession> | |||
| <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"> | |||
| <Item1> | |||
| <Expression Value="self"/> | |||
| @@ -18,4 +18,9 @@ object MainForm: TMainForm | |||
| BevelOuter = bvNone | |||
| TabOrder = 0 | |||
| end | |||
| object ApplicationProperties: TApplicationProperties | |||
| OnIdle = ApplicationPropertiesIdle | |||
| left = 56 | |||
| top = 24 | |||
| end | |||
| end | |||
| @@ -27,7 +27,9 @@ type | |||
| end; | |||
| TMainForm = class(TForm) | |||
| ApplicationProperties: TApplicationProperties; | |||
| RenderPanel: TPanel; | |||
| procedure ApplicationPropertiesIdle(Sender: TObject; var Done: Boolean); | |||
| procedure FormCreate(Sender: TObject); | |||
| procedure FormDestroy(Sender: TObject); | |||
| private | |||
| @@ -77,6 +79,7 @@ type | |||
| end; | |||
| procedure UpdateUniformBuffers; | |||
| procedure Render; | |||
| end; | |||
| var | |||
| @@ -179,9 +182,10 @@ var | |||
| r2D: TVkRect2D; | |||
| begin | |||
| try | |||
| fCamera := TglcCamera.Create; | |||
| fAllocHandler := TCustomAllocHandler.Create; | |||
| AllocCallbacks := fAllocHandler.GetStructure; | |||
| SetupCommandBuffer := nil; | |||
| fCamera := TglcCamera.Create; | |||
| fAllocHandler := TCustomAllocHandler.Create; | |||
| AllocCallbacks := fAllocHandler.GetStructure; | |||
| ////////////////////////////////////////////////////////////////////////////// | |||
| WriteLn('create instance: '); | |||
| @@ -237,7 +241,7 @@ begin | |||
| DeviceFactory := TvkuDeviceFactory.Create(fInstance); | |||
| try | |||
| DeviceFactory.AllocHandler := fAllocHandler; | |||
| DeviceFactory.EnabledExtensions.Add('VK_KHR_swapchain'); | |||
| DeviceFactory.EnabledExtensionNames.Add('VK_KHR_swapchain'); | |||
| DeviceFactory.QueueCreateInfos.Length := 1; | |||
| with DeviceFactory.QueueCreateInfos[0] do begin | |||
| Flags := 0; | |||
| @@ -936,6 +940,9 @@ begin | |||
| 0, | |||
| [ fDescriptorSet.Handle ], | |||
| [ ]); | |||
| BindPipeline( | |||
| VK_PIPELINE_BIND_POINT_GRAPHICS, | |||
| fPipeline.Handle); | |||
| BindVertexBuffers( | |||
| VERTEX_BUFFER_BIND_ID, | |||
| [ fVertex.DataBuffer.Handle ], | |||
| @@ -980,6 +987,12 @@ begin | |||
| end; | |||
| end; | |||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| procedure TMainForm.ApplicationPropertiesIdle(Sender: TObject; var Done: Boolean); | |||
| begin | |||
| Render; | |||
| end; | |||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| procedure TMainForm.FormDestroy(Sender: TObject); | |||
| @@ -1069,5 +1082,70 @@ begin | |||
| 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. | |||
| @@ -21,6 +21,7 @@ uses | |||
| uvkuShaderModule, uvkuShaderModuleFactory, | |||
| uvkuPipelineLayout, uvkuPipelineLayoutFactory, uvkuPipelineCache, uvkuPipelineCacheFactory, uvkuPipeline, uvkuPipelineFactory, | |||
| uvkuDescriptorPool, uvkuDescriptorPoolFactory, uvkuDescriptorSet, | |||
| uvkuSemaphore, | |||
| uvkuUtils; | |||
| type | |||
| @@ -62,77 +63,80 @@ type | |||
| TvkuConsoleDebugReporter = uvkuDebugReporter.TvkuConsoleDebugReporter; | |||
| { Instance } | |||
| TvkuInstance = uvkuInstance.TvkuInstance; | |||
| TvkuInstanceFactory = uvkuInstanceFactory.TvkuInstanceFactory; | |||
| TvkuInstance = uvkuInstance.TvkuInstance; | |||
| TvkuInstanceFactory = uvkuInstanceFactory.TvkuInstanceFactory; | |||
| { 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 } | |||
| TvkuSurface = uvkuSurface.TvkuSurface; | |||
| TvkuSurfaceFactory = uvkuSurfaceFactory.TvkuSurfaceFactory; | |||
| TvkuSurface = uvkuSurface.TvkuSurface; | |||
| TvkuSurfaceFactory = uvkuSurfaceFactory.TvkuSurfaceFactory; | |||
| { SwapChain } | |||
| TvkuSwapChain = uvkuSwapChain.TvkuSwapChain; | |||
| TvkuSwapChainFactory = uvkuSwapChainFactory.TvkuSwapChainFactory; | |||
| TvkuSwapChain = uvkuSwapChain.TvkuSwapChain; | |||
| TvkuSwapChainFactory = uvkuSwapChainFactory.TvkuSwapChainFactory; | |||
| { 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 } | |||
| 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 } | |||
| TvkuCommandPool = uvkuCommandPool.TvkuCommandPool; | |||
| TvkuCommandPoolFactory = uvkuCommandPoolFactory.TvkuCommandPoolFactory; | |||
| TvkuCommandBuffer = uvkuCommandBuffer.TvkuCommandBuffer; | |||
| TvkuCommandPool = uvkuCommandPool.TvkuCommandPool; | |||
| TvkuCommandPoolFactory = uvkuCommandPoolFactory.TvkuCommandPoolFactory; | |||
| TvkuCommandBuffer = uvkuCommandBuffer.TvkuCommandBuffer; | |||
| { RenderPass } | |||
| TvkuRenderPass = uvkuRenderPass.TvkuRenderPass; | |||
| TvkuRenderPassFactory = uvkuRenderPassFactory.TvkuRenderPassFactory; | |||
| TvkuRenderPass = uvkuRenderPass.TvkuRenderPass; | |||
| TvkuRenderPassFactory = uvkuRenderPassFactory.TvkuRenderPassFactory; | |||
| { FrameBuffer } | |||
| TvkuFrameBuffer = uvkuFrameBuffer.TvkuFrameBuffer; | |||
| TvkuFrameBufferFactory = uvkuFrameBufferFactory.TvkuFrameBufferFactory; | |||
| TvkuFrameBuffer = uvkuFrameBuffer.TvkuFrameBuffer; | |||
| TvkuFrameBufferFactory = uvkuFrameBufferFactory.TvkuFrameBufferFactory; | |||
| { DescriptorSetLayout } | |||
| TvkuDescriptorSetLayout = uvkuDescriptorSetLayout.TvkuDescriptorSetLayout; | |||
| TvkuDescriptorSetLayoutFactory = uvkuDescriptorSetLayoutFactory.TvkuDescriptorSetLayoutFactory; | |||
| TvkuDescriptorSetLayout = uvkuDescriptorSetLayout.TvkuDescriptorSetLayout; | |||
| TvkuDescriptorSetLayoutFactory = uvkuDescriptorSetLayoutFactory.TvkuDescriptorSetLayoutFactory; | |||
| { Shader Modules } | |||
| TvkuShaderModule = uvkuShaderModule.TvkuShaderModule; | |||
| TvkuShaderModuleFactory = uvkuShaderModuleFactory.TvkuShaderModuleFactory; | |||
| TvkuShaderModule = uvkuShaderModule.TvkuShaderModule; | |||
| TvkuShaderModuleFactory = uvkuShaderModuleFactory.TvkuShaderModuleFactory; | |||
| { 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 } | |||
| TvkuDescriptorPool = uvkuDescriptorPool.TvkuDescriptorPool; | |||
| TvkuDescriptorPoolFactory = uvkuDescriptorPoolFactory.TvkuDescriptorPoolFactory; | |||
| TvkuDescriptorSet = uvkuDescriptorSet.TvkuDescriptorSet; | |||
| TvkuDescriptorPool = uvkuDescriptorPool.TvkuDescriptorPool; | |||
| TvkuDescriptorPoolFactory = uvkuDescriptorPoolFactory.TvkuDescriptorPoolFactory; | |||
| TvkuDescriptorSet = uvkuDescriptorSet.TvkuDescriptorSet; | |||
| { Semaphore } | |||
| TvkuSemaphore = uvkuSemaphore.TvkuSemaphore; | |||
| { 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 vkExtent3D(const X, Y, Z: VkUint32): TVkExtent3D; | |||
| @@ -56,7 +56,7 @@ procedure TvkuBuffer.CreateHandle(const aCreateInfo: TVkBufferCreateInfo); | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| end; | |||
| @@ -65,7 +65,7 @@ procedure TvkuBuffer.BindMemory(const aMemory: VkDeviceMemory; const aOffset: Vk | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| fMemory := aMemory; | |||
| end; | |||
| @@ -102,7 +102,7 @@ begin | |||
| if not Assigned(aAllocCallbacks) then | |||
| aAllocCallbacks := AllocCallbacks; | |||
| 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); | |||
| fBufferMemory := TvkuDeviceMemory.Create(Mem, true, fDeviceCommands, aAllocCallbacks); | |||
| BindMemory(fBufferMemory.Handle, 0); | |||
| @@ -44,7 +44,7 @@ procedure TvkuBufferView.CreateHandle(const aCreateInfo: TVkBufferViewCreateInfo | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| end; | |||
| @@ -186,7 +186,7 @@ begin | |||
| Info.flags := []; // TODO | |||
| Info.pInheritanceInfo := nil; // TODO | |||
| err := DeviceCommands.vkBeginCommandBuffer(fHandle, @Info); | |||
| if (err < VK_SUCCESS) then | |||
| if (err <> VK_SUCCESS) then | |||
| raise TvkuErrorException.Create('unable to begin command buffer', err); | |||
| end; | |||
| @@ -195,7 +195,7 @@ procedure TvkuCommandBuffer.EndCommand; | |||
| var err: TVkResult; | |||
| begin | |||
| err := fDeviceCommands.vkEndCommandBuffer(fHandle); | |||
| if (err < VK_SUCCESS) then | |||
| if (err <> VK_SUCCESS) then | |||
| raise TvkuErrorException.Create('unable to end command buffer', err); | |||
| end; | |||
| @@ -54,7 +54,7 @@ procedure TvkuCommandPool.CreateHandle(const aCreateInfo: TVkCommandPoolCreateIn | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| end; | |||
| @@ -78,7 +78,7 @@ begin | |||
| AllocInfo.commandBufferCount := aCount; | |||
| SetLength(result, aCount); | |||
| 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); | |||
| end; | |||
| @@ -107,7 +107,7 @@ begin | |||
| VK_DEBUG_REPORT_DEBUG_BIT_EXT | |||
| ]; | |||
| 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); | |||
| end; | |||
| @@ -55,7 +55,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateDescriptorPool) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateDescriptorPool'); | |||
| 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); | |||
| end; | |||
| @@ -81,7 +81,7 @@ begin | |||
| AllocInfo.pSetLayouts := @aDescriptorSetLayouts[0]; | |||
| SetLength(result, AllocInfo.descriptorSetCount); | |||
| 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); | |||
| end; | |||
| @@ -98,7 +98,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkFreeDescriptorSets) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkFreeDescriptorSets'); | |||
| 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); | |||
| end; | |||
| @@ -46,7 +46,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateDescriptorSetLayout) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateDescriptorSetLayout'); | |||
| 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); | |||
| end; | |||
| @@ -113,6 +113,7 @@ type | |||
| procedure FreeMemory( | |||
| const aMemory: VkDeviceMemory; | |||
| aAllocCallbacks: PVkAllocationCallbacks = nil); | |||
| procedure WaitIdle; | |||
| function UpdateDescriptorSet: TvkuUpdateDescriptorSetHelper; | |||
| @@ -333,7 +334,7 @@ begin | |||
| if not Assigned(fInstanceCommands.vkCreateDevice) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateDevice'); | |||
| 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); | |||
| fDeviceCommands := LoadDeviceCommands(fInstanceCommands.Instance, fHandle); | |||
| if not Assigned(fDeviceCommands) then | |||
| @@ -365,7 +366,7 @@ begin | |||
| if not Assigned(aAllocCallbacks) then | |||
| aAllocCallbacks := AllocCallbacks; | |||
| 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); | |||
| end; | |||
| @@ -377,6 +378,15 @@ begin | |||
| fDeviceCommands.vkFreeMemory(fHandle, aMemory, aAllocCallbacks); | |||
| 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; | |||
| begin | |||
| @@ -103,14 +103,14 @@ type | |||
| fvkEnabledExtensionNames: array of PVkChar; | |||
| fvkQueueCreateInfos: array of TVkDeviceQueueCreateInfo; | |||
| function GetLayers: TStrings; | |||
| function GetExtensions: TStrings; | |||
| function GetEnabledLayerNames: TStrings; | |||
| function GetEnabledExtensionNames: TStrings; | |||
| 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; | |||
| procedure SetStructure(const aData: TVkDeviceCreateInfo); | |||
| @@ -288,13 +288,13 @@ end; | |||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| //TvkuDeviceFactory////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| function TvkuDeviceFactory.GetLayers: TStrings; | |||
| function TvkuDeviceFactory.GetEnabledLayerNames: TStrings; | |||
| begin | |||
| result := fEnabledLayerNames; | |||
| end; | |||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| function TvkuDeviceFactory.GetExtensions: TStrings; | |||
| function TvkuDeviceFactory.GetEnabledExtensionNames: TStrings; | |||
| begin | |||
| result := fEnabledExtensionNames; | |||
| end; | |||
| @@ -47,7 +47,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkAllocateMemory) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkAllocateMemory'); | |||
| 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); | |||
| end; | |||
| @@ -56,7 +56,7 @@ function TvkuDeviceMemory.Map(const aOffset: VkDeviceSize; aSize: VkDeviceSize; | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| end; | |||
| @@ -46,7 +46,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateFramebuffer) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateFramebuffer'); | |||
| 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); | |||
| end; | |||
| @@ -60,7 +60,7 @@ procedure TvkuImage.CreateHandle(const aCreateInfo: TVkImageCreateInfo); | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| end; | |||
| @@ -86,8 +86,8 @@ begin | |||
| result.dstAccessMask := []; | |||
| result.oldLayout := aOldLayout; | |||
| 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.subresourceRange := range; | |||
| @@ -159,7 +159,7 @@ procedure TvkuImage.BindMemory(const aMemory: VkDeviceMemory; const aOffset: VkD | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| fMemory := aMemory; | |||
| end; | |||
| @@ -195,7 +195,7 @@ begin | |||
| if not Assigned(aAllocCallbacks) then | |||
| aAllocCallbacks := AllocCallbacks; | |||
| 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); | |||
| fImageMemory := TvkuDeviceMemory.Create(Mem, true, fDeviceCommands, aAllocCallbacks); | |||
| BindMemory(fImageMemory.Handle, 0); | |||
| @@ -46,7 +46,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateImageView) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateImageView'); | |||
| 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); | |||
| end; | |||
| @@ -52,12 +52,12 @@ begin | |||
| exit; | |||
| 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); | |||
| SetLength(fPhysicalDevices, c); | |||
| 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); | |||
| end; | |||
| @@ -66,7 +66,7 @@ procedure TvkuInstance.CreateHandle(const aCreateInfo: PVkInstanceCreateInfo); | |||
| var e: TVkResult; | |||
| begin | |||
| e := vkCreateInstance(aCreateInfo, AllocCallbacks, @fHandle); | |||
| if (e < VK_SUCCESS) then | |||
| if (e <> VK_SUCCESS) then | |||
| raise TvkuErrorException.Create('unable to create vulkan instance', e); | |||
| fInstanceCommands := LoadInstanceCommands(fHandle); | |||
| if not Assigned(InstanceCommands) then | |||
| @@ -114,7 +114,7 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceImageFormatProperties) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceImageFormatProperties'); | |||
| 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); | |||
| end; | |||
| @@ -140,7 +140,7 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfaceSupportKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfaceSupportKHR', 'VK_KHR_surface'); | |||
| 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); | |||
| result := (b <> 0); | |||
| end; | |||
| @@ -153,7 +153,7 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfaceCapabilitiesKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfaceCapabilitiesKHR', 'VK_KHR_surface'); | |||
| 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); | |||
| end; | |||
| @@ -179,11 +179,11 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceSurfacePresentModesKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceSurfacePresentModesKHR', 'VK_KHR_surface'); | |||
| 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); | |||
| SetLength(result, c); | |||
| 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); | |||
| end; | |||
| @@ -197,11 +197,11 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceDisplayPropertiesKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceDisplayPropertiesKHR', 'VK_KHR_display'); | |||
| 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); | |||
| SetLength(result, c); | |||
| 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); | |||
| end; | |||
| @@ -215,11 +215,11 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetPhysicalDeviceDisplayPlanePropertiesKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetPhysicalDeviceDisplayPlanePropertiesKHR', 'VK_KHR_display'); | |||
| 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); | |||
| SetLength(result, c); | |||
| 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); | |||
| end; | |||
| @@ -233,11 +233,11 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetDisplayPlaneSupportedDisplaysKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetDisplayPlaneSupportedDisplaysKHR', 'VK_KHR_display'); | |||
| 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); | |||
| SetLength(result, c); | |||
| 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); | |||
| end; | |||
| @@ -251,11 +251,11 @@ begin | |||
| if not Assigned(fInstanceCommands.vkGetDisplayModePropertiesKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetDisplayModePropertiesKHR', 'VK_KHR_display'); | |||
| 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); | |||
| SetLength(result, c); | |||
| 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); | |||
| end; | |||
| @@ -87,7 +87,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateGraphicsPipelines) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateGraphicsPipelines'); | |||
| 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); | |||
| end; | |||
| @@ -110,7 +110,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateComputePipelines) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateComputePipelines'); | |||
| 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); | |||
| end; | |||
| @@ -44,7 +44,7 @@ procedure TvkuPipelineCache.CreateHandle(const aCreateInfo: TVkPipelineCacheCrea | |||
| var err: TVkResult; | |||
| begin | |||
| 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); | |||
| end; | |||
| @@ -46,7 +46,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreatePipelineLayout) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreatePipelineLayout'); | |||
| 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); | |||
| end; | |||
| @@ -6,7 +6,7 @@ interface | |||
| uses | |||
| Classes, SysUtils, | |||
| Vulkan, uvkuBase; | |||
| Vulkan, uvkuBase, uvkuTypes; | |||
| type | |||
| ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
| @@ -24,6 +24,10 @@ type | |||
| const aCommandBuffers: array of VkCommandBuffer; | |||
| const aSignalSemaphores: array of VkSemaphore; | |||
| const aFence: VkFence); | |||
| function Present( | |||
| const aWaitSemaphore: array of VkSemaphore; | |||
| const aSwapChains: array of VkSwapchainKHR; | |||
| const aImageIndices: array of VkUint32): TVkResultArr; | |||
| procedure WaitIdle; | |||
| constructor Create( | |||
| @@ -49,8 +53,9 @@ var | |||
| SubmitInfo: TVkSubmitInfo; | |||
| err: TVkResult; | |||
| 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); | |||
| SubmitInfo.sType := VK_STRUCTURE_TYPE_SUBMIT_INFO; | |||
| @@ -63,16 +68,43 @@ begin | |||
| SubmitInfo.signalSemaphoreCount := Length(aSignalSemaphores); | |||
| SubmitInfo.pSignalSemaphores := @aSignalSemaphores[0]; | |||
| 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); | |||
| 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; | |||
| var err: TVkResult; | |||
| begin | |||
| err := fDeviceCommands.vkQueueWaitIdle(fHandle); | |||
| if (err < VK_SUCCESS) then | |||
| if (err <> VK_SUCCESS) then | |||
| raise TvkuErrorException.Create('error while waiting for queue', err); | |||
| end; | |||
| @@ -46,7 +46,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateRenderPass) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateRenderPass'); | |||
| 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); | |||
| 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 | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateShaderModule'); | |||
| 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); | |||
| end; | |||
| @@ -56,7 +56,7 @@ begin | |||
| raise TvkuInvalidFuncPtrException.Create('vkCreateWin32SurfaceKHR', 'VK_KHR_win32_surface'); | |||
| err := fInstanceCommands.vkCreateWin32SurfaceKHR(fInstanceCommands.Instance, aCreateInfo, AllocCallbacks, @fHandle); | |||
| {$ENDIF} | |||
| if (err < VK_SUCCESS) then | |||
| if (err <> VK_SUCCESS) then | |||
| raise TvkuErrorException.Create('unable to create surface', err); | |||
| end; | |||
| @@ -49,7 +49,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkCreateSwapchainKHR) then | |||
| raise TvkuException.Create('invalid function pointer: vkCreateSwapchainKHR; did you enabled the VK_KHR_swapchain extension?'); | |||
| 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); | |||
| end; | |||
| @@ -62,11 +62,11 @@ begin | |||
| if not Assigned(fDeviceCommands.vkGetSwapchainImagesKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkGetSwapchainImagesKHR', 'VK_KHR_swapchain'); | |||
| 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); | |||
| SetLength(result, c); | |||
| 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); | |||
| end; | |||
| @@ -78,7 +78,7 @@ begin | |||
| if not Assigned(fDeviceCommands.vkAcquireNextImageKHR) then | |||
| raise TvkuInvalidFuncPtrException.Create('vkAcquireNextImageKHR', 'VK_KHR_swapchain'); | |||
| 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); | |||
| end; | |||
| @@ -97,6 +97,7 @@ type | |||
| TVkDescriptorImageInfoArr = array of TVkDescriptorImageInfo; | |||
| TVkDescriptorBufferInfoArr = array of TVkDescriptorBufferInfo; | |||
| TVkClearValueArr = array of TVkClearValue; | |||
| TVkResultArr = array of TVkResult; | |||
| TVkUint32List = specialize TvkuList<VkUint32>; | |||
| TVkFloatList = specialize TvkuList<VkFloat>; | |||