-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best Practices Tracking Issue #24
Comments
Comment by karl-lunarg (MIGRATED) #1628 "VK_LAYER_LUNARG_core_validation queue submissions list grows forever and causes crash" might be another candidate condition to check for in this layer. |
Comment by RippeR37 (MIGRATED) Idea: Maybe this layer could also check if same state is set multiple times in a row which can lead to lower performance? |
Comment by mark-lunarg (MIGRATED) From @Tony-LunarG: Assuming that the 99% common workflow is [BeginCommandBuffer; write commands to command buffer; EndCommandBuffer], it would be nice to warn developer if the code is recording two command buffers simultaneously. Would also need to validate assumption about workflow. Note that it needs to be thread smart since we expect multiple threads to be recording multiple command buffers simultaneously |
Comment by MarkY-LunarG (MIGRATED) Idea: Detect case of LVL issue #1917 and warn. |
Comment by karl-lunarg (MIGRATED) Idea: #2061 - Add a layer that writes a unique ID to a CPU-visible buffer whenever a marker is encountered. After a GPU crash, the buffer can be examined to see the last ID written. |
Comment by HansKristian-ARM (MIGRATED) Is this supposed to be a generic layer for best practices on Vulkan which collects best practices from a spec POV, or would there be room for IHV specifics as well (which are probably where the most useful/interesting checks will be)? |
Comment by mark-lunarg (MIGRATED) @HansKristian-ARM, the Assistant Layer effort is currently focused on the former. However, it is a simple matter to create related assistant-type layers specific to a particular IHV. The aim of the layer framework is to make the creation of these types of layers much more straightforward. |
Comment by hrydgard (MIGRATED) Regarding transitions from VK_IMAGE_LAYOUT_UNDEFINED to anything: When initializing textures with known data, I:
As this sequence will trigger a couple of the proposed checks in this issue, what's the recommended way to do this? PREINITIALIZED is no good because I don't want to create a linear image. It seems to me that it would make sense to allow creating images directly in VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL and copy to them , I don't quite understand why that's not allowed. |
Comment by krOoze (MIGRATED)
It will?
I would assume the same reason why |
Comment by hrydgard (MIGRATED)
This one: "Transitions from VK_IMAGE_LAYOUT_UNDEFINED to anything".
What src pipeline stage would you suggest for transitioning from UNDEFINED? Simply BOTTOM_OF_PIPE? EDIT: Well TOP_OF_PIPE of course, thanks. Keep confusing them. |
Comment by krOoze (MIGRATED)
You need to read the rest of that paragraph. It concerns itself with a situation where someone transitions from But you are writing the content, which makes it defined again. So it should not trigger any such checks.
New Image\Memory does not have any outstanding read\write operations on it to synchronize against. So, assuming you are not merging other barriers to this, |
Warn if calling vkAcquireNextImageKHR before calling vkGetSwapchainImagesKHR |
Moving former issue #40 into this issue. |
As mentioned in issue #578 validation layers was producing a false positive by checking that attachment references in subpass description don't use the same attachment ID more than once. In most cases this is not what was intended, so assistant layers could warn about this. |
Detect when the stride in VkVertexInputBindingDescription is less than the largest offset + size of the VkVertexInputAttributeDescription in the VkPipelineVertexInputStateCreateInfo structure. I ran into this where my VkVertexInputBindingDescription.stride was less and I got corruption. Validation layers don't trigger a warning/error of this case. |
Added |
It would be good to warn if the app unnecessarily creates large quantities of duplicated objects such as samplers or pipelines. Some objects such as samplers, fences, images, and buffers make sense to have lots of similar ones. However, for meta-data objects like render passes and fully encapsulated objects such as samplers and pipelines, the duplication isn't necessary. We probably don't want to throw a warning for a small quantity of duplication but if you've got 1000 identical samplers, a warning might be helpful to the developer. It's worth noting that on most hardware implementations, I wouldn't expect de-duplication to make a significant performance improvement. There's nothing inherently wrong with having 1000 identical samplers. It's more that if you have 1000 identical samplers, you're probably also doing way too much descriptor set binding and updating and that can have a negative performance impact. |
Please add #2063 to the feature request list. The WG will document what needs to be checked and drop a reference into that issue. |
All Best Practices information is now tracked via the Vulkan-ValidationLayers project page. Please feel free to add cards to that project, or to create new issues for enhancements to Best Practices, so that we may add them to the project.
Thanks!
The text was updated successfully, but these errors were encountered: