org.lwjgl.vulkan.VkDebugReportCallbackEXTI Maven / Gradle / Ivy
Show all versions of lwjgl-vulkan Show documentation
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import org.lwjgl.system.*;
import static org.lwjgl.system.dyncall.DynCallback.*;
/**
* Application-defined debug report callback function.
*
* C Specification
*
* The prototype for the {@link VkDebugReportCallbackCreateInfoEXT}{@code ::pfnCallback} function implemented by the application is:
*
*
* typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
* VkDebugReportFlagsEXT flags,
* VkDebugReportObjectTypeEXT objectType,
* uint64_t object,
* size_t location,
* int32_t messageCode,
* const char* pLayerPrefix,
* const char* pMessage,
* void* pUserData);
*
* Description
*
* The callback must not call {@link EXTDebugReport#vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT}.
*
* The callback returns a {@code VkBool32} that indicates to the calling layer the application's desire to abort the call. A value of {@link VK10#VK_TRUE TRUE} indicates that the application wants to abort this call. If the application returns {@link VK10#VK_FALSE FALSE}, the command must not be aborted. Applications should always return {@link VK10#VK_FALSE FALSE} so that they see the same behavior with and without validation layers enabled.
*
* If the application returns {@link VK10#VK_TRUE TRUE} from its callback and the Vulkan call being aborted returns a {@code VkResult}, the layer will return {@link EXTDebugReport#VK_ERROR_VALIDATION_FAILED_EXT ERROR_VALIDATION_FAILED_EXT}.
*
* Valid Usage
*
*
* - {@code object} must be a Vulkan object or {@link VK10#VK_NULL_HANDLE NULL_HANDLE}.
* - If {@code objectType} is not {@link EXTDebugReport#VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT} and {@code object} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code object} must be a Vulkan object of the corresponding type associated with {@code objectType} as defined in the “{@code VkDebugReportObjectTypeEXT} and Vulkan Handle Relationship” table.
*
*
* See Also
*
* {@link VkDebugReportCallbackCreateInfoEXT}
*/
@FunctionalInterface
@NativeType("PFN_vkDebugReportCallbackEXT")
public interface VkDebugReportCallbackEXTI extends CallbackI.I {
String SIGNATURE = Callback.__stdcall("(iilpippp)i");
@Override
default String getSignature() { return SIGNATURE; }
@Override
default int callback(long args) {
return invoke(
dcbArgInt(args),
dcbArgInt(args),
dcbArgLongLong(args),
dcbArgPointer(args),
dcbArgInt(args),
dcbArgPointer(args),
dcbArgPointer(args),
dcbArgPointer(args)
);
}
/**
* Application-defined debug report callback function.
*
* @param flags indicates the {@code VkDebugReportFlagBitsEXT} that triggered this callback.
* @param objectType a {@code VkDebugReportObjectTypeEXT} value specifying the type of object being used or created at the time the event was triggered.
* @param object the object where the issue was detected. If {@code objectType} is {@link EXTDebugReport#VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT}, {@code object} is undefined.
* @param location a component (layer, driver, loader) defined value that indicates the location of the trigger. This is an optional value.
* @param messageCode a layer-defined value indicating what test triggered this callback.
* @param pLayerPrefix a null-terminated string that is an abbreviation of the name of the component making the callback. {@code pLayerPrefix} is only valid for the duration of the callback.
* @param pMessage a null-terminated string detailing the trigger conditions. {@code pMessage} is only valid for the duration of the callback.
* @param pUserData the user data given when the {@code VkDebugReportCallbackEXT} was created.
*/
@NativeType("VkBool32") int invoke(@NativeType("VkDebugReportFlagsEXT") int flags, @NativeType("VkDebugReportObjectTypeEXT") int objectType, @NativeType("uint64_t") long object, @NativeType("size_t") long location, @NativeType("int32_t") int messageCode, @NativeType("const char *") long pLayerPrefix, @NativeType("const char *") long pMessage, @NativeType("void *") long pUserData);
}