]> O.S.I.I.S - jp/vke.net.git/commitdiff
debug
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 5 Dec 2021 08:09:58 +0000 (09:09 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 5 Dec 2021 08:09:58 +0000 (09:09 +0100)
vke/src/SpecializationConstant.cs
vke/src/base/GraphicPipeline.cs
vke/src/base/Queue.cs
vke/src/base/RenderPass.cs

index a2a095ee8ba486a92122264828042fe2ffafdd5a..65f3fe0f8c5cf6a0f8314c62bda0a3f7ad1aa68a 100644 (file)
@@ -11,18 +11,18 @@ namespace vke {
        /// Hold shader specialization constant value and type
        /// </summary>
        public class SpecializationConstant<T> : SpecializationConstant {
-               T val;          
+               T val;
 
-        public T Value => val;        
+        public T Value => val;
 
                #region CTOR
-               public SpecializationConstant (uint id, T value) : base(id) {            
+               public SpecializationConstant (uint id, T value) : base(id) {
             val = value;
         }
                #endregion
 
                public override uint Size => (uint)Marshal.SizeOf<T> ();
-               internal unsafe override void WriteTo (IntPtr ptr) {                    
+               internal unsafe override void WriteTo (IntPtr ptr) {
                        if (typeof (T) == typeof (float)) {
                                float v = Convert.ToSingle (Value);
                                System.Buffer.MemoryCopy (&v, ptr.ToPointer (), 4, 4);
@@ -82,7 +82,6 @@ namespace vke {
                public void Dispose () {
                        infos.Dispose();
                        Marshal.FreeHGlobal (pData);
-                       entries.Unpin ();
                }
        }
 }
index 88c5fc7e63c08e1400c84fbd5b6af61d4ad7352d..01a8ef4bda79be3e98c772e47d97ba9e512add17 100644 (file)
@@ -99,6 +99,10 @@ namespace vke {
 
                                        Utils.CheckResult (vkCreateGraphicsPipelines (Dev.Handle, Cache == null ? VkPipelineCache.Null : Cache.handle, 1, ref info, IntPtr.Zero, out handle));
 
+                                       vertInputInfo.Dispose();
+                                       viewportState.Dispose();
+                                       dynStatesInfo.Dispose();
+                                       colorBlendInfo.Dispose();
                                        info.Dispose ();
                                }
                        }
index 3de9713ce09d8eb951c69f7bc264f56c2398cb5b..e1f25620de5ef84b99d0c4790e058733d1d5f1c0 100644 (file)
@@ -49,6 +49,8 @@ namespace vke {
 
                        vkQueuePresentKHR (handle, ref present);
 
+                       idx.Unpin();
+
                        present.Dispose();
                }
        }
index 27d86873140551461f5c54084ba35cab0cac660b..cd1c975ccc643b3aee57647188951bb720b69156 100644 (file)
@@ -113,9 +113,6 @@ namespace vke {
 
                                handle = Dev.CreateRenderPass (renderPassInfo);
 
-                               foreach (SubPass sp in subpasses)
-                                       sp.UnpinLists ();
-
                                if (PNext != null)
                                        PNext.ReleasePointer ();
 
@@ -208,7 +205,7 @@ namespace vke {
 
                        vkCmdBeginRenderPass (cmd.Handle, ref info, contents);
 
-                       ClearValues.Unpin ();
+                       info.Dispose ();
                }
                /// <summary>
                /// Switch to next subpass