Пример #1
0
        public static Bool32 _DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object,
                                          HostSize location, int messageCode, string layerPrefix, string message, IntPtr userData)
        {
            Console.WriteLine(message);

            return(false);
        }
Пример #2
0
        private static Bool32 DebugCallback(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, HostSize location, int messageCode, string pLayerPrefix, string pMessage, IntPtr pUserData)
        {
            string logMessage = $"{pLayerPrefix}: {pMessage}";

            Console.WriteLine(logMessage);
            System.Diagnostics.Debug.WriteLine(logMessage);

            return(false);
        }
Пример #3
0
 /// <summary>
 /// -
 /// </summary>
 public void DebugReportMessage(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, Size location, int messageCode, string layerPrefix, string message)
 {
     unsafe
     {
         try
         {
             var   commandDelegate       = this.commandCache.GetCommandDelegate <Interop.vkDebugReportMessageEXT>("vkDebugReportMessageEXT", "instance");
             char *marshalledLayerPrefix = Interop.HeapUtil.MarshalTo(layerPrefix);
             char *marshalledMessage     = Interop.HeapUtil.MarshalTo(message);
             commandDelegate(this.handle, flags, objectType, @object, location, messageCode, marshalledLayerPrefix, marshalledMessage);
         }
         finally
         {
             Interop.HeapUtil.FreeLog();
         }
     }
 }
 private static RawBool DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, PointerSize location, int messageCode, string layerPrefix, string message, IntPtr userData)
 {
     Debug.WriteLine($"{flags}: {message} ([{messageCode}] {layerPrefix})");
     return true;
 }
Пример #5
0
        private static Bool32 DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, Size location, int messageCode, string layerPrefix, string message, IntPtr userData)
        {
            Debug.WriteLine(message);

            return(false);
        }
Пример #6
0
 private static RawBool DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, PointerSize location, int messageCode, string layerPrefix, string message, IntPtr userData)
 {
     Debug.WriteLine($"{flags}: {message} ([{messageCode}] {layerPrefix})");
     return(true);
 }
Пример #7
0
 public Bool32 DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object,
                           HostSize location, int messageCode, string layerPrefix, string message, IntPtr userData)
 {
     return(VkHelperFunctions._DebugReport(flags, objectType, @object, location, messageCode, layerPrefix, message, userData));
 }
Пример #8
0
 public NativeResource(DebugReportObjectType type, ulong handle)
 {
     this.type   = type;
     this.handle = handle;
 }
Пример #9
0
 /// <summary>
 /// Vulkan debug callback.
 /// </summary>
 private Bool32 DebugCallback(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, HostSize location, int messageCode, string pLayerPrefix, string pMessage, IntPtr pUserData)
 {
     Console.WriteLine(pMessage);
     return(false);
 }
Пример #10
0
        private Bool32 DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, Size location, int messageCode, string layerPrefix, string message, IntPtr userData)
        {
            System.Diagnostics.Debug.WriteLine($"{flags}: {message}");

            return(true);
        }
Пример #11
0
 internal unsafe void DebugReportMessage(uint flags, DebugReportObjectType objectType, ulong @object, PointerSize location, int messageCode, ref byte layerPrefix, byte* message)
 {
     fixed (byte* __layerPrefix__ = &layerPrefix)
     {
         vkDebugReportMessageEXT(this, flags, objectType, @object, location, messageCode, __layerPrefix__, message);
     }
 }
Пример #12
0
 internal static unsafe extern void vkDebugReportMessageEXT(Instance instance, uint flags, DebugReportObjectType objectType, ulong @object, PointerSize location, int messageCode, byte* layerPrefix, byte* message);
Пример #13
0
        private static unsafe Bool32 DebugReportCallbackWrapperCallback(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, HostSize location, int messageCode, string pLayerPrefix, string pMessage, IntPtr pUserData)
        {
            if (pUserData == IntPtr.Zero)
            {
                return(false);
            }

            System.Runtime.InteropServices.GCHandle gch = System.Runtime.InteropServices.GCHandle.FromIntPtr(pUserData);
            DebugReportCallbackWrapper callback         = (DebugReportCallbackWrapper)gch.Target;

            if (callback == null)
            {
                return(false);
            }

            return(callback.callback_(flags, objectType, @object, location, messageCode, pLayerPrefix, pMessage) && callback.ValidationLayerTesting);
        }