vulkan-tutorial-rs icon indicating copy to clipboard operation
vulkan-tutorial-rs copied to clipboard

22 descriptor pools and sets

Open matthew-russo opened this issue 6 years ago • 8 comments

this is the second half of the uniform buffer section with descriptor pools and sets

matthew-russo avatar Feb 04 '19 14:02 matthew-russo

I'll look into macOS issues.

As far as windows, this is because its trying to write a path name thats more than 260 characters and msbuild fails. (https://github.com/google/shaderc-rs/issues/33) (https://github.com/Microsoft/msbuild/issues/53) which is a known issue in shaderc-rs and has been requested from microsoft multiple times. At the moment the workaround is to either use cargo run --target-dir <DIR> to set it to a path closer to root so it doesn't overflow the max limit or to use ninja instead of msbuild (https://ninja-build.org/manual.html). I don't see any way around this while still using shaderc.

Noted regarding the readme update. Will do this for all other prs

matthew-russo avatar Feb 09 '19 15:02 matthew-russo

Finally it works - I had already tried ninja, but Python was missing (and the cargo target dir doesn't work even with C:\b). Now the steps up to 25 look fine on Windows/Nvidia.

bwasty avatar Feb 09 '19 19:02 bwasty

Found the issue on MacOS. I'm pretty sure its this: https://github.com/vulkano-rs/vulkano/issues/1135.

I made some changes in the pr, and would like to get your feedback on it. Essentially we were chaining a ton of futures as you said and then the image stutters when the GPU catches up since we never actually waited for them. I added a call to wait for the future and it seems to clear up the stutter on my machine. I'm not sure if this means we can just get rid of previous_frame_end altogether now that we're waiting on the future or not. I'm still no expert on vulkano so going to keep investigating but wanted to get your input

matthew-russo avatar Feb 16 '19 20:02 matthew-russo

Fixes the issue for me too. Not sure about the previous_frame_end either - I would have expected that the .join(acquire_future) should have the same effect as explicitly waiting.

I also wonder if this should be marked as a hack and restricted to macOS (#[cfg(target_os = "macos")]). The CPU and GPU should not be synchronized at this point (right after submitting commands) - that's where the C++ version used all those semaphores (-> https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Rendering_and_presentation#page_Frames_in_flight).

bwasty avatar Feb 16 '19 22:02 bwasty

Noted. Will make those changes. But I also had a chance to test on a different mac machine today and found it didnt work -- just a black screen pops up. It only happens on 22 and after so I'm going to look into whats going on with that. What model mac were you able to test on? I found it worked on a Macbook Pro 2015 but not on a Macbook Pro 2018. Going to look into whether other people have had issues and what the hardware differences are.

matthew-russo avatar Feb 19 '19 00:02 matthew-russo

Weird. After updating the vulkan sdk from 1.1.92.1 to 1.1.97.0, everything now works on the 2018 Pro. Not sure if its worth digging into this more?

matthew-russo avatar Feb 19 '19 01:02 matthew-russo

I've got a Macbook Pro 2015 with Vulkan SDK 1.1.82. I'd say it's fine if it works with the latest SDK. Perhaps we can add a note to the readme to make to use the latest SDK on macOS.

bwasty avatar Feb 19 '19 12:02 bwasty

Looks good (apart from that small conflict). I think I'll find time to finish reviewing this and a few more chapters in a week or two.

bwasty avatar Mar 02 '19 10:03 bwasty