Description
Validation errors in the terminal. Similar to this issue (and similarly, RENDER_ATTACHMENT | COPY_SRC stops the errors from generating, but breaks DX12). Also I think linked to this issue at KhronosGroup/Vulkan-ValidationLayers.
Though, in the VVL issue it's mentioned to try with the newest SDK (1.2.170.0) and that I think it should be fixed there, but I am still having these validation errors with the newest SDK.
I've only started that tutorial a few days ago, and I have zero experience with low-level graphics outside of wgpu, so I apologize if I'm not reporting this correctly. (I am having lots of fun with wgpu/wgpu-rs though, so thank you for that!)
Repro steps
git clone https://github.com/sotrh/learn-wgpu.git
cd learn-wgpu
cargo run --bin tutorial2-swapchain
This is the code of the example/bin: here
This example has logging via env_logger, so it just spits out logs into the terminal. I tried the examples on the wgpu-rs repo, but I think they don't have logging, so there wasn't any errors in the terminal.
Expected vs observed behavior
Validation errors in the terminal - they probably shouldn't be there.
Extra materials
Error printed to the terminal. Lots of errors exactly like this one generated every second, I think every frame.
Platform
Microsoft Windows 10 Pro, Version 10.0.19041 Build 19041, x64
NVIDIA GeForce RTX 2080 Ti, drivers of version 461.71
wgpu = "0.7" in Cargo.toml
Vulkan SDK 1.2.170.0, installed fresh from here, after uninstalling all other SDKs, and rebooting the system of course
Interestingly, I'm not seeing any validation errors on Vulkan SDK 1.2.162.0 in this case.
I've seen validation errors on 1.2.162.0 too (before I installed 1.2.170.0 and removed the other). If I uninstall everything (inside C:\VulkanSDK\), I no longer see any errors... but then I think I just don't have any validation at all?
Would there be some way for me to provide some more logs, dumps, etc, to help with getting to the bottom of this?
Best you can do right now is to try investigating it on your own. You can track down the code path where we provide the image usage to Vulkan, and see how/why they would disagree. That would be most helpful!
@Dreamykass I have been trying to understand what is causing the mismatch in usage flags, could you look at the instructions I have in the Validation Layer issue and if you can get me some api dump of the issue it would be helpful (since I can't reproduce it on my machine)
@sfricke-samsung
Dump from frame 0 to frame 1 (2800 lines): https://gist.github.com/Dreamykass/d3d467bc4545468bed0ef2f6371cf4ca
Full dump (10k lines): https://gist.github.com/Dreamykass/90c248ee5688d174a9d0499d093b2da5
(they're from the same run and dump - I just made a shorter gist, cause it's a lot of lines)
I am on windows, and the instructions how to get a dump were for linux, so this is how I did it, using the cmd console (since I couldn't make it work with Windows Terminal / PowerShell):
set VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_api_dump
cargo run --bin tutorial2-swapchain > dump.txt
Platform is still the same as above:
Microsoft Windows 10 Pro, Version 10.0.19041 Build 19041, x64
NVIDIA GeForce RTX 2080 Ti, drivers of version 461.92 (two weeks ago it was 461.71)
wgpu = "0.7" in Cargo.toml
Vulkan SDK 1.2.170.0
Also, @kvark, I'm sorry, I'm afraid I don't know rust or wgpu enough, or low-level graphics barely at all, so I don't think I could really investigate it on my own.
Most helpful comment
@sfricke-samsung
Dump from frame 0 to frame 1 (2800 lines): https://gist.github.com/Dreamykass/d3d467bc4545468bed0ef2f6371cf4ca
Full dump (10k lines): https://gist.github.com/Dreamykass/90c248ee5688d174a9d0499d093b2da5
(they're from the same run and dump - I just made a shorter gist, cause it's a lot of lines)
I am on windows, and the instructions how to get a dump were for linux, so this is how I did it, using the
cmdconsole (since I couldn't make it work with Windows Terminal / PowerShell):Platform is still the same as above:
Microsoft Windows 10 Pro, Version 10.0.19041 Build 19041, x64
NVIDIA GeForce RTX 2080 Ti, drivers of version 461.92 (two weeks ago it was 461.71)
wgpu = "0.7" in Cargo.toml
Vulkan SDK 1.2.170.0
Also, @kvark, I'm sorry, I'm afraid I don't know rust or wgpu enough, or low-level graphics barely at all, so I don't think I could really investigate it on my own.