mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-02-17 16:57:09 +00:00
* First public update for Vulkan 1.1. Github Issues: * Refer to standard sparse image block shape format tables explicitly in the <<sparsememory-standard-shapes, Standard Sparse Image Block Shapes>> section (public issue 93). * Add the missing definition of the code:LocalInvocationIndex decoration in the <<interfaces-builtin-variables, Built-In Variables>> section (public issue 532). * Clarify dynamic state definition in the introduction to the <<pipelines, Pipelines>> section and the new <<pipelines-dynamic-state, Dynamic State>> subsection (public issue 620). * Clarified deprecation statement in the `VK_AMD_negative_viewport_height` appendix (public issue 674). * Fix parameter descriptions for flink:vkCreateIndirectCommandsLayoutNVX (public issue 677). Internal Issues: * Remove description of <<primsrast-points, rasterization point size>> being taken from the tessellation control shader, since there are no circumstances under which you can have TCS without TES (internal issue 522). * Define <<copies-images-format-size-compatibility, _size-compatible_ image formats>> for flink:vkCmdCopyImage, add it to the glossary, and use that definition for slink:VkImageViewCreateInfo (internal issue 771). * Change brief descriptions of enumerant names, and of parameters which are enumerants, from "`enum *indicates*`" to "`enum *specifies*`" for consistency, and add a markup style guide rule (internal issue 862). * Clarify how execution dependencies interact with <<synchronization-submission-order, submission order>> at numerous places in the <<renderpass, Render Pass>> and <<synchronization, Synchronization>> chapters (internal issue 1062). * Clarify statement in the <<interfaces-resources-setandbinding, DescriptorSet and Binding Assignment>> section that only interface variables statically used by the entry point used in a pipeline must be present in the descriptor set layout (internal issue 1172). * Flip sparse image diagrams with partially full mip levels vertically, to match graph origins of other image diagrams (internal issue 1176). * Update new SVG diagrams to have consistent style and base font size, increase consistency of primitive topology diagrams, and add a section to the style guide on creating and editing images in a consistent style (internal issue 1177). * Resolve problems with valid usage statement extraction by fixing existing VUID tags for interfaces promoted to version 1.1 and fixing conditional directives around VUID-VkMemoryDedicatedAllocateInfo-image-01797 (internal issue 1184). * Strip `KHR` suffixes from a few interfaces promoted to Vulkan 1.1 that were missed previously (internal issue 1185). * Restrict code:OpImageQuerySizeLod and code:OpImageQueryLevels to only work on code:Image operands with their code:Sampled operand set to 1. In other words, these operations are not defined to work with storage images (internal issue 1193). * Recycle extension slot for extension #82 in `vk.xml`. This extension was never published (internal issue 1195). * Add an issue to the `VK_KHR_maintenance1` appendix noting that zero height viewports are allowed when this extension is enabled (internal issue 1202). * Fix slink:VkDescriptorSetLayoutBinding description so that shader stages always use descriptor bindings, not the other way around (internal issue 1206). * Fix field name for slink:VkInputAttachmentAspectReference::pname:inputAttachmentIndex (internal issue 1210). Other Issues: * Fix a few broken links in the <<versions-1.1, Version 1.1>> appendix. * Replace a few old refBegin/refEnd tags with open block markup around interfaces, and remove old KHX VUID tags that were breaking the valid usage statement extraction. * Fix error codes accidentally tagged as success codes in `vk.xml` for flink:vkGetSwapchainCounterEXT. * Added valid usage statements for ftext:vkBind*Memory2 input structures stext:VkBind*MemoryInfo, and fix a pname:image -> pname:buffer typo in a couple of places. * Fix swapped descriptions of elink:VkDescriptorType enums ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE and ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE (reported via tweet). New Extensions: * `VK_ANDROID_external_memory_android_hardware_buffer`
217 lines
7.9 KiB
Plaintext
217 lines
7.9 KiB
Plaintext
include::meta/VK_EXT_debug_report.txt[]
|
|
|
|
*Last Modified Date*::
|
|
2017-09-12
|
|
*IP Status*::
|
|
No known IP claims.
|
|
*Contributors*::
|
|
- Courtney Goeltzenleuchter, LunarG
|
|
- Dan Ginsburg, Valve
|
|
- Jon Ashburn, LunarG
|
|
- Mark Lobodzinski, LunarG
|
|
|
|
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 `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.
|
|
|
|
=== New Object Types
|
|
|
|
* slink:VkDebugReportCallbackEXT
|
|
|
|
=== New Enum Constants
|
|
|
|
* Extending elink:VkStructureType:
|
|
** ename:VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
|
|
* Extending elink:VkResult:
|
|
** ename:VK_ERROR_VALIDATION_FAILED_EXT
|
|
|
|
=== New Enums
|
|
|
|
* elink:VkDebugReportFlagBitsEXT
|
|
* elink:VkDebugReportObjectTypeEXT
|
|
|
|
=== New Structures
|
|
|
|
* slink:VkDebugReportCallbackCreateInfoEXT
|
|
|
|
=== New Functions
|
|
|
|
* flink:vkCreateDebugReportCallbackEXT
|
|
* flink:vkDestroyDebugReportCallbackEXT
|
|
* flink:vkDebugReportMessageEXT
|
|
|
|
=== New Function Pointers
|
|
|
|
* tlink:PFN_vkDebugReportCallbackEXT
|
|
|
|
=== Examples
|
|
|
|
`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 slink:VkDebugReportCallbackCreateInfoEXT structure
|
|
to the pname:pNext element of the slink:VkInstanceCreateInfo structure given
|
|
to flink:vkCreateInstance.
|
|
This callback is only valid for the duration of the flink:vkCreateInstance
|
|
and the flink:vkDestroyInstance call.
|
|
Use flink:vkCreateDebugReportCallbackEXT 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.
|
|
[source,c++]
|
|
------------------------------------------------------------------------------
|
|
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]
|
|
.Note
|
|
====
|
|
In the initial release of the `VK_EXT_debug_report` extension, the token
|
|
ename:VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT was used.
|
|
Starting in version 2 of the extension branch,
|
|
ename:VK_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]
|
|
.Note
|
|
====
|
|
In the initial release of the `VK_EXT_debug_report` extension, the token
|
|
ename:VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT was used.
|
|
Starting in version 8 of the extension branch,
|
|
ename:VK_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.
|
|
====
|
|
|
|
|
|
=== Issues
|
|
|
|
1) What is the hierarchy / seriousness of the message flags? E.g.
|
|
etext:ERROR > etext:WARN > etext:PERF_WARN ...
|
|
|
|
*RESOLVED*: There is no specific hierarchy.
|
|
Each bit is independent and should be checked via bitwise AND.
|
|
For example:
|
|
|
|
[source,c++]
|
|
----------------------------------------
|
|
if (localFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
|
|
process error message
|
|
}
|
|
if (localFlags & VK_DEBUG_REPORT_DEBUG_BIT_EXT) {
|
|
process debug message
|
|
}
|
|
----------------------------------------
|
|
|
|
The validation layers do use them in a hierarchical way (etext:ERROR >
|
|
etext:WARN > etext:PERF, etext:WARN > etext:DEBUG > etext:INFO) and they (at
|
|
least at the time of this writing) only set one bit at a time.
|
|
But it is not a requirement of this extension.
|
|
|
|
It is possible that a layer may intercept and change, or augment the flags
|
|
with extension values the application's debug report handler may not be
|
|
familiar with, so it is important to treat each flag independently.
|
|
|
|
2) Should there be a VU requiring
|
|
slink:VkDebugReportCallbackCreateInfoEXT::pname:flags to be non-zero?
|
|
|
|
*RESOLVED*: It may not be very useful, but we do not need VU statement
|
|
requiring the sname:VkDebugReportCallbackCreateInfoEXT::pname:msgFlags at
|
|
create-time to be non-zero.
|
|
One can imagine that apps may prefer it as it allows them to set the mask as
|
|
desired - including nothing - at runtime without having to check.
|
|
|
|
3) What is the difference between ename:VK_DEBUG_REPORT_DEBUG_BIT_EXT and
|
|
ename:VK_DEBUG_REPORT_INFORMATION_BIT_EXT?
|
|
|
|
*RESOLVED*: ename:VK_DEBUG_REPORT_DEBUG_BIT_EXT specifies information that
|
|
could be useful debugging the Vulkan implementation itself.
|
|
|
|
=== Version History
|
|
|
|
* Revision 1, 2015-05-20 (Courtney Goetzenleuchter)
|
|
- Initial draft, based on LunarG KHR spec, other KHR specs
|
|
|
|
* Revision 2, 2016-02-16 (Courtney Goetzenleuchter)
|
|
- Update usage, documentation
|
|
|
|
* Revision 3, 2016-06-14 (Courtney Goetzenleuchter)
|
|
- Update VK_EXT_DEBUG_REPORT_SPEC_VERSION to indicate added support for
|
|
vkCreateInstance and vkDestroyInstance
|
|
|
|
* Revision 4, 2016-12-08 (Mark Lobodzinski)
|
|
- Added Display_KHR, DisplayModeKHR extension objects
|
|
- Added ObjectTable_NVX, IndirectCommandsLayout_NVX extension objects
|
|
- Bumped spec revision
|
|
- Retroactively added version history
|
|
|
|
* Revision 5, 2017-01-31 (Baldur Karlsson)
|
|
- Moved definition of elink:VkDebugReportObjectTypeEXT from debug marker
|
|
chapter
|
|
|
|
* Revision 6, 2017-01-31 (Baldur Karlsson)
|
|
- Added VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT
|
|
|
|
* Revision 7, 2017-04-20 (Courtney Goeltzenleuchter)
|
|
- Clarify wording and address questions from developers.
|
|
|
|
* Revision 8, 2017-04-21 (Courtney Goeltzenleuchter)
|
|
- Remove unused enum VkDebugReportErrorEXT
|
|
|
|
* Revision 9, 2017-09-12 (Tobias Hector)
|
|
- Added interactions with Vulkan 1.1
|