-
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
Layers: Resource binding and aliasing checks may be too strict #14
Comments
Comment by tobine (MIGRATED) @yavn Thanks for the bugs and great analysis. I agree that the first needs to change to a warning. The spec language is only telling what you must do to avoid aliasing, but isn't saying that the aliasing in itself is an error. For the second case I'll leave as an error for now but see if I can at least clean up the printing of un-initialized variable in the near-term. Longer-term I'd like to keep this open and analyze if we can be a bit smarter about the second aliasing case. I think it's probably a very rare case so don't want to spend too much effort on it, but may be some simple updates that can be made to at least make validation more friendly in this case. |
The memory errors are now warnings, and the DS error is no longer present in current validation. |
This commit adds checks regarding: - Store ops for potentially transient images - Framebuffer attachments that should/should not be transient - Clearing attachments after load - Many instanced vertex buffers in a pipeline This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
This commit adds checks regarding: - Store ops for potentially transient images - Framebuffer attachments that should/should not be transient - Clearing attachments after load - Many instanced vertex buffers in a pipeline This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
This commit adds checks regarding: - Store ops for potentially transient images - Framebuffer attachments that should/should not be transient - Clearing attachments after load - Many instanced vertex buffers in a pipeline This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
This commit adds checks regarding: - Store ops for potentially transient images - Framebuffer attachments that should/should not be transient - Clearing attachments after load - Many instanced vertex buffers in a pipeline This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
This commit adds checks regarding: - Store ops for potentially transient images - Framebuffer attachments that should/should not be transient - Clearing attachments after load - Many instanced vertex buffers in a pipeline This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
Issue by yavn (MIGRATED)
Tuesday Dec 13, 2016 at 16:39 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#1259
I'm observing errors related to keeping track of allocated memory and resource types that were bound to it. Layers are making assumptions about how the memory range is going to be used by the app and emit errors when the usage pattern seem to be incorrect.
1. Binding a memory range that was also bound to a resource with a different tiling
Although the layer is trying to highlight what is most likely a bug, there's no spec language (AFAIK) that says this is an error. Violating buffer-image granularity makes the resources alias each other, and aliasing of linear and non-linear resources makes reads/writes undefined to the other resource. So this should probably be a warning instead.
2. Mapping a memory range that is aliased with an unused image
The layer is tracking bound memory ranges and sees that a range is used by an image that was never transitioned from UNDEFINED layout. But this message is a false positive. We're actually mapping the range in order to access a buffer that aliases the image. The image itself is never accessed. Of course there's no way to tell the intent, as this is not visible in the
vkMapMemory
call... Not sure if this can be improved. Again, layer is trying to do the right thing here, but in presence of aliasing this is just too ambiguous.The second message outputs an uninitialized variable (0xcccccccccccccccc) because a common code is used that expects image handle but we only set memory range before calling. This is a small bug, not really relevant.
For reference, the Khronos internal Vulkan CTS issue for this is 560 if you want to see the test that causes these problems.
The text was updated successfully, but these errors were encountered: