org.lwjgl.vulkan.EXTDebugReport 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 javax.annotation.*;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Due to the nature of the Vulkan interface, there is very little error information available to the developer and application. By enabling optional validation layers and using the {@code VK_EXT_debug_report} extension, developers can obtain much more detailed feedback on the application’s use of Vulkan. This extension defines a way for layers and the implementation to call back to the application for events of interest to the application.
*
* Examples
*
* {@code VK_EXT_debug_report} allows an application to register multiple callbacks with the validation layers. Some callbacks may log the information to a file, others may cause a debug break point or other application defined behavior. An application can register callbacks even when no validation layers are enabled, but they will only be called for loader and, if implemented, driver events.
*
* To capture events that occur while creating or destroying an instance an application can link a {@link VkDebugReportCallbackCreateInfoEXT} structure to the {@code pNext} element of the {@link VkInstanceCreateInfo} structure given to {@link VK10#vkCreateInstance CreateInstance}.
*
* Example uses: Create three callback objects. One will log errors and warnings to the debug console using Windows {@code OutputDebugString}. The second will cause the debugger to break at that callback when an error happens and the third will log warnings to stdout.
*
*
* VkResult res;
* VkDebugReportCallbackEXT cb1, cb2, cb3;
*
* VkDebugReportCallbackCreateInfoEXT callback1 = {
* VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, // sType
* NULL, // pNext
* VK_DEBUG_REPORT_ERROR_BIT_EXT | // flags
* VK_DEBUG_REPORT_WARNING_BIT_EXT,
* myOutputDebugString, // pfnCallback
* NULL // pUserData
* };
* res = vkCreateDebugReportCallbackEXT(instance, &callback1, &cb1);
* if (res != VK_SUCCESS)
* // Do error handling for VK_ERROR_OUT_OF_MEMORY
*
* callback.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT;
* callback.pfnCallback = myDebugBreak;
* callback.pUserData = NULL;
* res = vkCreateDebugReportCallbackEXT(instance, &callback, &cb2);
* if (res != VK_SUCCESS)
* // Do error handling for VK_ERROR_OUT_OF_MEMORY
*
* VkDebugReportCallbackCreateInfoEXT callback3 = {
* VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, // sType
* NULL, // pNext
* VK_DEBUG_REPORT_WARNING_BIT_EXT, // flags
* mystdOutLogger, // pfnCallback
* NULL // pUserData
* };
* res = vkCreateDebugReportCallbackEXT(instance, &callback3, &cb3);
* if (res != VK_SUCCESS)
* // Do error handling for VK_ERROR_OUT_OF_MEMORY
*
* ...
*
* // remove callbacks when cleaning up
* vkDestroyDebugReportCallbackEXT(instance, cb1);
* vkDestroyDebugReportCallbackEXT(instance, cb2);
* vkDestroyDebugReportCallbackEXT(instance, cb3);
*
* VK_EXT_debug_report
*
*
* - Name String
* - {@code VK_EXT_debug_report}
* - Extension Type
* - Instance extension
* - Registered Extension Number
* - 12
* - Revision
* - 10
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
*
* - Deprecation state
*
* - Deprecated by {@link EXTDebugUtils VK_EXT_debug_utils} extension
*
* - Special Use
*
* - Debugging tools
*
* - Contact
*
* - Courtney Goeltzenleuchter courtney-g
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2020-12-14
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Courtney Goeltzenleuchter, LunarG
* - Dan Ginsburg, Valve
* - Jon Ashburn, LunarG
* - Mark Lobodzinski, LunarG
*
*
*/
public class EXTDebugReport {
/** The extension specification version. */
public static final int VK_EXT_DEBUG_REPORT_SPEC_VERSION = 10;
/** The extension name. */
public static final String VK_EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT}
*
*/
public static final int
VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = 1000011000;
/** Extends {@code VkResult}. */
public static final int VK_ERROR_VALIDATION_FAILED_EXT = -1000011001;
/** Extends {@code VkObjectType}. */
public static final int VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000;
/**
* Extends {@code VkDebugReportObjectTypeEXT}.
*
* Enum values:
*
*
* - {@link #VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT}
* - {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT}
*
*/
public static final int
VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000;
/**
* VkDebugReportFlagBitsEXT - Bitmask specifying events which cause a debug report callback
*
* Description
*
*
* - {@link #VK_DEBUG_REPORT_ERROR_BIT_EXT DEBUG_REPORT_ERROR_BIT_EXT} specifies that the application has violated a valid usage condition of the specification.
* - {@link #VK_DEBUG_REPORT_WARNING_BIT_EXT DEBUG_REPORT_WARNING_BIT_EXT} specifies use of Vulkan that may expose an app bug. Such cases may not be immediately harmful, such as a fragment shader outputting to a location with no attachment. Other cases may point to behavior that is almost certainly bad when unintended such as using an image whose memory has not been filled. In general if you see a warning but you know that the behavior is intended/desired, then simply ignore the warning.
* - {@link #VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT} specifies a potentially non-optimal use of Vulkan, e.g. using {@link VK10#vkCmdClearColorImage CmdClearColorImage} when setting {@link VkAttachmentDescription}{@code ::loadOp} to {@link VK10#VK_ATTACHMENT_LOAD_OP_CLEAR ATTACHMENT_LOAD_OP_CLEAR} would have worked.
* - {@link #VK_DEBUG_REPORT_INFORMATION_BIT_EXT DEBUG_REPORT_INFORMATION_BIT_EXT} specifies an informational message such as resource details that may be handy when debugging an application.
* - {@link #VK_DEBUG_REPORT_DEBUG_BIT_EXT DEBUG_REPORT_DEBUG_BIT_EXT} specifies diagnostic information from the implementation and layers.
*
*/
public static final int
VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x1,
VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x2,
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x4,
VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x8,
VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x10;
/**
* VkDebugReportObjectTypeEXT - Specify the type of an object handle
*
* Description
*
* {@code VkDebugReportObjectTypeEXT} and Vulkan Handle Relationship
*
*
* {@code VkDebugReportObjectTypeEXT} Vulkan Handle Type
*
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT} Unknown/Undefined Handle
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT} {@code VkInstance}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT} {@code VkPhysicalDevice}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT} {@code VkDevice}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT} {@code VkQueue}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT} {@code VkSemaphore}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT} {@code VkCommandBuffer}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT} {@code VkFence}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT} {@code VkDeviceMemory}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT} {@code VkBuffer}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT} {@code VkImage}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT} {@code VkEvent}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT} {@code VkQueryPool}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT} {@code VkBufferView}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT} {@code VkImageView}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT} {@code VkShaderModule}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT} {@code VkPipelineCache}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT} {@code VkPipelineLayout}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT} {@code VkRenderPass}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT} {@code VkPipeline}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT} {@code VkDescriptorSetLayout}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT} {@code VkSampler}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT} {@code VkDescriptorPool}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT} {@code VkDescriptorSet}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT} {@code VkFramebuffer}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT} {@code VkCommandPool}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT} {@code VkSurfaceKHR}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT} {@code VkSwapchainKHR}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT} {@code VkDebugReportCallbackEXT}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT} {@code VkDisplayKHR}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT} {@code VkDisplayModeKHR}
* {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT} {@code VkDescriptorUpdateTemplate}
*
*
*
* Note
*
* The primary expected use of {@link #VK_ERROR_VALIDATION_FAILED_EXT ERROR_VALIDATION_FAILED_EXT} is for validation layer testing. It is not expected that an application would see this error code during normal use of the validation layers.
*
*
* See Also
*
* {@link VkDebugMarkerObjectNameInfoEXT}, {@link VkDebugMarkerObjectTagInfoEXT}, {@link #vkDebugReportMessageEXT DebugReportMessageEXT}
*
* Enum values:
*
*
* - {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT}
* - {@link #VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT}
* - {@link #VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT}
*
*/
public static final int
VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28,
VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33,
VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33;
protected EXTDebugReport() {
throw new UnsupportedOperationException();
}
// --- [ vkCreateDebugReportCallbackEXT ] ---
/** Unsafe version of: {@link #vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT} */
public static int nvkCreateDebugReportCallbackEXT(VkInstance instance, long pCreateInfo, long pAllocator, long pCallback) {
long __functionAddress = instance.getCapabilities().vkCreateDebugReportCallbackEXT;
if (CHECKS) {
check(__functionAddress);
VkDebugReportCallbackCreateInfoEXT.validate(pCreateInfo);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPPPPI(instance.address(), pCreateInfo, pAllocator, pCallback, __functionAddress);
}
/**
* Create a debug report callback object.
*
* C Specification
*
* Debug report callbacks give more detailed feedback on the application’s use of Vulkan when events of interest occur.
*
* To register a debug report callback, an application uses {@link #vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT}.
*
*
* VkResult vkCreateDebugReportCallbackEXT(
* VkInstance instance,
* const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
* const VkAllocationCallbacks* pAllocator,
* VkDebugReportCallbackEXT* pCallback);
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code VkInstance} handle
* - {@code pCreateInfo} must be a valid pointer to a valid {@link VkDebugReportCallbackCreateInfoEXT} structure
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - {@code pCallback} must be a valid pointer to a {@code VkDebugReportCallbackEXT} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkDebugReportCallbackCreateInfoEXT}
*
* @param instance the instance the callback will be logged on.
* @param pCreateInfo a pointer to a {@link VkDebugReportCallbackCreateInfoEXT} structure defining the conditions under which this callback will be called.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
* @param pCallback a pointer to a {@code VkDebugReportCallbackEXT} handle in which the created object is returned.
*/
@NativeType("VkResult")
public static int vkCreateDebugReportCallbackEXT(VkInstance instance, @NativeType("VkDebugReportCallbackCreateInfoEXT const *") VkDebugReportCallbackCreateInfoEXT pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDebugReportCallbackEXT *") LongBuffer pCallback) {
if (CHECKS) {
check(pCallback, 1);
}
return nvkCreateDebugReportCallbackEXT(instance, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pCallback));
}
// --- [ vkDestroyDebugReportCallbackEXT ] ---
/** Unsafe version of: {@link #vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT} */
public static void nvkDestroyDebugReportCallbackEXT(VkInstance instance, long callback, long pAllocator) {
long __functionAddress = instance.getCapabilities().vkDestroyDebugReportCallbackEXT;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
callPJPV(instance.address(), callback, pAllocator, __functionAddress);
}
/**
* Destroy a debug report callback object.
*
* C Specification
*
* To destroy a {@code VkDebugReportCallbackEXT} object, call:
*
*
* void vkDestroyDebugReportCallbackEXT(
* VkInstance instance,
* VkDebugReportCallbackEXT callback,
* const VkAllocationCallbacks* pAllocator);
*
* Valid Usage
*
*
* - If {@link VkAllocationCallbacks} were provided when {@code callback} was created, a compatible set of callbacks must be provided here
* - If no {@link VkAllocationCallbacks} were provided when {@code callback} was created, {@code pAllocator} must be {@code NULL}
*
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code VkInstance} handle
* - If {@code callback} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code callback} must be a valid {@code VkDebugReportCallbackEXT} handle
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - If {@code callback} is a valid handle, it must have been created, allocated, or retrieved from {@code instance}
*
*
* Host Synchronization
*
*
* - Host access to {@code callback} must be externally synchronized
*
*
* See Also
*
* {@link VkAllocationCallbacks}
*
* @param instance the instance where the callback was created.
* @param callback the {@code VkDebugReportCallbackEXT} object to destroy. {@code callback} is an externally synchronized object and must not be used on more than one thread at a time. This means that {@code vkDestroyDebugReportCallbackEXT} must not be called when a callback is active.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
*/
public static void vkDestroyDebugReportCallbackEXT(VkInstance instance, @NativeType("VkDebugReportCallbackEXT") long callback, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) {
nvkDestroyDebugReportCallbackEXT(instance, callback, memAddressSafe(pAllocator));
}
// --- [ vkDebugReportMessageEXT ] ---
/** Unsafe version of: {@link #vkDebugReportMessageEXT DebugReportMessageEXT} */
public static void nvkDebugReportMessageEXT(VkInstance instance, int flags, int objectType, long object, long location, int messageCode, long pLayerPrefix, long pMessage) {
long __functionAddress = instance.getCapabilities().vkDebugReportMessageEXT;
if (CHECKS) {
check(__functionAddress);
}
callPJPPPV(instance.address(), flags, objectType, object, location, messageCode, pLayerPrefix, pMessage, __functionAddress);
}
/**
* Inject a message into a debug stream.
*
* C Specification
*
* To inject its own messages into the debug stream, call:
*
*
* void vkDebugReportMessageEXT(
* VkInstance instance,
* VkDebugReportFlagsEXT flags,
* VkDebugReportObjectTypeEXT objectType,
* uint64_t object,
* size_t location,
* int32_t messageCode,
* const char* pLayerPrefix,
* const char* pMessage);
*
* Description
*
* The call will propagate through the layers and generate callback(s) as indicated by the message’s flags. The parameters are passed on to the callback in addition to the {@code pUserData} value that was defined at the time the callback was registered.
*
* Valid Usage
*
*
* - {@code object} must be a Vulkan object or {@link VK10#VK_NULL_HANDLE NULL_HANDLE}
* - If {@code objectType} is not {@link #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 {@code VkDebugReportObjectTypeEXT} and Vulkan Handle Relationship
*
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code VkInstance} handle
* - {@code flags} must be a valid combination of {@code VkDebugReportFlagBitsEXT} values
* - {@code flags} must not be 0
* - {@code objectType} must be a valid {@code VkDebugReportObjectTypeEXT} value
* - {@code pLayerPrefix} must be a null-terminated UTF-8 string
* - {@code pMessage} must be a null-terminated UTF-8 string
*
*
* @param instance the debug stream’s {@code VkInstance}.
* @param flags specifies the {@code VkDebugReportFlagBitsEXT} classification of this event/message.
* @param objectType a {@code VkDebugReportObjectTypeEXT} 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. {@code object} can be {@link VK10#VK_NULL_HANDLE NULL_HANDLE} if there is no object associated with the event.
* @param location an application defined value.
* @param messageCode an application defined value.
* @param pLayerPrefix the abbreviation of the component making this event/message.
* @param pMessage a null-terminated string detailing the trigger conditions.
*/
public static void vkDebugReportMessageEXT(VkInstance instance, @NativeType("VkDebugReportFlagsEXT") int flags, @NativeType("VkDebugReportObjectTypeEXT") int objectType, @NativeType("uint64_t") long object, @NativeType("size_t") long location, @NativeType("int32_t") int messageCode, @NativeType("char const *") ByteBuffer pLayerPrefix, @NativeType("char const *") ByteBuffer pMessage) {
if (CHECKS) {
checkNT1(pLayerPrefix);
checkNT1(pMessage);
}
nvkDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, memAddress(pLayerPrefix), memAddress(pMessage));
}
/**
* Inject a message into a debug stream.
*
* C Specification
*
* To inject its own messages into the debug stream, call:
*
*
* void vkDebugReportMessageEXT(
* VkInstance instance,
* VkDebugReportFlagsEXT flags,
* VkDebugReportObjectTypeEXT objectType,
* uint64_t object,
* size_t location,
* int32_t messageCode,
* const char* pLayerPrefix,
* const char* pMessage);
*
* Description
*
* The call will propagate through the layers and generate callback(s) as indicated by the message’s flags. The parameters are passed on to the callback in addition to the {@code pUserData} value that was defined at the time the callback was registered.
*
* Valid Usage
*
*
* - {@code object} must be a Vulkan object or {@link VK10#VK_NULL_HANDLE NULL_HANDLE}
* - If {@code objectType} is not {@link #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 {@code VkDebugReportObjectTypeEXT} and Vulkan Handle Relationship
*
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code VkInstance} handle
* - {@code flags} must be a valid combination of {@code VkDebugReportFlagBitsEXT} values
* - {@code flags} must not be 0
* - {@code objectType} must be a valid {@code VkDebugReportObjectTypeEXT} value
* - {@code pLayerPrefix} must be a null-terminated UTF-8 string
* - {@code pMessage} must be a null-terminated UTF-8 string
*
*
* @param instance the debug stream’s {@code VkInstance}.
* @param flags specifies the {@code VkDebugReportFlagBitsEXT} classification of this event/message.
* @param objectType a {@code VkDebugReportObjectTypeEXT} 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. {@code object} can be {@link VK10#VK_NULL_HANDLE NULL_HANDLE} if there is no object associated with the event.
* @param location an application defined value.
* @param messageCode an application defined value.
* @param pLayerPrefix the abbreviation of the component making this event/message.
* @param pMessage a null-terminated string detailing the trigger conditions.
*/
public static void vkDebugReportMessageEXT(VkInstance instance, @NativeType("VkDebugReportFlagsEXT") int flags, @NativeType("VkDebugReportObjectTypeEXT") int objectType, @NativeType("uint64_t") long object, @NativeType("size_t") long location, @NativeType("int32_t") int messageCode, @NativeType("char const *") CharSequence pLayerPrefix, @NativeType("char const *") CharSequence pMessage) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8(pLayerPrefix, true);
long pLayerPrefixEncoded = stack.getPointerAddress();
stack.nUTF8(pMessage, true);
long pMessageEncoded = stack.getPointerAddress();
nvkDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefixEncoded, pMessageEncoded);
} finally {
stack.setPointer(stackPointer);
}
}
/** Array version of: {@link #vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT} */
@NativeType("VkResult")
public static int vkCreateDebugReportCallbackEXT(VkInstance instance, @NativeType("VkDebugReportCallbackCreateInfoEXT const *") VkDebugReportCallbackCreateInfoEXT pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkDebugReportCallbackEXT *") long[] pCallback) {
long __functionAddress = instance.getCapabilities().vkCreateDebugReportCallbackEXT;
if (CHECKS) {
check(__functionAddress);
check(pCallback, 1);
VkDebugReportCallbackCreateInfoEXT.validate(pCreateInfo.address());
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPPPPI(instance.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pCallback, __functionAddress);
}
}