Skip to content
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

PRTs + input attachments: Verify FB attachments accessed by input attachments are fully backed by physical memory, as far as renderpass' render area is considered. #46

Closed
karl-lunarg opened this issue May 14, 2018 · 1 comment
Assignees
Labels
Incomplete Missing Validation VUs to be added
Milestone

Comments

@karl-lunarg
Copy link
Contributor

Issue by DominikWitczakAMD (MIGRATED)
Monday Sep 25, 2017 at 11:08 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#2088


Let X be an image defined as a FB attachment. Let X also be a partially-resident image.

Now, consider a renderpass with two subpasses:

  • Subpass 1) renders to a color attachment which uses an image view whose parent image is X.
  • Subpass 2) uses an input attachment which reads data rasterized in subpass 1.

Finally, let the renderpass use a DONT_CARE store op.

This use case could potentially be handled be differently by tilers and immediate renderers; one can imagine that tilers would use on-chip memory to store the rasterized contents, while the latter would stash the rendered data to image memory.

The issue arises if the writes, potentially only exercised by immediate renderers, touch pages without an actual physical memory backing. In such cases, it would be useful to have a validation check that would verify that all PRT tiles encapsulating the render area are actually backed by physical memory. If that is not the case, this could potentially lead to different results on different architectures.

The validation check would only be functional for mips that are not a part of miptails (because tile granularity breaks, as soon as we enter these), but it's probably better to warn developers about entering the "undefined behavior" land, rather than not letting them know about anything at all.

@karl-lunarg karl-lunarg added this to the P1 milestone May 14, 2018
@mark-lunarg mark-lunarg self-assigned this May 14, 2018
@KarenGhavam-lunarG KarenGhavam-lunarG added Incomplete Missing Validation VUs to be added and removed incomplete labels Sep 3, 2018
@jzulauf-lunarg
Copy link
Contributor

@DominikWitczakAMD

It's not clear to me that the implementation is allowed to vary it's behavior in this way without warning the application it's possible. Meaning that there doesn't seem to be a validation issue getting undefined results from usage patterns that are defined to be undefined. Perhaps this belongs in #24?

31.4.1. Accessing Unbound Regions

The following member of VkPhysicalDeviceSparseProperties affects how data in unbound regions of sparse resources are handled by the implementation:

residencyNonResidentStrict

If this property is not present, reads of unbound regions of the image will return undefined values. Both reads and writes are still considered safe and will not affect other resources or populated regions of the image.

If this property is present, all reads of unbound regions of the image will behave as if the region was bound to memory populated with all zeros; writes will be discarded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incomplete Missing Validation VUs to be added
Projects
None yet
Development

No branches or pull requests

5 participants