org.lwjgl.vulkan.EXTToolingInfo 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.MemoryUtil.*;
/**
* When an error occurs during application development, a common question is "What tools are actually running right now?" This extension adds the ability to query that information directly from the Vulkan implementation.
*
* Outdated versions of one tool might not play nicely with another, or perhaps a tool is not actually running when it should have been. Trying to figure that out can cause headaches as it is necessary to consult each known tool to figure out what is going on — in some cases the tool might not even be known.
*
* Typically, the expectation is that developers will simply print out this information for visual inspection when an issue occurs, however a small amount of semantic information about what the tool is doing is provided to help identify it programmatically. For example, if the advertised limits or features of an implementation are unexpected, is there a tool active which modifies these limits? Or if an application is providing debug markers, but the implementation is not actually doing anything with that information, this can quickly point that out.
*
* Examples
*
*
* uint32_t num_tools;
* VkPhysicalDeviceToolPropertiesEXT *pToolProperties;
* vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, NULL);
*
* pToolProperties = (VkPhysicalDeviceToolPropertiesEXT*)malloc(sizeof(VkPhysicalDeviceToolPropertiesEXT) * num_tools);
*
* vkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, &num_tools, pToolProperties);
*
* for (int i = 0; i < num_tools; ++i) {
* printf("%s:\n", pToolProperties[i].name);
* printf("Version:\n");
* printf("%s:\n", pToolProperties[i].version);
* printf("Description:\n");
* printf("\t%s\n", pToolProperties[i].description);
* printf("Purposes:\n");
* printf("\t%s\n", VkToolPurposeFlagBitsEXT_to_string(pToolProperties[i].purposes));
* if (strnlen_s(pToolProperties[i].layer,VK_MAX_EXTENSION_NAME_SIZE) > 0) {
* printf("Corresponding Layer:\n");
* printf("\t%s\n", pToolProperties[i].layer);
* }
* }
*
* VK_EXT_tooling_info
*
*
* - Name String
* - {@code VK_EXT_tooling_info}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 246
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
*
* - Contact
*
* - Tobias Hector tobski
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2018-11-05
* - Contributors
*
* - Rolando Caloca
* - Matthaeus Chajdas
* - Baldur Karlsson
* - Daniel Rakos
*
*
*/
public class EXTToolingInfo {
/** The extension specification version. */
public static final int VK_EXT_TOOLING_INFO_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info";
/** Extends {@code VkStructureType}. */
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000;
/**
* Extends {@code VkToolPurposeFlagBitsEXT}.
*
* Enum values:
*
*
* - {@link #VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT}
* - {@link #VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT}
*
*/
public static final int
VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT = 0x20,
VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT = 0x40;
/**
* VkToolPurposeFlagBitsEXT - Bitmask specifying the purposes of an active tool
*
* Description
*
*
* - {@link #VK_TOOL_PURPOSE_VALIDATION_BIT_EXT TOOL_PURPOSE_VALIDATION_BIT_EXT} specifies that the tool provides validation of API usage.
* - {@link #VK_TOOL_PURPOSE_PROFILING_BIT_EXT TOOL_PURPOSE_PROFILING_BIT_EXT} specifies that the tool provides profiling of API usage.
* - {@link #VK_TOOL_PURPOSE_TRACING_BIT_EXT TOOL_PURPOSE_TRACING_BIT_EXT} specifies that the tool is capturing data about the application’s API usage, including anything from simple logging to capturing data for later replay.
* - {@link #VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT} specifies that the tool provides additional API features/extensions on top of the underlying implementation.
* - {@link #VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT} specifies that the tool modifies the API features/limits/extensions presented to the application.
* - {@link #VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT} specifies that the tool reports additional information to the application via callbacks specified by {@link EXTDebugReport#vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT} or {@link EXTDebugUtils#vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT}
* - {@link #VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT} specifies that the tool consumes debug markers or object debug annotation, queue labels, or command buffer labels
*
*/
public static final int
VK_TOOL_PURPOSE_VALIDATION_BIT_EXT = 0x1,
VK_TOOL_PURPOSE_PROFILING_BIT_EXT = 0x2,
VK_TOOL_PURPOSE_TRACING_BIT_EXT = 0x4,
VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT = 0x8,
VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT = 0x10;
protected EXTToolingInfo() {
throw new UnsupportedOperationException();
}
// --- [ vkGetPhysicalDeviceToolPropertiesEXT ] ---
/**
* Unsafe version of: {@link #vkGetPhysicalDeviceToolPropertiesEXT GetPhysicalDeviceToolPropertiesEXT}
*
* @param pToolCount a pointer to an integer describing the number of tools active on {@code physicalDevice}.
*/
public static int nvkGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, long pToolCount, long pToolProperties) {
long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceToolPropertiesEXT;
if (CHECKS) {
check(__functionAddress);
}
return callPPPI(physicalDevice.address(), pToolCount, pToolProperties, __functionAddress);
}
/**
* Reports properties of tools active on the specified physical device.
*
* C Specification
*
* Information about tools providing debugging, profiling, or similar services, active for a given physical device, can be obtained by calling:
*
*
* VkResult vkGetPhysicalDeviceToolPropertiesEXT(
* VkPhysicalDevice physicalDevice,
* uint32_t* pToolCount,
* VkPhysicalDeviceToolPropertiesEXT* pToolProperties);
*
* Description
*
* If {@code pToolProperties} is {@code NULL}, then the number of tools currently active on {@code physicalDevice} is returned in {@code pToolCount}. Otherwise, {@code pToolCount} must point to a variable set by the user to the number of elements in the {@code pToolProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pToolProperties}. If {@code pToolCount} is less than the number of currently active tools, at most {@code pToolCount} structures will be written.
*
* The count and properties of active tools may change in response to events outside the scope of the specification. An application should assume these properties might change at any given time.
*
* Valid Usage (Implicit)
*
*
* - {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
* - {@code pToolCount} must be a valid pointer to a {@code uint32_t} value
* - If the value referenced by {@code pToolCount} is not 0, and {@code pToolProperties} is not {@code NULL}, {@code pToolProperties} must be a valid pointer to an array of {@code pToolCount} {@link VkPhysicalDeviceToolPropertiesEXT} structures
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
* - {@link VK10#VK_INCOMPLETE INCOMPLETE}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
*
*
*
* See Also
*
* {@link VkPhysicalDeviceToolPropertiesEXT}
*
* @param physicalDevice the handle to the physical device to query for active tools.
* @param pToolCount a pointer to an integer describing the number of tools active on {@code physicalDevice}.
* @param pToolProperties either {@code NULL} or a pointer to an array of {@link VkPhysicalDeviceToolPropertiesEXT} structures.
*/
@NativeType("VkResult")
public static int vkGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") IntBuffer pToolCount, @Nullable @NativeType("VkPhysicalDeviceToolPropertiesEXT *") VkPhysicalDeviceToolPropertiesEXT.Buffer pToolProperties) {
if (CHECKS) {
check(pToolCount, 1);
checkSafe(pToolProperties, pToolCount.get(pToolCount.position()));
}
return nvkGetPhysicalDeviceToolPropertiesEXT(physicalDevice, memAddress(pToolCount), memAddressSafe(pToolProperties));
}
/** Array version of: {@link #vkGetPhysicalDeviceToolPropertiesEXT GetPhysicalDeviceToolPropertiesEXT} */
@NativeType("VkResult")
public static int vkGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") int[] pToolCount, @Nullable @NativeType("VkPhysicalDeviceToolPropertiesEXT *") VkPhysicalDeviceToolPropertiesEXT.Buffer pToolProperties) {
long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceToolPropertiesEXT;
if (CHECKS) {
check(__functionAddress);
check(pToolCount, 1);
checkSafe(pToolProperties, pToolCount[0]);
}
return callPPPI(physicalDevice.address(), pToolCount, memAddressSafe(pToolProperties), __functionAddress);
}
}