commit | c4659e4e941e5fc4579168859d39325260ba3c09 | [log] [tgz] |
---|---|---|
author | Alex Smith <asmith@feralinteractive.com> | Tue Jan 10 09:51:22 2017 +0000 |
committer | Tobin Ehlis <tobine@google.com> | Tue Jan 10 13:41:51 2017 -0700 |
tree | cce3e658d9c707a042e0b6486227ed5e5cdd62d5 | |
parent | ef5bc01c4967b53a0bb733c0195cc2b5f119fb3e [diff] |
layers: Transition each aspect individually in TransitionImageLayouts This fixes the possibility of spurious validation errors like the following, when attempting to transition multiple aspects of an image after only a subset of those aspects have previously been used in the command buffer: "Cannot query for VkImage 0x599 layout when combined aspect mask 6 has multiple initial layout types: VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL and VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL" The specific case where this bug was encountered was where both the depth and stencil aspects of an image were initially in the TRANSFER_DST_OPTIMAL layout. The first command in the command buffer to reference the image was a vkCmdClearDepthStencilImage on only the depth aspect of the image, followed later by a vkCmdPipelineBarrier to transition both aspects to the DEPTH_STENCIL_ATTACHMENT_OPTIMAL layout. Since TransitionImageLayouts tries to look up the initial state for all aspects at the same time, it was picking up the state based on the depth aspect because of the previous use of that (which had both initialLayout and layout set to TRANSFER_DST_OPTIMAL), and then calling SetLayout for all aspects with only the new layout. Since the stencil aspect didn't have any currently recorded state, it was being added with both initialLayout and layout set to the new layout, causing a mismatch between the initialLayout for the two aspects and therefore the spurious error above. Fix by updating the state for each aspect individually.
This project provides Khronos official ICD loader and validation layers for Vulkan developers on Windows and Linux.
Platform | Build Status |
---|---|
Linux/Android | |
Windows |
Vulkan is an Explicit API, enabling direct control over how GPUs actually work. No (or very little) validation or error checking is done inside a Vulkan driver. Applications have full control and responsibility. Any errors in how Vulkan is used often result in a crash. This project provides standard validation layers that can be enabled to ease development by helping developers verify their applications correctly use the Vulkan API.
Vulkan supports multiple GPUs and multiple global contexts (VkInstance). The ICD loader is necessary to support multiple GPUs and the VkInstance level Vulkan commands. Additionally, the loader manages inserting Vulkan layer libraries, including validation layers between the application and the ICD.
The following components are available in this repository:
If you intend to contribute, the preferred work flow is for you to develop your contribution in a fork of this repo in your GitHub account and then submit a pull request. Please see the CONTRIBUTING file in this respository for more details
BUILD.md includes directions for building all the components, running the validation tests and running the demo applications.
Information on how to enable the various Validation layers is in layers/README.md.
Architecture and interface information for the loader is in loader/LoaderAndLayerInterface.md.
This work is released as open source under a Apache-style license from Khronos including a Khronos copyright.
See COPYRIGHT.txt for a full list of licenses used in this repository.
While this project has been developed primarily by LunarG, Inc; there are many other companies and individuals making this possible: Valve Corporation, funding project development; Google providing significant contributions to the validation layers; Khronos providing oversight and hosting of the project.