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

uniform example (example 03) causes Vulkan layer to report problem. #22

Open
FunMiles opened this issue Apr 6, 2020 · 8 comments
Open

Comments

@FunMiles
Copy link
Contributor

FunMiles commented Apr 6, 2020

As I was putting the gflw source code in external directory, I ran the examples and got the following error for each frame drawn in the uniform example:

00000008 debugCallback: [ VUID-vkCmdPipelineBarrier-dstAccessMask-02816 ] Object: 0x7fe2c3a63928 (Type = 6) | vkCmdPipelineBarrier(): pBufferMemBarriers[0].dstAccessMask (0x20) is not supported by dstStageMask (0x1). The Vulkan spec states: The dstAccessMask member of each element of pMemoryBarriers must only include access flags that are supported by one or more of the pipeline stages in dstStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCmdPipelineBarrier-dstAccessMask-02816)

@lhog
Copy link
Collaborator

lhog commented Apr 6, 2020

Seems like validation layer is unhappy about
vk::AccessFlagBits::eShaderRead at https://github.com/andy-thomason/Vookoo/blob/master/examples/uniforms/uniforms.cpp#L157

Locally I replaced the enum above with {} as per spec recommendation. Smoke test was successful, but changes like this require some insights from Andy

P.S. Other examples have similar warnings too.

@andy-thomason
Copy link
Owner

andy-thomason commented Apr 7, 2020 via email

@FunMiles
Copy link
Contributor Author

FunMiles commented Apr 7, 2020

@lhog , you want to create a PR with your fixes for this?

@lhog
Copy link
Collaborator

lhog commented Apr 7, 2020

Technically I can do that, however I wanted to first refresh the barriers topic a little bit to make sure we don't just shut up the validation layer, but do the right thing.

@lhog
Copy link
Collaborator

lhog commented Apr 8, 2020

I've started looking into this based on Sascha's examples, but it will take some time.
Uniform example should be easy to fix alone, but I think https://github.com/andy-thomason/Vookoo/blob/master/include/vku/vku.hpp#L1489-L1545 might need a fresh look.

@andy-thomason
Copy link
Owner

andy-thomason commented Apr 8, 2020 via email

@FunMiles
Copy link
Contributor Author

FunMiles commented Apr 8, 2020

If I may, a little detour: reading the linked code reminded me of another issue I've left out. Clang complains about a few switch/case where not all cases are handled. Adding a default would silence the compiler warnings but I'm not sure if that's really advisable unless one can guarantee that all other cases should behave as default.
Any thoughts, Andy? It's not urgent, but I like my compiler to not give me warnings I ignore as it can make me miss important warnings on my new code.

@andy-thomason
Copy link
Owner

andy-thomason commented Apr 8, 2020 via email

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

3 participants