org.lwjgl.vulkan.EXTDebugMarker 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 static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
/** The {@code VK_EXT_debug_marker} extension is a device extension. It introduces concepts of object naming and tagging, for better tracking of Vulkan objects, as well as additional commands for recording annotations of named sections of a workload to aid organisation and offline analysis in external tools. */
public class EXTDebugMarker {
/** The extension specification version. */
public static final int VK_EXT_DEBUG_MARKER_SPEC_VERSION = 3;
/** The extension name. */
public static final String VK_EXT_DEBUG_MARKER_EXTENSION_NAME = "VK_EXT_debug_marker";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT}
*
*/
public static final int
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002;
protected EXTDebugMarker() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(VKCapabilities caps) {
return checkFunctions(
caps.vkDebugMarkerSetObjectTagEXT, caps.vkDebugMarkerSetObjectNameEXT, caps.vkCmdDebugMarkerBeginEXT, caps.vkCmdDebugMarkerEndEXT,
caps.vkCmdDebugMarkerInsertEXT
);
}
// --- [ vkDebugMarkerSetObjectTagEXT ] ---
/** Unsafe version of: {@link #vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT} */
public static int nvkDebugMarkerSetObjectTagEXT(VkDevice device, long pTagInfo) {
long __functionAddress = device.getCapabilities().vkDebugMarkerSetObjectTagEXT;
if ( CHECKS ) {
check(__functionAddress);
VkDebugMarkerObjectTagInfoEXT.validate(pTagInfo);
}
return callPPI(__functionAddress, device.address(), pTagInfo);
}
/**
* Attach arbitrary data to an object.
*
* C Specification
*
* In addition to setting a name for an object, debugging and validation layers may have uses for additional binary data on a per-object basis that has no other place in the Vulkan API. For example, a {@code VkShaderModule} could have additional debugging data attached to it to aid in offline shader tracing. To attach data to an object, call:
*
* VkResult vkDebugMarkerSetObjectTagEXT(
VkDevice device,
VkDebugMarkerObjectTagInfoEXT* pTagInfo);
*
* Valid Usage
*
*
* - {@code pTagInfo.object} must be a Vulkan object
* - {@code pTagInfo.tagName} must not be 0
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pTagInfo} must be a pointer to a {@link VkDebugMarkerObjectTagInfoEXT} structure
*
*
* Host Synchronization
*
*
* - Host access to {@code pTagInfo.object} must be externally synchronized
*
*
* 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}
* - {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
*
*
*
* See Also
*
* {@link VkDebugMarkerObjectTagInfoEXT}
*
* @param device the device that created the object.
* @param pTagInfo a pointer to an instance of the {@link VkDebugMarkerObjectTagInfoEXT} structure specifying the parameters of the tag to attach to the object.
*/
public static int vkDebugMarkerSetObjectTagEXT(VkDevice device, VkDebugMarkerObjectTagInfoEXT pTagInfo) {
return nvkDebugMarkerSetObjectTagEXT(device, pTagInfo.address());
}
// --- [ vkDebugMarkerSetObjectNameEXT ] ---
/** Unsafe version of: {@link #vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT} */
public static int nvkDebugMarkerSetObjectNameEXT(VkDevice device, long pNameInfo) {
long __functionAddress = device.getCapabilities().vkDebugMarkerSetObjectNameEXT;
if ( CHECKS ) {
check(__functionAddress);
VkDebugMarkerObjectNameInfoEXT.validate(pNameInfo);
}
return callPPI(__functionAddress, device.address(), pNameInfo);
}
/**
* Give a user-friendly name to an object.
*
* C Specification
*
* An object can be given a user-friendly name by calling:
*
* VkResult vkDebugMarkerSetObjectNameEXT(
VkDevice device,
VkDebugMarkerObjectNameInfoEXT* pNameInfo);
*
* Valid Usage
*
*
* - {@code pNameInfo.object} must be a Vulkan object
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pNameInfo} must be a pointer to a {@link VkDebugMarkerObjectNameInfoEXT} structure
*
*
* Host Synchronization
*
*
* - Host access to {@code pNameInfo.object} must be externally synchronized
*
*
* 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}
* - {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
*
*
*
* See Also
*
* {@link VkDebugMarkerObjectNameInfoEXT}
*
* @param device the device that created the object.
* @param pNameInfo a pointer to an instance of the {@link VkDebugMarkerObjectNameInfoEXT} structure specifying the parameters of the name to set on the object.
*/
public static int vkDebugMarkerSetObjectNameEXT(VkDevice device, VkDebugMarkerObjectNameInfoEXT pNameInfo) {
return nvkDebugMarkerSetObjectNameEXT(device, pNameInfo.address());
}
// --- [ vkCmdDebugMarkerBeginEXT ] ---
/** Unsafe version of: {@link #vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT} */
public static void nvkCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, long pMarkerInfo) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdDebugMarkerBeginEXT;
if ( CHECKS ) {
check(__functionAddress);
VkDebugMarkerMarkerInfoEXT.validate(pMarkerInfo);
}
callPPV(__functionAddress, commandBuffer.address(), pMarkerInfo);
}
/**
* Open a command buffer marker region.
*
* C Specification
*
* A marker region can be opened by calling:
*
* void vkCmdDebugMarkerBeginEXT(
VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code pMarkerInfo} must be a pointer to a {@link VkDebugMarkerMarkerInfoEXT} structure
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
*
*
* Host Synchronization
*
*
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type
* Primary Secondary Both Graphics compute
*
*
* See Also
*
* {@link VkDebugMarkerMarkerInfoEXT}
*
* @param commandBuffer the command buffer into which the command is recorded.
* @param pMarkerInfo a pointer to an instance of the {@link VkDebugMarkerMarkerInfoEXT} structure specifying the parameters of the marker region to open.
*/
public static void vkCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT pMarkerInfo) {
nvkCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo.address());
}
// --- [ vkCmdDebugMarkerEndEXT ] ---
/**
* Close a command buffer marker region.
*
* C Specification
*
* A marker region can be closed by calling:
*
* void vkCmdDebugMarkerEndEXT(
VkCommandBuffer commandBuffer);
*
* Description
*
* An application may open a marker region in one command buffer and close it in another, or otherwise split marker regions across multiple command buffers or multiple queue submissions. When viewed from the linear series of submissions to a single queue, the calls to {@link #vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT} and {@link #vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT} must be matched and balanced.
*
* Any calls to {@link #vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT} within a secondary command buffer must have a matching {@link #vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT} in that same command buffer, and marker regions begun outside of the secondary command buffer must not be ended inside it.
*
* Valid Usage
*
*
* - There must be an outstanding {@link #vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT} command prior to the {@link #vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT} on the queue that {@code commandBuffer} is submitted to
* - If the matching {@link #vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT} command was in a secondary command buffer, the {@link #vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT} must be in the same {@code commandBuffer}
*
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
*
*
* Host Synchronization
*
*
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type
* Primary Secondary Both Graphics compute
*
*
* @param commandBuffer the command buffer into which the command is recorded.
*/
public static void vkCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdDebugMarkerEndEXT;
if ( CHECKS )
check(__functionAddress);
callPV(__functionAddress, commandBuffer.address());
}
// --- [ vkCmdDebugMarkerInsertEXT ] ---
/** Unsafe version of: {@link #vkCmdDebugMarkerInsertEXT CmdDebugMarkerInsertEXT} */
public static void nvkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, long pMarkerInfo) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdDebugMarkerInsertEXT;
if ( CHECKS ) {
check(__functionAddress);
VkDebugMarkerMarkerInfoEXT.validate(pMarkerInfo);
}
callPPV(__functionAddress, commandBuffer.address(), pMarkerInfo);
}
/**
* Insert a marker label into a command buffer.
*
* C Specification
*
* A single marker label can be inserted into a command buffer by calling:
*
* void vkCmdDebugMarkerInsertEXT(
VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code pMarkerInfo} must be a pointer to a {@link VkDebugMarkerMarkerInfoEXT} structure
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics, or compute operations
*
*
* Host Synchronization
*
*
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type
* Primary Secondary Both Graphics compute
*
*
* See Also
*
* {@link VkDebugMarkerMarkerInfoEXT}
*
* @param commandBuffer the command buffer into which the command is recorded.
* @param pMarkerInfo a pointer to an instance of the {@link VkDebugMarkerMarkerInfoEXT} structure specifying the parameters of the marker to insert.
*/
public static void vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT pMarkerInfo) {
nvkCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo.address());
}
}