mosra / magnum

Lightweight and modular C++11 graphics middleware for games and data visualization
https://magnum.graphics/
Other
4.75k stars 439 forks source link

Fix invalid iterator access in Device.cpp / Instance.cpp #549

Closed Samulus closed 2 years ago

Samulus commented 2 years ago

Hi @mosra, thanks for the awesome library.

I've been using the Vulkan addons for Magnum and I ran into a crash with address sanitizer enabled on Visual Studio 2022. Pretty simple fix.

mosra commented 2 years ago

Hi, thank you! Oh yes, std::lower_bound(), an API that's just impossible to use correctly. Sorry about that, merged as 390d3fc06f6cb7982f3031a9bef544dedac29349. I should really create my own binary search function that's not so error-prone...

You're one of the very first users of the still-not-fully-finished Vulkan APIs, how do you like them? Even a drive-by feedback is valuable to me. Thanks! :)

Samulus commented 2 years ago

I'm a big fan of the API! I had some issues with getting flextVk to work with KHR_Swapchain (the generator script had to be patched because it was failing on vk_khr_maintenance1) and issues with creating an SDL2 window with a Vulkan context (had to remove the SDL_WINDOW_OPENGL flag from Magnum code). I'll post issues for both of those when I get a chance.

mosra commented 2 years ago

Ah, yes, those are precisely the missing parts :)

We'll be soon going back to work on the Vk library -- 1.3 features, swapchain creation, support in Application classes and builtin shaders are first things on the list.