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

VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT is required for IBOs #4

Open
Yours3lf opened this issue May 2, 2018 · 3 comments
Open

VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT is required for IBOs #4

Yours3lf opened this issue May 2, 2018 · 3 comments

Comments

@Yours3lf
Copy link

Yours3lf commented May 2, 2018

https://github.com/ARM-software/perfdoc/blob/master/layer/buffer.cpp#L40: “memoryRequirements.memoryTypeBits = INDEXBUFFER_MEMORY_PROPERTIES;”
Perfdoc seems to be forcing the requirement that memory for ibos are created with memory requirements VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT enabled. There is a major difference between desktop/mobile in terms of the memory types supported.

Perfdoc seems to be promoted for desktop PC use (besides the obvious mobile use case): https://community.arm.com/graphics/b/blog/posts/perfdoc-how-to-optimize-early-with-vulkan-validation-layer-tools-at-gdc18

The great thing about PerfDoc is that you can run it on the PC before you even begin to port it to mobile in order to validate the basics right from the start, making the process of porting considerably smoother and less frustrating.

So it would be great if this didn't trigger on desktop or the memory requirements would be different for desktop/mobile.

@HansKristian-Work
Copy link
Contributor

Host sourced index buffers do work on desktop, albeit might be a bit slower. Do you have an example where this does not work?

@Yours3lf
Copy link
Author

Yours3lf commented May 3, 2018

To clarify:
The issue is that we’re expecting to have memory requirements with DEVICE_LOCAL bit set. PerfDoc is modifying the returned memory requirements for the buffer meaning we get into a kind of incompatibility whereby we’re expecting one thing which now isn’t supported.

Binary:
perfdoc.zip

@HansKristian-Work
Copy link
Contributor

HansKristian-Work commented May 3, 2018

I see. Yes, if an application is written to assume there will be a DEVICE_LOCAL type, that's a problem. A short term-solution would be to disable that type modification if index scanning checks are not in place. A more complex, but probably more proper solution longer-term is to copy back GPU index buffers to host and do it there instead.

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

No branches or pull requests

2 participants