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

Check smoketest buffer/memory binding behavior #11

Closed
karl-lunarg opened this issue May 14, 2018 · 4 comments
Closed

Check smoketest buffer/memory binding behavior #11

karl-lunarg opened this issue May 14, 2018 · 4 comments
Labels
Enhancement New feature or request
Milestone

Comments

@karl-lunarg
Copy link
Contributor

Issue by tobine (MIGRATED)
Thursday Nov 17, 2016 at 21:49 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#1172


Smoketest has a buffer that is bound to memory without calling vkGetBufferMemoryRequirements(). The spec implies that this should not be done and there's a pending validation warning to flag this case. Understand smoketest behavior in this regard and update as appropriate.

@karl-lunarg karl-lunarg added this to the P2 milestone May 14, 2018
@karl-lunarg karl-lunarg added the Enhancement New feature or request label May 14, 2018
@karl-lunarg
Copy link
Contributor Author

Comment by Tony-LunarG (MIGRATED)
Friday Nov 18, 2016 at 17:16 GMT


If I create N buffers, all with identical BufferCreateInfo structs, and call GetBufferMemoryRequirements only for the first buffer, wouldn't the returned values apply to all N buffers? I think that's what's going on here. Should that really be a warning?

@karl-lunarg
Copy link
Contributor Author

Comment by tobine (MIGRATED)
Friday Nov 18, 2016 at 18:36 GMT


@Tony-LunarG in most reasonable cases I would think the returned value for one buffer should apply to all identically created buffers but I don't believe that's required by the driver. There are some guarantees given by the implementation in the spec, but size doesn't appear to ever be guaranteed.
I do think it should be a warning if a user is binding memory to a buffer or image for which the memory requirements have not been explicitly requested for that exact buffer or image.

If a user is comfortable creating a bunch of identical buffers, only retrieving memory requirements for one of them, and then binding them all to memory, they can simply ignore the warning.

I suspect there will be a reasonable number of new Vulkan users who fail to call vkGetBufferMemoryRequirements() at all and make assumptions about memory that will benefit from the warning.

@mark-lunarg
Copy link
Contributor

This issue should be opened against the Vulkan-Tools repo. Closing.

@karl-lunarg
Copy link
Contributor Author

Remigrated to KhronosGroup/Vulkan-Tools#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants