All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.EXTDebugReport Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * 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}. This callback is only valid for the duration of the {@link VK10#vkCreateInstance CreateInstance} and the {@link VK10#vkDestroyInstance DestroyInstance} call. Use {@link #vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT} to create persistent callback objects.

* *

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);
* *
Note
* *

In the initial release of the {@code VK_EXT_debug_report} extension, the token {@link #VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT} was used. Starting in version 2 of the extension branch, {@link #VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT} is used instead for consistency with Vulkan naming rules. The older enum is still available for backwards compatibility.

*
* *
Note
* *

In the initial release of the {@code VK_EXT_debug_report} extension, the token {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT} was used. Starting in version 8 of the extension branch, {@link #VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT} is used instead for consistency with Vulkan naming rules. The older enum is still available for backwards compatibility.

*
* *
*
Name String
*
{@code VK_EXT_debug_report}
*
Extension Type
*
Instance extension
*
Registered Extension Number
*
12
*
Revision
*
9
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
*
Contact
*
    *
  • Courtney Goeltzenleuchter @courtney
  • *
*
Last Modified Date
*
2017-04-27
*
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 = 9; /** The extension name. */ public static final String VK_EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"; /** Extends {@code VkStructureType}. */ public static final int VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_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; /** * VkDebugReportObjectTypeEXT - Specify the type of an object handle * *
Description
* *
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_OBJECT_TABLE_NVX_EXT DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT}{@code VkObjectTableNVX}
{@link #VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT}{@code VkIndirectCommandsLayoutNVX}
{@link KHRDescriptorUpdateTemplate#VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT}{@code VkDescriptorUpdateTemplateKHR}
* *
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_VALIDATION_CACHE_EXT_EXT DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_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_DISPLAY_KHR_EXT = 29, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33; /** * 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 an error that may cause undefined results, including an application crash.
  • *
  • {@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.
  • *
* *
See Also
* *

{@code VkDebugReportFlagsEXT}

*/ 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; protected EXTDebugReport() { throw new UnsupportedOperationException(); } static boolean isAvailable(VKCapabilitiesInstance caps) { return checkFunctions( caps.vkCreateDebugReportCallbackEXT, caps.vkDestroyDebugReportCallbackEXT, caps.vkDebugReportMessageEXT ); } // --- [ 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(__functionAddress, instance.address(), pCreateInfo, pAllocator, pCallback); } /** * 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 points to a {@link VkDebugReportCallbackCreateInfoEXT} structure which defines 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 record the {@code VkDebugReportCallbackEXT} object created. */ @NativeType("VkResult") public static int vkCreateDebugReportCallbackEXT(VkInstance instance, @NativeType("const VkDebugReportCallbackCreateInfoEXT *") VkDebugReportCallbackCreateInfoEXT pCreateInfo, @Nullable @NativeType("const VkAllocationCallbacks *") 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(__functionAddress, instance.address(), callback, pAllocator); } /** * 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
  • *
  • {@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
  • *
  • {@code callback} 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 {@link #vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT} 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("const VkAllocationCallbacks *") 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(__functionAddress, instance.address(), flags, objectType, object, location, messageCode, pLayerPrefix, 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 the “{@code VkDebugReportObjectTypeEXT} and Vulkan Handle Relationship” table.
  • *
* *
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 indicates 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 this is 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("const char *") ByteBuffer pLayerPrefix, @NativeType("const char *") 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 the “{@code VkDebugReportObjectTypeEXT} and Vulkan Handle Relationship” table.
  • *
* *
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 indicates 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 this is 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("const char *") CharSequence pLayerPrefix, @NativeType("const char *") CharSequence pMessage) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { ByteBuffer pLayerPrefixEncoded = stack.UTF8(pLayerPrefix); ByteBuffer pMessageEncoded = stack.UTF8(pMessage); nvkDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, memAddress(pLayerPrefixEncoded), memAddress(pMessageEncoded)); } finally { stack.setPointer(stackPointer); } } /** Array version of: {@link #vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT} */ @NativeType("VkResult") public static int vkCreateDebugReportCallbackEXT(VkInstance instance, @NativeType("const VkDebugReportCallbackCreateInfoEXT *") VkDebugReportCallbackCreateInfoEXT pCreateInfo, @Nullable @NativeType("const VkAllocationCallbacks *") 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(__functionAddress, instance.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pCallback); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy