]> O.S.I.I.S - jp/vke.net.git/commitdiff
Test ci (#1)
authorj-p <jp_bruyere@hotmail.com>
Sun, 26 Jan 2020 02:18:04 +0000 (03:18 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Jan 2020 02:18:04 +0000 (03:18 +0100)
* update samples with initVulkan() override, update CI files
* build spirvtasks first
* use dist xenial for travis, update vulkan apt source

22 files changed:
.travis.yml
Directory.Build.props [new file with mode: 0644]
README.md
SpirVTasks/CompileGLSLTask.cs
SpirVTasks/SpirVTasks.csproj
addons/Directory.Build.props
appveyor.yml
netfx.props [deleted file]
samples/Directory.Build.props
samples/DistanceFieldFontTest/Program.cs
samples/Model/main.cs
samples/Textured/main.cs
samples/TexturedCube/main.cs
samples/Triangle/main.cs
samples/compute/delaunay.cs
samples/deferred/main-crow.cs
samples/deferred/main.cs
samples/pbr/main.cs
samples/pbr/pbr.csproj
samples/pbr/screenshot.png [new file with mode: 0644]
vke.net.sln
vke/vke.csproj

index 408fa8a282be93e8ee020617ced16cf0751216c0..4956f1c0c0fc97b2cb3a2f4fd828564a79d371bb 100644 (file)
@@ -1,16 +1,20 @@
+
 language: csharp
-dist: bionic
-dotnet: 2.2.401-1
-mono: latest
+
+dist: xenial
+
+dotnet: 3.1
+
+env:
+    - FrameworkPathOverride=/usr/lib/mono/4.5/
 
 before_install:
     - wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
-    - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.1.121-bionic.list http://packages.lunarg.com/vulkan/1.1.121/lunarg-vulkan-1.1.121-bionic.list
-    - sudo apt update
+    - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-xenial.list https://packages.lunarg.com/vulkan/lunarg-vulkan-xenial.list 
+    - sudo apt -qq update
     - sudo apt install vulkan-sdk
 
 script:
-    - msbuild /t:restore
-    - msbuild
+    - dotnet build /p:Configuration=ReleaseSpirVTasks
+    - dotnet build /p:Configuration=Release
     
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644 (file)
index 0000000..999299b
--- /dev/null
@@ -0,0 +1,8 @@
+<Project>
+       <PropertyGroup>
+               <RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>
+               <RestoreAdditionalProjectSources Condition="Exists('$(SolutionDir)build\$(Configuration)\')">$(SolutionDir)build\$(Configuration)\</RestoreAdditionalProjectSources>
+               <SpirVTasksReleaseVersion>0.1.41</SpirVTasksReleaseVersion>
+               <SpirVTasksPackageVersion>$(SpirVTasksReleaseVersion)-beta</SpirVTasksPackageVersion>
+       </PropertyGroup>
+</Project>
index 94bb90f2ecdf7ba686bafdded5dfc86c41066134..74ebeb72a2afcf45d01d835fe0e76bdc09b4b0f3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,13 +1,15 @@
 <h1 align="center">
-vke.net 
-  <br>  
+    vke.net
+    <br>  
+    Vulkan Engine for .NET
+    <br>  
 <p align="center">
   <a href="https://www.nuget.org/packages/vke"><img src="https://buildstats.info/nuget/vke"></a>
   <a href="https://travis-ci.org/jpbruyere/vke.net">
       <img src="https://travis-ci.org/jpbruyere/vke.net.svg?branch=master">
   </a>
   <a href="https://ci.appveyor.com/project/jpbruyere/vke-net">
-    <img src="https://ci.appveyor.com/api/projects/status/j387lo59vnov8jbc?svg=true">
+       <img src="https://img.shields.io/appveyor/ci/jpbruyere/vke-net?label=Windows&logo=appveyor&logoColor=lightgrey">
   </a>
   <a href="https://www.paypal.me/GrandTetraSoftware">
     <img src="https://img.shields.io/badge/Donate-PayPal-green.svg">
@@ -22,7 +24,9 @@ vke.net
    <br>adaptation of the gltf PBR sample from Sacha Willems</br>
 </p>
 
-**vke.net** (_vulkan engine for .net_) is composed of high level classes encapsulating vulkan objects with `IDispose` model and **reference counting**. [GLFW](https://www.glfw.org/)  handles the windowing system.
+**vke.net** (_vulkan engine for .net_) is composed of high level classes encapsulating [vulkan]() objects with `IDispose` model and **reference counting**. [GLFW](https://www.glfw.org/)  handles the windowing system.
+
+
 
 Use the 'download_datas.sh' script for downloading sample's datas.
 
index 5c65dd5eecbcaf2486264f13cc754b92fc02ab09..1b98bc826239201a26eb1d73b27c446900b5d8a2 100644 (file)
@@ -136,6 +136,7 @@ namespace SpirVTasks {
                /// Use the SpirVCompilerPath element if present. if not search 'VULKAN_SDK' environment, then PATH env variable.
                /// </summary>
                bool tryFindGlslcExecutable (out string glslcPath) {
+                       glslcPath = "";
                        if (!string.IsNullOrEmpty (SpirVCompilerPath?.ItemSpec)) {
                                glslcPath = SpirVCompilerPath.ItemSpec;
                                if (!File.Exists (glslcPath))
@@ -146,14 +147,17 @@ namespace SpirVTasks {
                        if (Environment.OSVersion.Platform.ToString ().StartsWith ("Win", StringComparison.Ordinal))
                                glslcExec = glslcExec + ".exe";
 
-                       glslcPath = Path.Combine (Environment.GetEnvironmentVariable ("VULKAN_SDK"), "bin");
-                       glslcPath = Path.Combine (glslcPath, glslcExec);
-                       if (File.Exists (glslcPath))
-                               return true;
+                       string vkSdk = Environment.GetEnvironmentVariable ("VULKAN_SDK");
+                       if (!string.IsNullOrEmpty (vkSdk)) {
+                               glslcPath = Path.Combine (vkSdk, "bin");
+                               glslcPath = Path.Combine (glslcPath, glslcExec);
+                               if (File.Exists (glslcPath))
+                                       return true;
+                       }
 
                        string envStrPathes = Environment.GetEnvironmentVariable ("PATH");
                        if (!string.IsNullOrEmpty (envStrPathes)) {
-                               foreach (string path in envStrPathes.Split (';')) {
+                               foreach (string path in envStrPathes.Split (':')) {
                                        glslcPath = Path.Combine (path, glslcExec);
                                        if (File.Exists (glslcPath))
                                                return true;
index bb9bb63fdd5ea1e3af3ab418ab389f6475fd5780..54286d35592b969ee695ce2113ab108cad7ec7be 100644 (file)
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project Sdk="Microsoft.NET.Sdk">
-       <PropertyGroup>
+       <PropertyGroup>                 
                <TargetFrameworks>netstandard2.0</TargetFrameworks>
                
-               <ReleaseVersion>0.1.38</ReleaseVersion>
+               <ReleaseVersion>$(SpirVTasksReleaseVersion)</ReleaseVersion>
                
                <SynchReleaseVersion>false</SynchReleaseVersion>
                <AssemblyVersion>$(ReleaseVersion)</AssemblyVersion>
                <Description>MSBuild addon to compile and embed spirV shaders</Description>
                <PackageId>SpirVTasks</PackageId>
                <PackageTags>vulkan msbuild spirv glsl addons</PackageTags>
-               <PackageVersion>$(ReleaseVersion)-beta</PackageVersion>
+               <PackageVersion>$(SpirVTasksPackageVersion)</PackageVersion>
                <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
                <PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
                <PackageProjectUrl>https://github.com/jpbruyere/vk.net/blob/master/SpirVTasks/README.md</PackageProjectUrl>
@@ -22,6 +22,8 @@
                <EnableDefaultNoneItems>false</EnableDefaultNoneItems>
                <EnableDefaultCompileItems>true</EnableDefaultCompileItems>
                <AssemblyName>SpirVTasks_$(TargetFramework)</AssemblyName>
+               
+               <RestoreIgnoreFailedSource>true</RestoreIgnoreFailedSource>
        </PropertyGroup>
        <ItemGroup>
                <PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.0.461" />
index 81a78f6f7ac6e2cefe5ece7239f75e7b027ce197..f1fba1afc93fc650d3637a799571464c051d703c 100644 (file)
@@ -1,4 +1,5 @@
 <Project>
+       <Import Project="../Directory.Build.props" />
        <PropertyGroup>
                <RootDirectory>$(MSBuildThisFileDirectory)../</RootDirectory>
                <Deterministic>true</Deterministic>
@@ -16,7 +17,8 @@
                <LangVersion>7.2</LangVersion>
                
                <SpirVAdditionalIncludeDirectories>$(MSBuildThisFileDirectory)common\shaders</SpirVAdditionalIncludeDirectories>
-
+               
+               <RestoreAdditionalProjectSources Condition="Exists('$(SolutionDir)build\$(Configuration)\')">$(SolutionDir)build\$(Configuration)\</RestoreAdditionalProjectSources>
        </PropertyGroup>
     
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">    
@@ -34,7 +36,7 @@
        </ItemGroup>
        
        <ItemGroup>
-               <PackageReference Include="SpirVTasks" Version="0.1.38-beta" /> 
+               <PackageReference Include="SpirVTasks" Version="$(SpirVTasksPackageVersion)" />
                <PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />                  
        </ItemGroup>    
        
index 3f45e42cdb08a79260212c9ed26d82c47fc8c94f..354ea62c9f4b602fbbb0b84f72269d449b646d28 100644 (file)
@@ -1,19 +1,45 @@
-version: 1.0.{build}
-image: Visual Studio 2019
+version: 0.1.{build}
 
-environment:
-    VULKAN_SDK: C:/VulkanSDK/1.1.130.0
-    APPVEYOR_SAVE_CACHE_ON_ERROR: true
+image:
+  - Visual Studio 2019
+  - Ubuntu
 
-cache:
-    - VulkanSDK.exe
-    - c:\VulkanSDK\
-
-install:
-    - if not exist VulkanSDK.exe curl -L --silent --show-error --output VulkanSDK.exe https://vulkan.lunarg.com/sdk/download/1.1.130.0/windows/VulkanSDK-1.1.130.0-Installer.exe?Human=true && VulkanSDK.exe /S
-
-before_build:
-  - nuget restore
 
 build:
   verbosity: minimal
+
+for:
+  -
+    matrix:
+      only:
+        - image: Visual Studio 2019
+    environment:
+      VULKAN_SDK: C:/VulkanSDK/1.1.130.0
+      APPVEYOR_SAVE_CACHE_ON_ERROR: true
+    cache:
+      - VulkanSDK.exe
+      - c:\VulkanSDK\
+    install:
+      - if not exist VulkanSDK.exe curl -L --silent --show-error --output VulkanSDK.exe https://vulkan.lunarg.com/sdk/download/1.1.130.0/windows/VulkanSDK-1.1.130.0-Installer.exe?Human=true && VulkanSDK.exe /S
+    build_script:
+      - msbuild /p:Configuration=ReleaseSpirVTasks /t:restore
+      - msbuild /p:Configuration=ReleaseSpirVTasks
+      - msbuild /p:Configuration=Release /t:restore
+      - msbuild /p:Configuration=Release
+
+  -
+    matrix:
+      only:
+        - image: Ubuntu
+    environment:
+      FrameworkPathOverride: /usr/lib/mono/4.5/
+    install:
+      - wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
+      - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-bionic.list https://packages.lunarg.com/vulkan/lunarg-vulkan-bionic.list 
+      - sudo apt -qq update
+      - sudo apt -y install vulkan-sdk
+      - glslc --version
+    build_script:
+      - dotnet build /p:Configuration=ReleaseSpirVTasks
+      - dotnet build /p:Configuration=Release
+
diff --git a/netfx.props b/netfx.props
deleted file mode 100644 (file)
index 25fdbe0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
-    <!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
-    <TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>
-
-    <!-- Look in the standard install locations -->
-    <BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
-    <BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
-    <BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
-
-    <!-- If we found Mono reference assemblies, then use them -->
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
-    <FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
-    <EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
-
-    <!-- Add the Facades directory.  Not sure how else to do this. Necessary at least for .NET 4.5 -->
-    <AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
-  </PropertyGroup>
-</Project>
-
index 0f2b9a8e3c3a4713e589befd0781105c2139fcae..2600f8b34459095bf3c2547356932736fd720e7f 100644 (file)
@@ -1,4 +1,5 @@
 <Project>
+       <Import Project="../Directory.Build.props" />
        <PropertyGroup>
                <RootDirectory>$(MSBuildThisFileDirectory)../</RootDirectory>
                <Deterministic>true</Deterministic>
@@ -15,7 +16,8 @@
                <IncludeDefaultNoneItems>false</IncludeDefaultNoneItems>
 
                <SpirVAdditionalIncludeDirectories>$(MSBuildThisFileDirectory)common\shaders</SpirVAdditionalIncludeDirectories>
-
+               
+               <RestoreAdditionalProjectSources Condition="Exists('$(SolutionDir)build\$(Configuration)\')">$(SolutionDir)build\$(Configuration)\</RestoreAdditionalProjectSources>
        </PropertyGroup>
     
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">    
@@ -33,7 +35,7 @@
        </ItemGroup>
                        
        <ItemGroup>
-               <PackageReference Include="SpirVTasks" Version="0.1.38-beta" />         
+               <PackageReference Include="SpirVTasks" Version="$(SpirVTasksPackageVersion)" />
        </ItemGroup>    
 
        <ItemGroup>    
index 7e0d330a61fbfbcb3997b27b3bbf2be1e3d98ad2..b0df355f2b17284e450a27c378cfec1bd562e99e 100644 (file)
@@ -62,7 +62,9 @@ namespace DistanceFieldFontTest {
                Vector4 textColor = new Vector4 (1.0f, 1.0f, 0.0f, 1.0f);//alpha => 0:disabled 1:enabled
                Vector4 outlineColor = new Vector4 (1.0f, 0.0f, 0.0f, 0.6f);//alpha => 0:disabled 1:enabled
 
-               Program () : base () {
+               protected override void initVulkan () {
+                       base.initVulkan ();
+
                        cmds = cmdPool.AllocateCommandBuffer(swapChain.ImageCount);
 
                        font = new BMFont (Utils.DataDirectory + "font.fnt");
index e93019dd2b84106a54e6269ea9cc28dd3ef0ced4..21e0269dbabbf37da5783c90b784265158980f0a 100644 (file)
@@ -45,9 +45,10 @@ namespace ModelSample
                float rotX, rotY, rotZ = 0f, zoom = 2f;
 
                SimpleModel helmet;
-               vke.DebugUtils.Messenger dbgmsg;
 
-               Program () : base () {
+               protected override void initVulkan () {
+                       base.initVulkan ();
+
                        cmds = cmdPool.AllocateCommandBuffer(swapChain.ImageCount);
 
                        descriptorPool = new DescriptorPool (dev, 2,
@@ -222,7 +223,6 @@ namespace ModelSample
                                        frameBuffers?.Dispose();
                                        descriptorPool.Dispose ();
                                        uboMats.Dispose ();
-                                       dbgmsg?.Dispose ();
                                }
                        }
 
index b14dd459ba056c28f7840c9df8dfd905bdd13f47..fb671bb4aa3a2c8097e5d6b7c8e675d46e6c7ad3 100644 (file)
@@ -6,16 +6,15 @@ using vke;
 using Vulkan;
 
 namespace Textured {
+       /// <summary>
+       /// Simple textured quad sample
+       /// </summary>
        class Program : VkWindow {
                static void Main (string[] args) {
 #if DEBUG
                        Instance.VALIDATION = true;
                        Instance.RENDER_DOC_CAPTURE = true;
 #endif
-
-                       foreach (string s in System.Reflection.Assembly.GetEntryAssembly ().GetManifestResourceNames ())
-                               Console.WriteLine (s);
-
                        using (Program vke = new Program ()) {
                                vke.Run ();
                        }
@@ -67,7 +66,9 @@ namespace Textured {
                        Utils.DataDirectory + "font.ktx",
                };
 
-               Program () : base () {
+               protected override void initVulkan () {
+                       base.initVulkan ();
+                                       
                        cmds = cmdPool.AllocateCommandBuffer(swapChain.ImageCount);
                                
                        loadTexture (imgPathes[currentImgIndex]);
@@ -113,27 +114,30 @@ namespace Textured {
                        dev.WaitIdle ();
                        cmdPool.Reset();
                        for (int i = 0; i < swapChain.ImageCount; ++i) {
-                               cmds[i].Start();
-                               recordDraw (cmds[i], frameBuffers[i]);
-                               cmds[i].End ();                          
-                       }
-               }
-               void recordDraw (CommandBuffer cmd, FrameBuffer fb) {
-                       pipeline.RenderPass.Begin (cmd, fb);
+                               CommandBuffer cmd = cmds[i];
+                               FrameBuffer fb = frameBuffers[i];
+
+                               cmd.Start();
 
-                       cmd.SetViewport (fb.Width, fb.Height);
-                       cmd.SetScissor (fb.Width, fb.Height);
-                       cmd.BindDescriptorSet (pipeline.Layout, descriptorSet);
+                               pipeline.RenderPass.Begin (cmd, fb);
 
-                       pipeline.Bind (cmd);
+                               cmd.SetViewport (fb.Width, fb.Height);
+                               cmd.SetScissor (fb.Width, fb.Height);
+                               cmd.BindDescriptorSet (pipeline.Layout, descriptorSet);
 
-                       cmd.BindVertexBuffer (vbo, 0);
-                       cmd.BindIndexBuffer (ibo, VkIndexType.Uint16);
-                       cmd.DrawIndexed ((uint)indices.Length);
+                               pipeline.Bind (cmd);
 
-                       pipeline.RenderPass.End (cmd);
+                               cmd.BindVertexBuffer (vbo, 0);
+                               cmd.BindIndexBuffer (ibo, VkIndexType.Uint16);
+                               cmd.DrawIndexed ((uint)indices.Length);
+
+                               pipeline.RenderPass.End (cmd);
+
+                               cmd.End ();                              
+                       }
                }
 
+
                VkMemoryPropertyFlags imgProp = VkMemoryPropertyFlags.DeviceLocal;
                bool genMipMaps = true;
                VkImageTiling tiling = VkImageTiling.Optimal;
@@ -169,6 +173,7 @@ namespace Textured {
                        texture = nextTexture;
                        nextTexture = null;
                }
+
                void updateMatrices () { 
                        matrices.projection = Matrix4x4.CreatePerspectiveFieldOfView (Utils.DegreesToRadians (60f), (float)swapChain.Width / (float)swapChain.Height, 0.1f, 256.0f);
                        matrices.view = Matrix4x4.CreateTranslation (0, 0, -2.5f * zoom);
index d15a0292ad241a782dd28223cbd6e2b267e7eeca..cfd19c20ed40e9296b634339c99bd34e88d46068 100644 (file)
@@ -10,6 +10,9 @@ using Vulkan;
 using Buffer = vke.Buffer;
 
 namespace TextureCube {
+       /// <summary>
+       /// Simple textured cube sampled.
+       /// </summary>
        class Program : VkWindow {
                static void Main (string[] args) {
 #if DEBUG
@@ -109,8 +112,10 @@ namespace TextureCube {
 
 #endif
 
-               Program () : base () {
-                       cmds = cmdPool.AllocateCommandBuffer(swapChain.ImageCount);
+               protected override void initVulkan () {
+                       base.initVulkan ();
+
+                       cmds = cmdPool.AllocateCommandBuffer (swapChain.ImageCount);
 
                        vbo = new GPUBuffer<float> (presentQueue, cmdPool, VkBufferUsageFlags.VertexBuffer, g_vertex_buffer_data);
 
@@ -147,7 +152,6 @@ namespace TextureCube {
                        if (nextTexture != null)
                                updateTextureSet ();
 
-
 #if WITH_VKVG
                        dsVkvg = descriptorPool.Allocate (pipeline.Layout.DescriptorSetLayouts[0]);
                        vkvgPipeline = new VkvgPipeline.VkvgPipeline (instance, dev, presentQueue, pipeline);
index d49856205c6c1ec705c08dc9b5f0a435d427d295..e9b19961bdd9fb688938d36721060cf538ca0435 100644 (file)
@@ -10,30 +10,24 @@ using vke;
 using Vulkan;
 
 namespace Triangle {
-       public class Renderer {
-               public DescriptorPool descriptorPool;
-               [XmlIgnore] public DescriptorSetLayout dsLayout;
-       }
        class Program : VkWindow {
                static void Main (string[] args) {
-#if DEBUG
-                       Instance.VALIDATION = true;
-                       Instance.RENDER_DOC_CAPTURE = false;
-#endif
-
                        using (Program vke = new Program ()) {
                                vke.Run ();
                        }
                }
 
-               float rotSpeed = 0.01f, zoomSpeed = 0.01f;
+               const float rotSpeed = 0.01f, zoomSpeed = 0.01f;
                float rotX, rotY, rotZ = 0f, zoom = 1f;
 
+               [StructLayout (LayoutKind.Sequential)]
                struct Matrices {
                        public Matrix4x4 projection;
                        public Matrix4x4 view;
                        public Matrix4x4 model;
                }
+
+               [StructLayout(LayoutKind.Sequential)]
                struct Vertex {
                        Vector3 position;
                        Vector3 color;
@@ -50,6 +44,7 @@ namespace Triangle {
                HostBuffer vbo;
                HostBuffer uboMats;
 
+               DescriptorPool descriptorPool;
                DescriptorSet descriptorSet;
 
                FrameBuffers frameBuffers;
@@ -62,33 +57,23 @@ namespace Triangle {
                };
                ushort[] indices = new ushort[] { 0, 1, 2 };
 
+               Program () : base () {}
 
-
-               public Renderer r = new Renderer ();
-
-               Program () : base () {
-                       cmds = cmdPool.AllocateCommandBuffer(swapChain.ImageCount);
+               protected override void initVulkan () {
+                       base.initVulkan ();
 
                        vbo = new HostBuffer<Vertex> (dev, VkBufferUsageFlags.VertexBuffer, vertices);
                        ibo = new HostBuffer<ushort> (dev, VkBufferUsageFlags.IndexBuffer, indices);
                        uboMats = new HostBuffer (dev, VkBufferUsageFlags.UniformBuffer, matrices);
 
-                       r.descriptorPool = new DescriptorPool (dev, 1,
-                               new VkDescriptorPoolSize (VkDescriptorType.UniformBuffer),
-                               new VkDescriptorPoolSize (VkDescriptorType.CombinedImageSampler));                              
+                       descriptorPool = new DescriptorPool (dev, 1, new VkDescriptorPoolSize (VkDescriptorType.UniformBuffer));
 
-                       XmlSerializer serializer = new XmlSerializer (typeof(Renderer), Utils.GetXmlOverrides());
-                       using (Stream s = new FileStream ("/home/jp/test.xml", FileMode.Create)) {
-                               serializer.Serialize (s, r);
-                       }
-
-
-                       r.dsLayout = new DescriptorSetLayout (dev,
-                                       new VkDescriptorSetLayoutBinding (0, VkShaderStageFlags.Vertex | VkShaderStageFlags.Fragment, VkDescriptorType.UniformBuffer));
+                       GraphicPipelineConfig cfg = GraphicPipelineConfig.CreateDefault (VkPrimitiveTopology.TriangleList, VkSampleCountFlags.SampleCount1, false);
 
-                       GraphicPipelineConfig cfg = GraphicPipelineConfig.CreateDefault (VkPrimitiveTopology.TriangleList, VkSampleCountFlags.SampleCount1,false);
+                       cfg.Layout = new PipelineLayout (dev,
+                               new DescriptorSetLayout (dev,
+                                       new VkDescriptorSetLayoutBinding (0, VkShaderStageFlags.Vertex | VkShaderStageFlags.Fragment, VkDescriptorType.UniformBuffer)));
 
-                       cfg.Layout = new PipelineLayout (dev, r.dsLayout);
                        cfg.RenderPass = new RenderPass (dev, swapChain.ColorFormat, cfg.Samples);
                        cfg.AddVertexBinding<Vertex> (0);
                        cfg.AddVertexAttributes (0, VkFormat.R32g32b32Sfloat, VkFormat.R32g32b32Sfloat);
@@ -100,17 +85,19 @@ namespace Triangle {
 
                        //note that descriptor set is allocated after the pipeline creation that use this layout, layout is activated
                        //automaticaly on pipeline creation, and will be disposed automatically when no longuer in use.
-                       descriptorSet = r.descriptorPool.Allocate (r.dsLayout);
+                       descriptorSet = descriptorPool.Allocate (pipeline.Layout.DescriptorSetLayouts[0]);
 
-                       DescriptorSetWrites uboUpdate = new DescriptorSetWrites (descriptorSet, r.dsLayout);
+                       DescriptorSetWrites uboUpdate = new DescriptorSetWrites (descriptorSet, pipeline.Layout.DescriptorSetLayouts[0]);
                        uboUpdate.Write (dev, uboMats.Descriptor);
 
                        uboMats.Map ();
+
+                       cmds = cmdPool.AllocateCommandBuffer (swapChain.ImageCount);
                }
 
                public override void UpdateView () {
-                       matrices.projection = Matrix4x4.CreatePerspectiveFieldOfView (Utils.DegreesToRadians (45f),
-                               (float)swapChain.Width / (float)swapChain.Height, 0.1f, 256.0f) * Camera.VKProjectionCorrection;
+                       matrices.projection = Utils.CreatePerspectiveFieldOfView (Utils.DegreesToRadians (45f),
+                               (float)swapChain.Width / (float)swapChain.Height, 0.1f, 256.0f);
                        matrices.view = 
                                Matrix4x4.CreateFromAxisAngle (Vector3.UnitZ, rotZ) *
                                Matrix4x4.CreateFromAxisAngle (Vector3.UnitY, rotY) *
@@ -133,6 +120,7 @@ namespace Triangle {
                                return;
                        updateViewRequested = true;
                }
+
                void buildCommandBuffers() {
                        cmdPool.Reset (VkCommandPoolResetFlags.ReleaseResources);
 
@@ -176,7 +164,7 @@ namespace Triangle {
                                        pipeline.Dispose ();
 
                                        frameBuffers?.Dispose();
-                                       r.descriptorPool.Dispose ();
+                                       descriptorPool.Dispose ();
                                        vbo.Dispose ();
                                        ibo.Dispose ();
                                        uboMats.Dispose ();
index 4a36790da472a8066f988ea17dad4bf7eeaa0af7..7f707d3764ab76ccfb1863a813ad9377407379cd 100644 (file)
@@ -30,8 +30,6 @@ namespace delaunay {
 
                ComputePipeline plCompute, plNormalize;
 
-               DebugReport dbgReport;
-
                const uint imgDim = 256;
                uint zoom = 2;
                int invocationCount = 8;
@@ -51,8 +49,9 @@ namespace delaunay {
 
                }
 
+               protected override void initVulkan () {
+                       base.initVulkan ();
 
-               public Program () : base () {
                        imgResult = new Image (dev, VkFormat.R32g32b32a32Sfloat, VkImageUsageFlags.TransferDst | VkImageUsageFlags.Sampled, VkMemoryPropertyFlags.DeviceLocal,
                                imgDim, imgDim);
                        imgResult.CreateView ();
@@ -307,8 +306,6 @@ namespace delaunay {
                                        stagingDataBuff.Dispose ();
 
                                        imgResult.Dispose ();
-
-                                       dbgReport?.Dispose ();
                                }
                        }
 
index 20f656697aad26836596fd6c2329882deff40ee4..f90efcb81e5323b114f282c10c96efb82b237a1f 100644 (file)
@@ -138,15 +138,17 @@ namespace deferred {
 
                DebugReport dbgRepport;
 
-               Program () : base() {
+               protected override void initVulkan () {
+                       base.initVulkan ();
 
-                       if (Instance.DEBUG_UTILS)
-                               dbgRepport = new DebugReport (instance,
+#if DEBUG
+                       dbgRepport = new DebugReport (instance,
                                        VkDebugReportFlagsEXT.ErrorEXT
                                        | VkDebugReportFlagsEXT.DebugEXT
                                        | VkDebugReportFlagsEXT.WarningEXT
                                        | VkDebugReportFlagsEXT.PerformanceWarningEXT
                                );
+#endif
 
                        camera = new Camera (Utils.DegreesToRadians (45f), 1f, 0.1f, 16f);
                        camera.SetPosition (0, 0, 2);
index 85e81aab9f4f89801786f79f8f1a3ace70f4572e..1a6ea63345a471604ddf4eccdc4bfaca10909451 100644 (file)
@@ -1,4 +1,8 @@
-using System;
+// Copyright (c) 2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
+using System;
 using System.Numerics;
 using System.Runtime.InteropServices;
 using vke;
@@ -7,17 +11,20 @@ using Glfw;
 using Vulkan;
 
 namespace deferred {
+       /// <summary>
+       /// Deferred PBR rendering.
+       /// </summary>
        class Deferred : VkWindow {
                static void Main (string[] args) {
 #if DEBUG
                        Instance.VALIDATION = true;
-                       Instance.RENDER_DOC_CAPTURE = true;
+                       //Instance.RENDER_DOC_CAPTURE = true;
 #endif
                        SwapChain.PREFERED_FORMAT = VkFormat.B8g8r8a8Srgb;
                        DeferredPbrRenderer.TEXTURE_ARRAY = true;
-                       DeferredPbrRenderer.NUM_SAMPLES = VkSampleCountFlags.SampleCount1;
-                       DeferredPbrRenderer.HDR_FORMAT = VkFormat.R16g16b16a16Sfloat;
-                       DeferredPbrRenderer.MRT_FORMAT = VkFormat.R16g16b16a16Sfloat;
+                       DeferredPbrRenderer.NUM_SAMPLES = VkSampleCountFlags.SampleCount8;
+                       DeferredPbrRenderer.HDR_FORMAT = VkFormat.R32g32b32a32Sfloat;
+                       DeferredPbrRenderer.MRT_FORMAT = VkFormat.R32g32b32a32Sfloat;
 
                        PbrModelTexArray.TEXTURE_DIM = 1024;
 
@@ -80,13 +87,16 @@ namespace deferred {
 
                vke.DebugUtils.Messenger dbgmsg;
 
-               Deferred () : base("deferred") {
+               protected override void initVulkan () {
+                       base.initVulkan ();
+
+#if DEBUG
                        dbgmsg = new vke.DebugUtils.Messenger (instance, VkDebugUtilsMessageTypeFlagsEXT.PerformanceEXT | VkDebugUtilsMessageTypeFlagsEXT.ValidationEXT | VkDebugUtilsMessageTypeFlagsEXT.GeneralEXT,
                                VkDebugUtilsMessageSeverityFlagsEXT.InfoEXT |
                                VkDebugUtilsMessageSeverityFlagsEXT.WarningEXT |
                                VkDebugUtilsMessageSeverityFlagsEXT.ErrorEXT |
                                VkDebugUtilsMessageSeverityFlagsEXT.VerboseEXT);
-
+#endif
 
                        camera = new Camera (Utils.DegreesToRadians (45f), 1f, 0.1f, 16f);
                        camera.SetPosition (0, 0, -2);
@@ -358,7 +368,7 @@ namespace deferred {
                                        renderer.Dispose ();
                                        plToneMap.Dispose ();
                                        descriptorPool.Dispose ();
-                                       dbgmsg.Dispose ();
+                                       dbgmsg?.Dispose ();
                                }
                        }
                        base.Dispose (disposing);
index 7bc30ea10bea85298910887136905cacfed025e0..4375fecd677f9504255db7a740ea6c7ed1b76145 100644 (file)
@@ -13,7 +13,7 @@ using Vulkan;
 using vke;
 
 namespace pbrSample {
-       class Program : VkWindow{
+       class Program : VkWindow {
 
                static void Main (string[] args) {
 #if DEBUG
@@ -34,7 +34,7 @@ namespace pbrSample {
                        enabled_features.samplerAnisotropy = available_features.samplerAnisotropy;
                }
 
-               VkSampleCountFlags samples = VkSampleCountFlags.SampleCount4;
+               VkSampleCountFlags samples = VkSampleCountFlags.SampleCount8;
 
                FrameBuffers frameBuffers;
                PBRPipeline pbrPipeline;
@@ -94,7 +94,7 @@ namespace pbrSample {
                VkvgPipeline.VkvgPipeline vkvgPipeline;
 
                void vkvgDraw () {
-            using (vkvg.Context ctx = vkvgPipeline.CreateContext ()) {
+                       using (vkvg.Context ctx = vkvgPipeline.CreateContext ()) {
                                ctx.Clear ();
 
                                ctx.LineWidth = 1;
@@ -124,7 +124,7 @@ namespace pbrSample {
                                ctx.ShowText (string.Format ($"Gamma:   {pbrPipeline.matrices.gamma,5} "));
                                y += dy;
                                ctx.MoveTo (x, y);
-                               ctx.ShowText (string.Format ($"Light pos:   {lightPos.ToString()} "));
+                               ctx.ShowText (string.Format ($"Light pos:   {lightPos.ToString ()} "));
 
 #if PIPELINE_STATS
                                if (results == null)
@@ -167,13 +167,14 @@ namespace pbrSample {
                Vector4 lightPos = new Vector4 (1, 0, 0, 0);
                uint curModelIndex = 0;
 
-               Program () : base() {
+               protected override void initVulkan () {
+                       base.initVulkan ();
 
                        //UpdateFrequency = 20;
                        camera = new Camera (Utils.DegreesToRadians (45f), 1f, 0.1f, 64f);
                        camera.SetPosition (0, 0, -2);
 
-                       pbrPipeline = new PBRPipeline(presentQueue,
+                       pbrPipeline = new PBRPipeline (presentQueue,
                                new RenderPass (dev, swapChain.ColorFormat, dev.GetSuitableDepthFormat (), samples));
 
                        loadCurrentModel ();
@@ -221,7 +222,7 @@ namespace pbrSample {
 
 #if WITH_VKVG
                        vkvgPipeline.RecordDraw (cmd);
-#endif                                         
+#endif
                        pbrPipeline.RenderPass.End (cmd);
                }
 
@@ -269,11 +270,11 @@ namespace pbrSample {
                        vkvgDraw ();
 #endif
                }
-#endregion
+               #endregion
+
 
-                
                protected override void OnResize () {
-                       base.OnResize();
+                       base.OnResize ();
 
                        dev.WaitIdle ();
 #if WITH_VKVG
@@ -283,8 +284,8 @@ namespace pbrSample {
 
                        UpdateView ();
 
-                       frameBuffers?.Dispose();
-                       frameBuffers = pbrPipeline.RenderPass.CreateFrameBuffers(swapChain);
+                       frameBuffers?.Dispose ();
+                       frameBuffers = pbrPipeline.RenderPass.CreateFrameBuffers (swapChain);
 
                        buildCommandBuffers ();
                        dev.WaitIdle ();
@@ -308,7 +309,7 @@ namespace pbrSample {
                        switch (key) {
                        case Key.Space:
                                if (modifiers.HasFlag (Modifier.Shift))
-                                       curModelIndex = curModelIndex == 0 ? (uint)modelPathes.Length - 1 : curModelIndex-1;
+                                       curModelIndex = curModelIndex == 0 ? (uint)modelPathes.Length - 1 : curModelIndex - 1;
                                else
                                        curModelIndex = curModelIndex < (uint)modelPathes.Length - 1 ? curModelIndex + 1 : 0;
                                reloadModel = true;
@@ -338,95 +339,95 @@ namespace pbrSample {
                                        }
                                        queryUpdatePrefilCube = updateViewRequested = true;
                                        break;*/
-                               case Key.P:
-                                       showDebugImg = !showDebugImg;
-                                       queryUpdatePrefilCube = updateViewRequested = true;
-                                       break;
-                               case Key.Keypad0:
-                                       currentDebugView = DebugView.none;
-                                       break;
-                               case Key.Keypad1:
-                                       currentDebugView = DebugView.color;
-                                       break;
-                               case Key.Keypad2:
-                                       currentDebugView = DebugView.normal;
-                                       break;
-                               case Key.Keypad3:
-                                       currentDebugView = DebugView.occlusion;
-                                       break;
-                               case Key.Keypad4:
-                                       currentDebugView = DebugView.emissive;
-                                       break;
-                               case Key.Keypad5:
-                                       currentDebugView = DebugView.metallic;
-                                       break;
-                               case Key.Keypad6:
-                                       currentDebugView = DebugView.roughness;
-                                       break;
-                               case Key.Up:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               lightPos -= Vector4.UnitZ;
-                                       else
-                                               camera.Move (0, 0, 1);
-                                       break;
-                               case Key.Down:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               lightPos += Vector4.UnitZ;
-                                       else
-                                               camera.Move (0, 0, -1);
-                                       break;
-                               case Key.Left:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               lightPos -= Vector4.UnitX;
-                                       else
-                                               camera.Move (1, 0, 0);
-                                       break;
-                               case Key.Right:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               lightPos += Vector4.UnitX;
-                                       else
-                                               camera.Move (-1, 0, 0);
-                                       break;
-                               case Key.PageUp:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               lightPos += Vector4.UnitY;
-                                       else
-                                               camera.Move (0, 1, 0);
-                                       break;
-                               case Key.PageDown:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               lightPos -= Vector4.UnitY;
-                                       else
-                                               camera.Move (0, -1, 0);
-                                       break;
-                               case Key.S:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               pbrPipeline.matrices.scaleIBLAmbient -= 0.1f;
-                                       else
-                                               pbrPipeline.matrices.scaleIBLAmbient += 0.1f;
-                                       break;
-                               case Key.F2:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               pbrPipeline.matrices.exposure -= 0.3f;
-                                       else
-                                               pbrPipeline.matrices.exposure += 0.3f;
-                                       break;
+                       case Key.P:
+                               showDebugImg = !showDebugImg;
+                               queryUpdatePrefilCube = updateViewRequested = true;
+                               break;
+                       case Key.Keypad0:
+                               currentDebugView = DebugView.none;
+                               break;
+                       case Key.Keypad1:
+                               currentDebugView = DebugView.color;
+                               break;
+                       case Key.Keypad2:
+                               currentDebugView = DebugView.normal;
+                               break;
+                       case Key.Keypad3:
+                               currentDebugView = DebugView.occlusion;
+                               break;
+                       case Key.Keypad4:
+                               currentDebugView = DebugView.emissive;
+                               break;
+                       case Key.Keypad5:
+                               currentDebugView = DebugView.metallic;
+                               break;
+                       case Key.Keypad6:
+                               currentDebugView = DebugView.roughness;
+                               break;
+                       case Key.Up:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       lightPos -= Vector4.UnitZ;
+                               else
+                                       camera.Move (0, 0, 1);
+                               break;
+                       case Key.Down:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       lightPos += Vector4.UnitZ;
+                               else
+                                       camera.Move (0, 0, -1);
+                               break;
+                       case Key.Left:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       lightPos -= Vector4.UnitX;
+                               else
+                                       camera.Move (1, 0, 0);
+                               break;
+                       case Key.Right:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       lightPos += Vector4.UnitX;
+                               else
+                                       camera.Move (-1, 0, 0);
+                               break;
+                       case Key.PageUp:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       lightPos += Vector4.UnitY;
+                               else
+                                       camera.Move (0, 1, 0);
+                               break;
+                       case Key.PageDown:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       lightPos -= Vector4.UnitY;
+                               else
+                                       camera.Move (0, -1, 0);
+                               break;
+                       case Key.S:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       pbrPipeline.matrices.scaleIBLAmbient -= 0.1f;
+                               else
+                                       pbrPipeline.matrices.scaleIBLAmbient += 0.1f;
+                               break;
+                       case Key.F2:
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       pbrPipeline.matrices.exposure -= 0.3f;
+                               else
+                                       pbrPipeline.matrices.exposure += 0.3f;
+                               break;
                        case Key.F3:
-                                       if (modifiers.HasFlag (Modifier.Shift))
-                                               pbrPipeline.matrices.gamma -= 0.1f;
-                                       else
-                                               pbrPipeline.matrices.gamma += 0.1f;
-                                       break;
-                               case Key.F4:
-                                       if (camera.Type == Camera.CamType.FirstPerson)
-                                               camera.Type = Camera.CamType.LookAt;
-                                       else
-                                               camera.Type = Camera.CamType.FirstPerson;
-                                       Console.WriteLine ($"camera type = {camera.Type}");
-                                       break;
-                               default:
-                                       base.onKeyDown (key, scanCode, modifiers);
-                                       return;
+                               if (modifiers.HasFlag (Modifier.Shift))
+                                       pbrPipeline.matrices.gamma -= 0.1f;
+                               else
+                                       pbrPipeline.matrices.gamma += 0.1f;
+                               break;
+                       case Key.F4:
+                               if (camera.Type == Camera.CamType.FirstPerson)
+                                       camera.Type = Camera.CamType.LookAt;
+                               else
+                                       camera.Type = Camera.CamType.FirstPerson;
+                               Console.WriteLine ($"camera type = {camera.Type}");
+                               break;
+                       default:
+                               base.onKeyDown (key, scanCode, modifiers);
+                               return;
                        }
                        updateViewRequested = true;
                }
@@ -436,7 +437,7 @@ namespace pbrSample {
                        if (disposing) {
                                if (!isDisposed) {
                                        dev.WaitIdle ();
-                                       frameBuffers?.Dispose();
+                                       frameBuffers?.Dispose ();
                                        pbrPipeline.Dispose ();
 #if WITH_VKVG
                                        vkvgPipeline.Dispose ();
index c0a4e2ce92030cbc7c2d8c2727cb9d2ee87b7c03..1648b091c22e7142da9fe962601611a12b7658a9 100644 (file)
@@ -2,7 +2,7 @@
 
                 
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DefineConstants>NETSTANDARD;NETSTANDARD2_0;_WITH_SHADOWS;WITH_VKVG;TRACE;DEBUG;NETFRAMEWORK;NET471</DefineConstants>
+    <DefineConstants>_WITH_SHADOWS;_WITH_VKVG;TRACE;DEBUG</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
     <GLSLShader Update="shaders/simpletexture.frag">
diff --git a/samples/pbr/screenshot.png b/samples/pbr/screenshot.png
new file mode 100644 (file)
index 0000000..fdecfa2
Binary files /dev/null and b/samples/pbr/screenshot.png differ
index fd98d3cc6c4009812c77b633cfca06f2392afff2..3f41d4e3284fb081b20808368a284bfbc1cb98be 100644 (file)
@@ -33,10 +33,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "deferred", "samples\deferre
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pbr", "samples\pbr\pbr.csproj", "{7EB2430B-6BC0-4AE9-B1FA-57C3DB2AE1C5}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vkeEditor", "samples\vkeEditor\vkeEditor.csproj", "{81619805-9E6F-404A-BC0D-A2C25DDA2EDC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "samples\tests\tests.csproj", "{F9117397-E105-44DD-A9BD-F6F8DC641095}"
-EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -115,12 +111,14 @@ Global
                {8185163E-A67C-4C0E-8548-67E2A9F16309}.BuildPackages|Any CPU.ActiveCfg = Release|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.Release|Any CPU.Build.0 = Release|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.DebugCrow|Any CPU.ActiveCfg = Debug|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.DebugCrow|Any CPU.Build.0 = Debug|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.BuildPackages|Any CPU.ActiveCfg = Release|Any CPU
                {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.BuildPackages|Any CPU.Build.0 = Release|Any CPU
+               {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.ReleaseSpirVTasks|Any CPU.ActiveCfg = Release|Any CPU
+               {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.ReleaseSpirVTasks|Any CPU.Build.0 = Release|Any CPU
+               {7B05B5A7-49E2-4D05-BEF8-734F70CDBF17}.Release|Any CPU.Build.0 = Release|Any CPU
                {F04C3F79-2E08-4D35-A804-43039DCB7F5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {F04C3F79-2E08-4D35-A804-43039DCB7F5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {F04C3F79-2E08-4D35-A804-43039DCB7F5E}.Release|Any CPU.Build.0 = Release|Any CPU
@@ -150,26 +148,6 @@ Global
                {7EB2430B-6BC0-4AE9-B1FA-57C3DB2AE1C5}.DebugCrow|Any CPU.Build.0 = Debug|Any CPU
                {7EB2430B-6BC0-4AE9-B1FA-57C3DB2AE1C5}.Release|Any CPU.Build.0 = Release|Any CPU
                {7EB2430B-6BC0-4AE9-B1FA-57C3DB2AE1C5}.BuildPackages|Any CPU.ActiveCfg = Release|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.Release|Any CPU.Build.0 = Release|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.DebugCrow|Any CPU.ActiveCfg = Debug|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.DebugCrow|Any CPU.Build.0 = Debug|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.ReleaseSpirVTasks|Any CPU.ActiveCfg = Debug|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.ReleaseSpirVTasks|Any CPU.Build.0 = Debug|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.BuildPackages|Any CPU.ActiveCfg = Release|Any CPU
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC}.BuildPackages|Any CPU.Build.0 = Release|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.Release|Any CPU.Build.0 = Release|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.DebugCrow|Any CPU.ActiveCfg = Debug|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.DebugCrow|Any CPU.Build.0 = Debug|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.ReleaseSpirVTasks|Any CPU.ActiveCfg = Debug|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.ReleaseSpirVTasks|Any CPU.Build.0 = Debug|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.BuildPackages|Any CPU.ActiveCfg = Release|Any CPU
-               {F9117397-E105-44DD-A9BD-F6F8DC641095}.BuildPackages|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(NestedProjects) = preSolution
                {FEF3AF30-5B88-4D3C-8BD7-8734200E0D1E} = {4AA67AB0-C331-4CB2-9C00-B74F5DE31658}
@@ -184,8 +162,6 @@ Global
                {D9A41382-444E-44ED-B638-3D8F06F2FBC2} = {16439374-B8DB-4643-8116-EB3358B49A12}
                {124152F8-FAE6-4D4B-87B9-6074DD365E9B} = {16439374-B8DB-4643-8116-EB3358B49A12}
                {7EB2430B-6BC0-4AE9-B1FA-57C3DB2AE1C5} = {16439374-B8DB-4643-8116-EB3358B49A12}
-               {81619805-9E6F-404A-BC0D-A2C25DDA2EDC} = {16439374-B8DB-4643-8116-EB3358B49A12}
-               {F9117397-E105-44DD-A9BD-F6F8DC641095} = {16439374-B8DB-4643-8116-EB3358B49A12}
        EndGlobalSection
        GlobalSection(MonoDevelopProperties) = preSolution
                Policies = $0
index b11e08721dd11d89d91a699ab13f5c7c9877578a..6646adf3a3c83aee1ea5957e6760b883df6dd665 100644 (file)
@@ -3,7 +3,7 @@
        <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>          
                
-               <ReleaseVersion>0.1.11</ReleaseVersion>         
+               <ReleaseVersion>0.1.12</ReleaseVersion>         
                
                <AssemblyVersion>$(ReleaseVersion)</AssemblyVersion>
                <Description>C# vulkan library with IDispose model and references counting</Description>                
@@ -11,6 +11,7 @@
                <PackageTags>vulkan game engine compute glfw c#</PackageTags>
                <PackageVersion>$(AssemblyVersion)-beta</PackageVersion>
                <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
+               <GenerateDocumentationFile>true</GenerateDocumentationFile>
                <PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
                <PackageProjectUrl>https://github.com/jpbruyere/vke.net/blob/master/README.md</PackageProjectUrl>
                <License>MIT</License>
@@ -29,6 +30,8 @@
     <LangVersion>7.2</LangVersion>
                <GenerateDocumentationFile>true</GenerateDocumentationFile>    
                <NoWarn>$(NoWarn);1591</NoWarn>
+               
+               <RestoreAdditionalProjectSources Condition="Exists('$(SolutionDir)build\$(Configuration)\')">$(SolutionDir)build\$(Configuration)\</RestoreAdditionalProjectSources>
        </PropertyGroup>
        
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
                <DebugType>full</DebugType>
                <Optimize>false</Optimize>
                <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
-               <DefineConstants>MEMORY_POOLS;NETSTANDARD;NETSTANDARD2_0;DEBUG;NETFRAMEWORK;NET471</DefineConstants>
+               <DefineConstants>MEMORY_POOLS;NETSTANDARD;NETSTANDARD2_0;DEBUG</DefineConstants>
        </PropertyGroup>
        
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
                <Optimize>true</Optimize>
-               <DefineConstants>MEMORY_POOLS</DefineConstants>
+               <DefineConstants>MEMORY_POOLS;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
        </PropertyGroup>
        
        <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
        </ItemGroup>
                
        <ItemGroup>
-               <PackageReference Include="SpirVTasks" Version="0.1.37-beta" />
-               <PackageReference Include="Vulkan" Version="0.1.9-beta" />
+               <PackageReference Include="SpirVTasks" Version="$(SpirVTasksPackageVersion)" />
+               <PackageReference Include="Vulkan" Version="0.2.0-beta" />
        </ItemGroup>
        <ItemGroup>
-               <GLSLShader Include="shaders\**\*.frag;shaders\**\*.vert;shaders\**\*.comp;shaders\**\*.geom">
-                       <ResourceId>testRsID</ResourceId>
-               </GLSLShader>
+               <GLSLShader Include="shaders\**\*.frag;shaders\**\*.vert;shaders\**\*.comp;shaders\**\*.geom" />
                <Compile Remove="build\**\*.cs;Properties\AssemblyInfo.cs;src\Renderer.cs;src\QueueFamily.cs" />
        </ItemGroup>
 </Project>