Тёмный

Device Setup & Pipeline cont. - Vulkan Game Engine Tutorial 03 

Brendan Galea
Подписаться 26 тыс.
Просмотров 75 тыс.
50% 1

In this Vulkan game engine tutorial we include a device file to wrap functionality surrounding Vulkan API device setup and continue working on our graphics pipeline. I originally intended to complete pipeline creation in this tutorial as well, but in order to give each stage’s configuration a detailed description, I’ve decided to move that into the next video.
* MyEngineDevice CODE DOWNLOAD*
drive.google.com/drive/folder...
** Timecodes **
0:00 - Making vulkan easier to learn?
1:34 - Adding Device setup code
2:36 - Window::createWindowSurface() implementation
3:57 - Building your code
4:17 - Device class overview
6:09 - Updating Pipeline header
9:43 - Pipeline constructor implementation
10:23 - Pipeline::createShaderModule() implementation
12:10 - Pipeline::defaultPipelineConfigInfo() implementation
12:30 - Updating FirstApp header
13:33 - Outro
** View playlist **
• Vulkan Game Engine Tut...
** Tutorial Series introduction video **
- • Vulkan Game Engine Tut...
** View File Changes (also shows tutorial 04 changes) **
github.com/blurrypiano/little...
** Vulkan-Tutorial Device Setup (Optional Reading) **
vulkan-tutorial.com/Drawing_a...
vulkan-tutorial.com/Drawing_a...
vulkan-tutorial.com/Drawing_a...
vulkan-tutorial.com/Drawing_a...
** Some other resources **
My github repo for this series - github.com/blurrypiano/little...
Official vulkan samples - github.com/KhronosGroup/Vulka...
** Attributions **
I use pexels.com for free no attribution stock photos
Bored Dog - Photo by Dina Nasyrova from Pexels
Magnify Glass - Photo by Wallace Chuck from Pexels
Map - Photo by Elina Sazonova from Pexels
“Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.”

Опубликовано:

 

27 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 209   
@Archie3D
@Archie3D 3 года назад
It is nice that you split the code into separate classes unlike the original tutorial.
@abarry6002
@abarry6002 3 года назад
It is pretty nice, i'm more of a fan of mostly single files myself tho :)
@Crimspn
@Crimspn 3 года назад
​@@abarry6002 programmers must enjoy collaborating with you ;)
@user-dh8oi2mk4f
@user-dh8oi2mk4f 3 года назад
@@Crimspn lmao
@ralfwright
@ralfwright 2 года назад
@@abarry6002 Programmers after finding your file: "Cast into the fire! Destroy it!" You: "No."
@ProGaming-kb9io
@ProGaming-kb9io Год назад
@@Crimspn and all the dudes in the thread: It doesn't make sense to create an architecture with an API you have no idea how it works in the first place. in this scenario learning in a single file is optimal. Later, after you understand what's going on, is when splitting into different files becomes a necessity, and guess what? you will be in a better position to create an architecture that really fits your needs ;)
@khangnguyentruongduy5040
@khangnguyentruongduy5040 Год назад
Thank you for your tutorial since my internship will use Vulkan in the projects. Small fixing- you guys should add #include in the device folder for those errors when you just put the files into the project folder.
@harpiesd96
@harpiesd96 3 года назад
Please make that appendix! I would love to know this stuff in depth.
@sanketsbrush8790
@sanketsbrush8790 День назад
oh boy , I'm enjoying this series , it's much simpler to grasp when compare to Vulkan tutorial docs. 👍
@ChrisGnam
@ChrisGnam Год назад
I had originally tried to start with this tutorial series, but felt a bit lost having copied much of this code. I ended up going back to the vulkan-tutorial site and really spending some time working through that and drawing out exactly how everything works. Coming back to this tutorial series after a few weeks of REALLY burying my head in the weeds of everything has made stuff a LOT clearer. I especially like how this tutorial shows how one could break things up into classes so you can build your own API around your specific needs. All in all, really great tutorial but for personally I found it easier to approach this tutorial series after having really dived into the details of Vulkan on my own both through the vulkan-tutorial site, and supplemental reading of documentation. So if you're finding it difficult to follow (like I was) perhaps take a step back to the original vulkan-tutorial first and really focus on reading the relevant documentation and playing around with that a bit on your own. Great tutorial, and has really helped me out! Thanks so much
@eugenbondarev4086
@eugenbondarev4086 3 года назад
I'm so thankful that you did it that way instead of writing all the code manually and simultaneously explaining it, exactly what I was looking for
@TagetesAlkesta
@TagetesAlkesta 2 года назад
This is a fantastic tutorial. I'm a fairly experienced coder, however I'm new to C++ (Coming from C# and Python). Going through this is helping me learn both about C++ and Vulkan. Thanks
@sourajyotibiswas3278
@sourajyotibiswas3278 3 года назад
Yes please make that appendix tutorial.. you are a great tutor
@StrayZero
@StrayZero 3 года назад
+1 on this request :D
@aviralgoel5709
@aviralgoel5709 Год назад
+1 on this request
@anon9322
@anon9322 2 года назад
almost a year later and this series is still a goldmine of information
@basilicous1114
@basilicous1114 3 года назад
Really loving these tutorials They help write nice, clean code for the engine and you explain things really well thanks for these
@VoylinsLife
@VoylinsLife 2 года назад
What I like the most about your series is that you really teach something and also that you don't use an IDE. For many people IDE's make it easier, but I personally find that IDE's make everything more complicated. ^^" So a big thank you for using vs code!!
@EmperorKagato
@EmperorKagato Год назад
vscode is an ide but a slim down version of your typical IDE.
@oh-facts
@oh-facts Год назад
@@EmperorKagato Not really. Its a beefed up text editor.
@JakeJJKs
@JakeJJKs Год назад
Thank you for making this! I'm a software engineer transitioning into graphics, and this tutorial is absolutely amazing!! Thank you for making these!
@dexterman6361
@dexterman6361 3 года назад
To all the things you said in the end. "Yes please :)" Thanks for the videos :) Have a great day kind sir!
@danielketcheson1965
@danielketcheson1965 2 года назад
From articulation to beginner-friendliness, I can easily say Brendan has a teaching style far better than 95% College and University professors. I will be far ahead of many students due to ease of learning and high reward/work ratio.
@DaminGamerMC
@DaminGamerMC 2 года назад
I watched this tutorial when it first came out but I hated the idea of copying code, i left and started doing stuff on my own. I figured how all of the Instance-Device-Surface stuff works and now I want to focus on the rest, so now this tutorial is perfect because it skips what i already know and goes to what I do not know.
@BrendanGalea
@BrendanGalea 2 года назад
Nice!! That will definitely be useful information going forward and will provide some context for what we’re doing.
@Al-eb9mi
@Al-eb9mi 2 года назад
Love this series so much. Thanks for existing man
@binarybotany3218
@binarybotany3218 Год назад
Not a big fan of tutorials that tell you to drag and drop code samples either, but after having done the Vulkan Tutorials previously to your tutorials, I'm happy you chose to do it this way and I won't have to watch you type those chapters. 😂
@guitarvoicing
@guitarvoicing Год назад
Another amazing one. I watched all the series and thank you again!
@KangJangkrik
@KangJangkrik 2 года назад
Personally, learning Mr. Galea's tutorial on different platform (Windows 10) with my own variable naming and style, makes everything more make sense
@DebugDomain
@DebugDomain Год назад
You are actually a really amazing person Brendan Galea. I really respect your approach to teaching.
@ChronicDreamer
@ChronicDreamer 3 года назад
For those of you who might have an error saying your window class is not recognized, be sure to change the namespace in both device files, don't think he mentiones that. Great video Brendan!
@BrendanGalea
@BrendanGalea 3 года назад
Thanks for catching this!
@ChronicDreamer
@ChronicDreamer 3 года назад
@@BrendanGalea No problem :). THank YOU for this amazing content!
@mushroomcrepes4780
@mushroomcrepes4780 10 месяцев назад
thanks! I thought I was going crazy and redid everything a few times.
@cerulity32k
@cerulity32k Год назад
Love it. Vulkan seems to have a lot of boilerplate to set it up (which is good for fine tuning, but is a pain to churn through). This tutorial is fantastic.
@lexsheyn
@lexsheyn 2 года назад
Step by step is mush appreciated. This is the way i learn.
@BrendanGalea
@BrendanGalea 2 года назад
Ya I still need to get around to creating the device appendix video, but every time i start on it it just feels like im reiterating vulkan-tutorial.com :/ I highly recommend giving the device creation secion a 15 minute read, which gives a step by step appraoch as to how that code was constructure.
@mrshodz
@mrshodz 2 года назад
I really like the progressive way this difficult subject is taught.
@SparxableTunes
@SparxableTunes 3 года назад
I would vote to skip the device setup video unless you had the extra time. It gives me a reason to dive into the docs and compile more notes anyway. Looking forward to more!
@BrendanGalea
@BrendanGalea 3 года назад
Ya my main focus is getting out more tutorials. Once I cover the basics, which should be around tutorial 25, then I think I'll do the appendix just to have a complete series.
@duduken20
@duduken20 2 года назад
Quality content at every step!
@gaborbacsa3721
@gaborbacsa3721 3 года назад
You do really great explanations, keep up tge good work. I am really interested :)
@youzhang9991
@youzhang9991 3 года назад
+1
@Ventrueunlimited
@Ventrueunlimited 2 года назад
thanks for this, man, don't give up, wellwork
@evgenybumbread8060
@evgenybumbread8060 2 года назад
I really appreciate your tutorials. They have been very helpful at explaining vulkan and graphics programming to me. I don't mean to be mean but I'd rather want a very flat code where it is shown what steps are taken one by one, that way it's easier for the beginners to see the usage and what has to happen in what order.
@BrendanGalea
@BrendanGalea 2 года назад
thanks for the feedback! I'd highly recommend checking out vulkan-tutorial.com for step by step instructions. I'm trying to structure this as how to build out an engine so its hard for the series not to jump around a bit. It's a bit of a balancing act between a bunch of different constraints for me when trying to design these tutorials, and I don't always get it right. So defintely don't use me as your only source. But I'll keep trying to do my best to make the series as easy to follow as possible
@vadimwillhammer
@vadimwillhammer 2 года назад
love your tutorial thus far!
@BrendanGalea
@BrendanGalea 2 года назад
Thank you!!
@doot2359
@doot2359 3 года назад
Keep up the good work !!
@jasonsharp4950
@jasonsharp4950 3 года назад
thanks so much, this is perfect timing as i'm just starting my Vulkan journey. please do the explanation video (if that ship hasn't sailed)
@BrendanGalea
@BrendanGalea 3 года назад
Yes will do!
@treee6145
@treee6145 2 года назад
I appreciated the approach of giving us those files-- my first time through vulkan-tutorial that part was really a drag to get through and very discouraging
@fernandogoncalves7297
@fernandogoncalves7297 3 месяца назад
Bro got me good with the code to download, unfortunatelly for me, im implementing the tutorial with other names so i'll take my time translating everything. Still think that i`ll end up learnng a lot, so thanks!!! I`m really enjoying thinks so far! Edit, it was actually very fast, nice.
@ghostpeppered4524
@ghostpeppered4524 Год назад
`.clang-format` w/ "Format on Save" option in VSCode is awesome! 👍 I added these options to match the YT vids: DerivePointerAlignment: false, PointerAlignment: Left
@cthutu
@cthutu 3 года назад
Your approach with asking people to download some code is great if you're working with C++, but I've been following your tutorials and converting it to Rust on the go. So having to figure out what you're doing in your little C++ engine and mass-converting it is a lot harder. That's the only downside I can think of with that approach.
@BrendanGalea
@BrendanGalea 3 года назад
Thank you, That is a good point. I should make rust files available as well.
@cthutu
@cthutu 3 года назад
@@BrendanGalea I'm going through your code now trying to convert it using the Vulkano crate rather than an unsafe wrapper like Erupt.
@cthutu
@cthutu 3 года назад
@@BrendanGalea BTW, I am really excited about this series. Not just from a Vulkan point of view, but graphics programming in general.
@BrendanGalea
@BrendanGalea 3 года назад
Let me know if you run into issues and I’ll do my best to help. (Ive never used rust though so the capacity I can help in is limited)
@NoxFly
@NoxFly 2 года назад
Really nice tutorials, you got one more sub :) Just, your device.hpp/cpp files have 10 warnings (on Visual Studio). Most of these are "The enum ... is unscope. Prefer 'enum class' over 'enum' (Enum 3)." And some others are "Variable ... is uninitialized. Always initialize a member variable (type 6)." correcting these warnings would be really cool so you have a clean code ^^
@BrendanGalea
@BrendanGalea 2 года назад
Thanks! Unfortunately can’t correct them as they’re coming from the vulkan c headers. Alternative would be to use the cpp headers or find a way to silence them. But I’ll take a look into the uninitialized member variables, that’s probably my mistake somewhere.
@praveensanap
@praveensanap Год назад
Great tutorials. Thanks! Appendix would be helpful!
@magnias121
@magnias121 3 года назад
Thank you!
@jarwarren
@jarwarren 2 года назад
Having to download code is a huge bummer for anyone not using C++. Still an excellent series but I thought I'd share the feedback.
@BrendanGalea
@BrendanGalea 2 года назад
Ya that’s a really good point. What language are you using. I’ll ask on our discord if anyone has done it in a different language and if they are alright letting me share links to it.
@sindrihardarson2352
@sindrihardarson2352 9 месяцев назад
if you're getting a fatal compile error then try replacing all occurrences of std::endl in the lve_device.cpp with ' '. I think it could potentially interfere with the other output sequences(functions that are also using cout) since it flushes the output buffer when its called. very likely something a bit more complicated like multi threading issues but that's a rabbit hole i have yet to dive into.
@chenxiang1945
@chenxiang1945 Год назад
awesome
@xnadave
@xnadave 5 месяцев назад
Great so far, but I can't get this stage working on an M1 Mac. I keep getting error about " Cocoa: Vulkan instance missing VK_EXT_metal_surface extension", despite it being included in the available extensions list.
@theRPGmaster
@theRPGmaster 3 года назад
I was having an issue when running this code in Debug configuration, turns out the validation layers couldn't load. If that happens, you need to define some system environment variables (on Windows): VK_INSTANCE_LAYERS and VK_LAYER_PATH. For some reason, the validation layers check didn't catch this problem.
@BrendanGalea
@BrendanGalea 3 года назад
Thanks for mentioning! I wasn't aware of this issue.
@aaronvansichem
@aaronvansichem 3 месяца назад
@theRPGmaster Dude tysm, you're thee year old comment saved me a BUNCH of time probably :D.
@Sheopaard
@Sheopaard 2 года назад
Hey just curious I see you using the brackets to create objects, e.g.: PipelineConfigInfo configInfo{}; I'm curious if there was a reason for that or if that's just your personal style? I googled it and I believe that statement sans brackets is the same. Similar for lveDevice{lveWindow}; Is that just cleaner than passing the window to it in the constructor? You could do something like FirstApp(lveWindow(w,h,name); lveDevice(lveWindow);). Isn't doing it how you did it functionally the same as doing it in the constructor? The way you did it looks clean just curious if it's the same or not.
@kolyashinkarev7366
@kolyashinkarev7366 9 месяцев назад
no idea what is happening, but when i run my code in debug mode in vs2022 (haven't tried any other ide), there are multiple memory related errors, that start at memory allocation for appInfo. dunno what's the problem, but when i run code in release mode, it's running smoothly
@lorenzozanella6561
@lorenzozanella6561 3 года назад
Hey friend! Thanks for the enthusiasm and energy in these videos! At the end on vkCreateShaderModule I had to make my shader Module a pointer, because of some compilation error, or better yet a conversion error. Do you know if it's some error in my code/compiler? It ran just fine afterwards
@BrendanGalea
@BrendanGalea 3 года назад
Hmm that’s pretty strange. I’ve tested the code on most compilers now. What compiler were you using? And do you have the error message?
@lorenzozanella6561
@lorenzozanella6561 3 года назад
I'm sorry, it was a typo on my code. I found it today, just a missing pointer operator. Thanks
@BrendanGalea
@BrendanGalea 3 года назад
No worries! Hope you’ve been finding the tutorials helpful ☺️
@zbl2550
@zbl2550 Год назад
I got through the past lecture and built the code successfully. I am now stuck when I download the code but visual studio cannot understand symbols like VkSurfaceFormatKHR.... Is there any header I need to include? (my os is windows)
@user-tp1qn2wt6t
@user-tp1qn2wt6t 2 года назад
I have a question, is it possible to use std::a vector for queue indexes, if I need all queues with one property?
@BrendanGalea
@BrendanGalea 2 года назад
I'm not sure what you're referring to, could you please elaborate?
@peterburgess9735
@peterburgess9735 3 года назад
Great tutorial series so far! I have a question though... I know you already said we'd come back to the Device class, but why does the Device class require a window on construction? It is also keeping the window as a reference, but windows can come and go, I wish to eventually support multiple windows, and it would seem off to have a 1:1 relationship between Device instances and Window instances
@BrendanGalea
@BrendanGalea 3 года назад
Great question! You are absolutely right in that this is an unnecessary restriction, but for now it really simplifies a lot. Currently I'm taking the approach of 1:1:1 for our window, device and swapchain. But it should be possible to have 1 device, with multiple window/swapchain pairs. I'm not 100% about this, but I believe there could be situations though that you can't share your device (or have to re-create it). For example, if you have a full screen window on a 10 bit HDR monitor, and then a window on another second monitor. It might be possible that the required extensions are incompatible? So until I've looked into this more I figured it would be best to keep things as straightforward as possible. Multiple windows is a really good idea for a future tutorial.
@peterburgess9735
@peterburgess9735 3 года назад
@@BrendanGalea Yeah right, a number of good points! That's very useful info to keep in mind when I do eventually break the 1:1:1 in my own engine
@lucaaaa6382
@lucaaaa6382 Год назад
I have a small problem. It only works in release mode. In debug mode I get an unhandled exception at runtime. Does anyone know if this is ok?
@zhifez
@zhifez 2 года назад
I'm getting "terminating with uncaught exception of type std::runtime_error: validation layers requested, but not available!" What can possibly be the problem here?
@BrendanGalea
@BrendanGalea 2 года назад
this can be a bit tricky. My first recommendation is try re-installing vulkan, make sure you're downloading the vulkanSDK and not just the vulkan runtime. Next if that doesn't fix the issue, in the vulkanSDK/Applications directory there should be an application called vulkaninfo. Try running that and in the output nearish the top you should see something like Layers: count = 8 ================= Where validation layer count should be some number greater than 0. Then another thing you could try is in the same directory try opening vkconfig, have selected the validation layers option, and then run your program and see if the validation layers can be found in that case.
@jtaimneas
@jtaimneas 3 года назад
question: noticed in the LveDevice class you have a member called "properties" and in some methods you have arguments passed to them also called properties is this an issue because this is hiding the class member?
@BrendanGalea
@BrendanGalea 3 года назад
It's not causing any issues (currently) but you are absolutely right in that this does shadow the variable and isn't clean code. I should've used differentiated names. Thanks for bringing this to my attention!
@jtaimneas
@jtaimneas 3 года назад
@@BrendanGalea also noticed same shadowing warnings for "swapChainExtent" when I added the swap chain class is video 5.
@apprendreunity1515
@apprendreunity1515 2 года назад
For anyone encountering issues with the validation layer on Arch Linux, try installing the `vulkan-extra-layers` package via your package manager.
@BrendanGalea
@BrendanGalea 2 года назад
that's good to know, thanks for sharing this!
@alfredli4032
@alfredli4032 Год назад
best of best
@flopbob
@flopbob 2 года назад
its throwing me a runtime error at VkApplication info. how to solve that error?
@hcn6708
@hcn6708 12 дней назад
13:02 When I try and run it, it gives me the runtime error at "throw std::runtime_error("validation layers requested, but not available!");" Is there something I'm missing here?
@flocela
@flocela 10 месяцев назад
Are you coding in Apple's XCode? I can't find the EXPLORER view shown on the left column. Also, how do I get XCode to recognize a make file. Sorry, just no luck finding these answers. It's still early days though. : )
@dbogucki
@dbogucki 9 месяцев назад
He's using VS Code, not XCode. Hope it helps.
@126sivgucsivanshgupta2
@126sivgucsivanshgupta2 2 года назад
yes, i would like to see a step by step tutorial for the device code :), 1 question, I have 2 gpus in my laptop that i am learning this on (integrated intel, and dedicated nvidia) it shows 3 ? plus why did it pick intel over the dedicated nvidia ?
@BrendanGalea
@BrendanGalea 2 года назад
The device code is pretty dumb, and just picks the first device that is suitable for the requested features. In your case the ordering happens to present the intel first. i still haven't gotten around to the device code walk through yet unfortunately, I'm still propritzing adding new tutorials currently. But the device code very closely follows the setup section vulkan-tutorial.com/Drawing_a_triangle/Setup/Base_code so thats a good place to start
@saadblabla
@saadblabla Месяц назад
13:02 when i build i get the std::runtime_error at memory location in device.cpp, how do i fix it ? EDIT : If i continue the code execution i get 4 more errors just like this one, but the last one is a stopping error at line 111 in device.cpp where it gives me an Access violation in deviceCount == 0
@lorrat4210
@lorrat4210 Месяц назад
the downloaded code is giving me syntax errors all over the place. I assume I did something wrong with the vulcan download or linking or so, but i cant figure it out.
@Levendo
@Levendo 2 года назад
I'm getting an error: invalid conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘const uint32_t*’ {aka ‘const unsigned int*’} [-fpermissive] I'm using gcc in VSCode on linux. What should I do?
@BrendanGalea
@BrendanGalea 2 года назад
Sounds like you’re trying to pass an int to something that takes and int pointer. You might be missing an &. What’s the line of code?
@deadferretvr4150
@deadferretvr4150 2 года назад
validation layer: loader_get_json: Failed to open JSON file C:\Program Files (x86)\Epic Games\Launcher\Portal\Extras\Overlay\EOSOverlayVkLayer-Win32.json Can anyone explain to me why Vulkan is trying to grab a file from a launcher i haven't even installed (beyond shoddy uninstallers that leave crap in the registry)? Are there .json files my VulkanSDK is missing?
@BrendanGalea
@BrendanGalea 2 года назад
Are you running any processes in the background. Things like screen capture and over clocking software hook in pretty low level into the system and validation layers can pick these messages up from other programs. Perhaps the epic launcher uses some vulkan processes in some way and you’re getting cross talk. If it is just cross talk, it won’t affect how your vulkan program runs, just may clog up your logs a bit
@zig3445
@zig3445 4 месяца назад
Hi, first of all, thanks for the tutorial i'm enjoying it! and second, at this point, can anyone knows if the error message "validation layer: Failed to open dynamic library "X:\PathToFolder\ReShade\.\ReShade64.dll" with error 1114" that appear at the top of the console (but not break the program itself so it continues printing the extensions and physical device info...) will become a problem later, my GPU is an "AMD Radeon RX 6700 XT" if it helps and Again thank you so much for this tutorial series.
@mubusomoyo9594
@mubusomoyo9594 2 года назад
Hello! I've been getting this error: " terminate called after throwing an instance of 'std::runtime_error' what(): failed to find a suitable GPU! Aborted (core dumped) " I think this comes from returning supportedFeatures.samplerAnisotrpy in the isDeviceSuitable function, but I don't know how to fix it. Does anyone know how to fix it? Also, thank you for these great tutorials!
@nerya4197
@nerya4197 Год назад
ive had this same problem, seems like our gpus dont support anisotropic filtering. luckily this can be turned off. you can remove the check for supportedFeatures.samplerAnisotrpy and change deviceFeatures.samplerAnisotropy = VK_TRUE; to VK_FALSE in line 153 of your_enging_device.cpp im not 100% sure this works yet, ill reply to this comment after further testing
@mechap7612
@mechap7612 3 года назад
In the pipeline class you're not deleting the copy assignment function. The copy assignment function returns a reference to the class name, it doesn't return void.
@BrendanGalea
@BrendanGalea 3 года назад
yikes, thanks for catching this! I go on to make this mistake in multiple spots. I'll mention this in the next tutorial I make.
@damus8057
@damus8057 7 месяцев назад
I was trying to follow in python, translating the c++ code in real time. but how can i use the premade code?....... i'm not google translate of coding unfortunately
@BrendanGalea
@BrendanGalea 7 месяцев назад
Maybe try translating with chatgpt? But I think others have done this in python. You could check the discord and ask there (link is on the later video descriptions) Sorry I can’t be more help. Dumb of me to not think of this scenario when I was making these originally. I regret not covering this content
@user-dh8oi2mk4f
@user-dh8oi2mk4f 3 года назад
In the device class, you misspelled glfw as gflw in the function "hasGlfwRequiredInstanceExtensions".
@BrendanGalea
@BrendanGalea 3 года назад
Ahh 🤦‍♂️ I’ll add that to my list of known issues. Mistakes like this become a lot harder to fix in an ongoing video tutorial series. Thanks for letting me know, I appreciate it!
@ch3dsmaxuser
@ch3dsmaxuser 9 месяцев назад
Excelent video. An honest student question, if you already had an lve namespace then why start your class names with Lve, it just could be called lve::Device instead of lve::LveDevice. Am I missing something here?
@bebel9349
@bebel9349 2 года назад
At 6:20, you create a struct that contains info for the pipeline, but isnt there a class that already exists for that, declared in glfw header files? I hope you still read comments :(
@BrendanGalea
@BrendanGalea 2 года назад
I’m not sure what you mean by the glfw header files? The struct declared at 6:20 is to specify configuration info. It’s purpose is to make it so that we can eventually create multiple pipeline objects but with slightly different behaviour as specified by the configuration info. For example one pipeline could be used to draw solid objects, when a second pipeline would be used to draw just the wireframes of an object.
@BrendanGalea
@BrendanGalea 2 года назад
Another way to think of this struct is as a replacement for the arguments to the LvePipeline constructor. Since there are so many configuration options it would be a bit impractical to create a constructor for the class with every argument. So this just cleans up the code a bit.
@bebel9349
@bebel9349 2 года назад
@@BrendanGalea I see, thx for the explanation.
@vadimwillhammer
@vadimwillhammer 2 года назад
the device setup "appendix A" video would be quite welcome, if you have the time to add it. thanks a lot!
@essamsalah829
@essamsalah829 Год назад
sir, why my window background is white not black as yours?, i'm using windows11
@BrendanGalea
@BrendanGalea Год назад
Just the default clear color. In the subsequent tutorials we set the background color each frame so you will be able to set it to black or whatever you wish then!
@homemadetech3776
@homemadetech3776 Год назад
I am doing your tutorial (btw love it so far) and I came across this error: validation layer: vkCreateInstance: Found drivers that contain devices which support the portability subset, but the portability enumeration bit was not set! Applications that wish to enumerate portability drivers must set the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo flags and enable the VK_KHR_portability_enumeration instance extension. validation layer: vkCreateInstance: Found no drivers! How do I fix this?
@Kaivuri8D
@Kaivuri8D Год назад
Try this: 1. On device.cpp VkInstanceCreateInfo struct, after getRequiredExtensions() function call add following: extensions.emplace_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); extensions.emplace_back("VK_KHR_get_physical_device_properties2"); createInfo.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; 2. On device.hpp modify deviceExtensions vector as following: const std::vector deviceExtensions = {VK_KHR_SWAPCHAIN_EXTENSION_NAME, "VK_KHR_portability_subset"};
@turretop5675
@turretop5675 10 месяцев назад
If just like me you are using a Mac with M1 chip, you can define a precompilation variable for this condition that we will use later : In lve_device.hpp #if __APPLE__ #include #if TARGET_OS_MAC #if TARGET_CPU_ARM64 #define __ADD_MOLTEN_VK_CAPABILITY_MAC_ARM64__ #endif #endif #endif And later in the same file change the device extensions vector to const std::vector deviceExtensions = { VK_KHR_SWAPCHAIN_EXTENSION_NAME #ifdef __ADD_MOLTEN_VK_CAPABILITY_MAC_ARM64__ , "VK_KHR_portability_subset" #endif }; In the lve_device.cpp before creating the vk instance (vkCreateInstance), we can change the lines auto extensions = getRequiredExtensions(); createInfo.enabledExtensionCount = static_cast(extensions.size()); createInfo.ppEnabledExtensionNames = extensions.data(); to auto extensions = getRequiredExtensions(); #ifdef __ADD_MOLTEN_VK_CAPABILITY_MAC_ARM64__ extensions.emplace_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); extensions.emplace_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); createInfo.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; #endif createInfo.enabledExtensionCount = static_cast(extensions.size()); createInfo.ppEnabledExtensionNames = extensions.data(); I'm not sure if this is the right condition so that it will only affect m1 macs, but it works for me and I do not have the hardware to test on multiple setup, let me know if it works!
@homemadetech3776
@homemadetech3776 10 месяцев назад
I am sorry but I am using intel
@turretop5675
@turretop5675 10 месяцев назад
@@homemadetech3776 Ok, it is probably just an issue with macs, you could remove the if TARGET_CPU_ARM64 and change the defined variable name to something more significative. Should probably work.
@marcon3907
@marcon3907 3 года назад
7:13 How did you align those parameters (keybinding?) ?
@BrendanGalea
@BrendanGalea 3 года назад
I'm not sure which parameters you're referring to?
@marcon3907
@marcon3907 3 года назад
The parameters of createGraphicsPipeline(...). I'm talking about the code style formatting of a bunch of parameters (= new line for each argument)
@BrendanGalea
@BrendanGalea 3 года назад
Oh it’s still just the order of the arguments. It’s just multiline for formatting to make it more readable
@marcon3907
@marcon3907 3 года назад
@@BrendanGalea Yes I like that. Is there a keybinding or something for this or was it a jump cut in your video? Because you didnt do this manually in the video.
@BrendanGalea
@BrendanGalea 3 года назад
ya that was just my editor. It applies auto-formatting when I save.
@HammerTomahawk
@HammerTomahawk Год назад
Did you ever get a device setup video in more detail?
@BrendanGalea
@BrendanGalea Год назад
No unfortunately not. I’d still recommend reading the chapters on vulkan tutorial at some point as you go. You can do the tutorial series up to where I’ve left off without needing to touch anything there. But if you want to continue on after that yourself it’s definitely worth reading
@trobinsoon
@trobinsoon Год назад
Anyone have any idea why I get an abort() error when trying to run in debug mode but works completely fine in release? I'm thinking it's to do with Vulkan compatibility with visual studio unless I'm missing something obvious. Been through the video twice and I have all the code correct. Any feedback at all is great thanks (:
@DidIJustDoThat
@DidIJustDoThat Год назад
When I run the exe file I have abort() error but when I run it on vs it works fine
@sanalazydov2290
@sanalazydov2290 3 года назад
Great tutorial, thanks! But when i tried to run example to this tutorial, i got assert that pipelineLayout in configInfo is nullptr.
@BrendanGalea
@BrendanGalea 3 года назад
Yup that’s expected at this point!
@sanalazydov2290
@sanalazydov2290 3 года назад
@@BrendanGalea my bad!
@Vinke013
@Vinke013 2 года назад
I have a lot of mistakes : "validation layer : extension VK_KHR_surface has not been enabled", "vkGetPhysicalDeviceSupportKHR not executed!", "a bug in the application"
@BrendanGalea
@BrendanGalea 2 года назад
hmm thats strange, is the program crashing?
@io_inc
@io_inc 3 года назад
I'm really lost. Vulkan is a game engine like unity and unreal?
@BrendanGalea
@BrendanGalea 3 года назад
Not quite, vulkan is an API to communicate with a computer's graphics card. So an engine like unity or unreal could use the vulkan API for things such as rendering. But an engine also handles a lot of other systems beyond just rendering such as audio, physics, ai, animation, input, networking, etc. In this tutorial series we're using vulkan and creating our own basic engine. The initial focus of the series is mostly on rendering.
@multikillgames
@multikillgames 3 года назад
When I compile at the end the validation layer: gives me a bunch of messages.
@multikillgames
@multikillgames 3 года назад
Something like this: tory vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_8bit_storage (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_bind_memory2 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_buffer_device_address (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_copy_commands2 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_create_renderpass2 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_dedicated_allocation (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.3 validation layer: Device Extension: VK_KHR_deferred_host_operations (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.3 validation layer: Device Extension: VK_KHR_depth_stencil_resolve (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_descriptor_update_template (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_device_group (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.4 validation layer: Device Extension: VK_KHR_draw_indirect_count (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_driver_properties (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_external_fence (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_external_fence_win32 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_external_memory (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_external_memory_win32 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_external_semaphore (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_external_semaphore_win32 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_get_memory_requirements2 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_image_format_list (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_imageless_framebuffer (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_maintenance1 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.2 validation layer: Device Extension: VK_KHR_maintenance2 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_maintenance3 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_multiview (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_pipeline_executable_properties (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_pipeline_library (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_push_descriptor (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.2 validation layer: Device Extension: VK_KHR_relaxed_block_layout (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_sampler_mirror_clamp_to_edge (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.3 validation layer: Device Extension: VK_KHR_sampler_ycbcr_conversion (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.14 validation layer: Device Extension: VK_KHR_separate_depth_stencil_layouts (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_atomic_int64 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_clock (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_draw_parameters (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_float16_int8 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_float_controls (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.4 validation layer: Device Extension: VK_KHR_shader_non_semantic_info (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_subgroup_extended_types (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_shader_terminate_invocation (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_spirv_1_4 (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_storage_buffer_storage_class (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_swapchain (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.70 validation layer: Device Extension: VK_KHR_swapchain_mutable_format (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_timeline_semaphore (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.2 validation layer: Device Extension: VK_KHR_uniform_buffer_standard_layout (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_variable_pointers (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_KHR_vulkan_memory_model (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.3 validation layer: Device Extension: VK_KHR_win32_keyed_mutex (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_EXT_4444_formats (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_EXT_blend_operation_advanced (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.2 validation layer: Device Extension: VK_EXT_buffer_device_address (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.2 validation layer: Device Extension: VK_EXT_calibrated_timestamps (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_EXT_conditional_rendering (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.2 validation layer: Device Extension: VK_EXT_conservative_rasterization (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.1 validation layer: Device Extension: VK_EXT_custom_border_color (C:\Windows\System32\DriverStore\FileRepository vmii.inf_amd64_ea7416dfc07162e7\. voglv64.dll) version 0.0.12
@BrendanGalea
@BrendanGalea 3 года назад
haha I didn't know yt comments could be that long! You're using windows right? In the LveDevice.cpp file at around line ~219 you can remove VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT The verbose level messages don't mean you're doing anything wrong and can clutter up the console.
@multikillgames
@multikillgames 3 года назад
@@BrendanGalea Ya that would make things easier i realized that when i read it. Thank you. Also Didn't know youtube messages could be that long either lmao
@HolyGarbage
@HolyGarbage 3 года назад
@@multikillgames Keep in mind this is only printed when building in Debug mode. The device class checks NDEBUG and enables some more stuff to be printed.
@coderflower
@coderflower Год назад
You have a MacBook Pro 13" i5 from 2017 either 3.3 or 3.5, am i correct?
@BrendanGalea
@BrendanGalea Год назад
Correct!
@xayler328
@xayler328 3 года назад
I'm not exactly sure why, but visual studio gave me a syntax error when VkInstance is declared. I managed to fix that including "vulkan/vulkan.h" at the top of the file. Idk if I'm doing it the right way. Also thank you so much for the helpful tutorials.
@BrendanGalea
@BrendanGalea 3 года назад
i might have been relying on it being declared in some other file that was being included, glad you found the solution. That is a good way to do it and typically it's good practice to include anything you are using directly, rather than relying on it being included indirectly as I may have done.
@kadeska2386
@kadeska2386 Год назад
@@BrendanGalea I also needed to add #include "vulkan/vulkan.h" to both device files for it to work
@Shineglow
@Shineglow 6 месяцев назад
Hello! Why VKAPI_ATTR, VkDebugUtilsMessageSeverityFlagBitsEXT and other VK structs and macros highlighted in red? Can't find answer in google(
@Shineglow
@Shineglow 6 месяцев назад
This applies to newly added files. The code from the previous tutorials works fine.
@Shineglow
@Shineglow 6 месяцев назад
The IDE claims that these types are not defined
@Shineglow
@Shineglow 6 месяцев назад
I fix it, with including: #include #include but i don't understand why i should include it manualy.
@Shineglow
@Shineglow 6 месяцев назад
I find another error in my project linked with includes. And apparently it's the structure of the include folder in the vulkan SDK, because after I manually added vulkan.h I no longer need the previous fixes.
@Shineglow
@Shineglow 6 месяцев назад
This is the final part of my diary. I was so stupid. I must define #define GLFW_INCLUDE_VULKAN, but define this: #define GLFW_VULKAN_INCLUDE
@xiaowenli9168
@xiaowenli9168 9 месяцев назад
goole drive link has failed, please update it
@JS-rp4pq
@JS-rp4pq 3 года назад
I'm using VSCode and after coping the files over and changing the namespaces and prefixes with find/replace I'm still getting many errors specifically in places that are being templemented for example: (In the .hpp file) "std::vector presentMode" The VkPresentModeKHR is what has the error on it, For the .cpp file its even weirder giving me errors on "std::" specifically even though iostream is included quite odd, any ideas why this may happen? I'ma keep working on it just curious if anyone else has had similar happen! Specifically the error is that those things are not defined The glfwCreateWindowSurface also isn't defined when I attempt to use it in my window class implementation 3:15
@JS-rp4pq
@JS-rp4pq 3 года назад
No need to reply it was simply a typo in my " #define GLFW_INCLUDE_VULKAN #include " I had #define GLFE_INCLUDE_VULKAN simple typo, thanks for the videos they've been great so far! :D
@stevechung6130
@stevechung6130 3 года назад
I like your tutorial, it is more easier to understand than others. I met a problem in device.cpp: createInstance() if (enableValidationLayers && !checkValidationLayerSupport()) { throw std::runtime_error("validation layers requested, but not available!"); } It throw runtime error here evertime. Irun in visual studio 2019, x64 Vulkan version is 1.2.170.0. Vulkan should be installed correctly , because vkcube.exe was runnig like yours. I try clean the project and bind again, but still the same issue
@BrendanGalea
@BrendanGalea 3 года назад
I'm not really sure but there are a couple things we could try. It is possible that vulkan was installed correctly but for some reason the validation layers extension was not. Maybe try re-installing vulkan and see if that works. Make sure to install the SDK rather than just the runtime. It could also be a driver issue, you could try updating you graphics card drivers if you haven't recently and that could fix the issue. If those don't work let me know and we can keep looking for a solution, because debugging without validation layers would be a bit of a nightmare.
@etiennep.1593
@etiennep.1593 3 года назад
@@BrendanGalea Hey, I got the same issue with the throw std::runtime_error("validation layers requested, but not available!"); My Vulkan version is 1.2.162.1 and I am on MacOS. I have already clean all the project file, reinstall SDK and headers but it didn't change anything. Any thought ? PS: Huge thanks for this tutorial it rocks ;)
@BrendanGalea
@BrendanGalea 3 года назад
@@etiennep.1593 in your vulkansdk/Applications folder try running the vulkaninfo application. It should open a terminal and output a bunch of information. Do you see something like Layers: count = 9 ================= You should have a non-zero number of layers.
@etiennep.1593
@etiennep.1593 3 года назад
@@BrendanGalea Hey. I have checked that and it doesn't return me a count but an error... Here it is: ERROR: [Loader Message] Code 0 : loader_get_json: Failed to open JSON file /usr/local/Caskroom/vulkan-sdk/1.2.162.1/macOS/etc/vulkan/icd.d/MoltenVK_icd.json ERROR at /Users/lunarg/Dev/macos-sdk-build/Vulkan-Tools/vulkaninfo/vulkaninfo.h:668:vkCreateInstance failed with ERROR_INITIALIZATION_FAILED Saving session...completed. I have tried to reinstall MoltenVK with brew but it doesn't changed anything. It looks that the "/usr/local/Caskroom/vulkan-sdk/1.2.162.1/macOS/etc/" directory didn't exist... Even if I reinstall all SDK. EDIT: OK, I greped the JSON file and found it. The /etc/ dir was called "share" IDK why... I rename it and it looks better now. But I got an other problem... When I try to execute the programme, it can't create window surface. Here are logs: ./executable validation layer: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /Users/etienne/Documents/Vulkan/vulkan/implicit_layer.d:/etc/xdg/vulkan/implicit_layer.d:/Users/lunarg/Dev/macos-sdk-build/Vulkan-Loader/build/install/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/Users/etienne/.local/share/vulkan/implicit_layer.d validation layer: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /usr/local/Caskroom/vulkan-sdk/1.2.162.1/macOS/etc/vulkan/explicit_layer.d validation layer: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /usr/local/Caskroom/vulkan-sdk/1.2.162.1/macOS/etc/vulkan/icd.d/MoltenVK_icd.json validation layer: Searching for ICD drivers named /usr/local/lib/libMoltenVK.dylib validation layer: Build ICD instance extension list validation layer: Instance Extension: VK_KHR_device_group_creation (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_external_fence_capabilities (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_external_memory_capabilities (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_external_semaphore_capabilities (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_get_physical_device_properties2 (/usr/local/lib/libMoltenVK.dylib) version 0.0.2 validation layer: Instance Extension: VK_KHR_get_surface_capabilities2 (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_surface (/usr/local/lib/libMoltenVK.dylib) version 0.0.25 validation layer: Instance Extension: VK_EXT_debug_report (/usr/local/lib/libMoltenVK.dylib) version 0.0.9 validation layer: Instance Extension: VK_EXT_debug_utils (/usr/local/lib/libMoltenVK.dylib) version 0.0.2 validation layer: Instance Extension: VK_EXT_metal_surface (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_EXT_swapchain_colorspace (/usr/local/lib/libMoltenVK.dylib) version 0.0.4 validation layer: Instance Extension: VK_MVK_macos_surface (/usr/local/lib/libMoltenVK.dylib) version 0.0.3 validation layer: Instance Extension: VK_MVK_moltenvk (/usr/local/lib/libMoltenVK.dylib) version 0.0.29 validation layer: Loading layer library /usr/local/lib/libVkLayer_khronos_validation.dylib validation layer: Build ICD instance extension list validation layer: Instance Extension: VK_KHR_device_group_creation (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_external_fence_capabilities (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_external_memory_capabilities (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_external_semaphore_capabilities (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_get_physical_device_properties2 (/usr/local/lib/libMoltenVK.dylib) version 0.0.2 validation layer: Instance Extension: VK_KHR_get_surface_capabilities2 (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_KHR_surface (/usr/local/lib/libMoltenVK.dylib) version 0.0.25 validation layer: Instance Extension: VK_EXT_debug_report (/usr/local/lib/libMoltenVK.dylib) version 0.0.9 validation layer: Instance Extension: VK_EXT_debug_utils (/usr/local/lib/libMoltenVK.dylib) version 0.0.2 validation layer: Instance Extension: VK_EXT_metal_surface (/usr/local/lib/libMoltenVK.dylib) version 0.0.1 validation layer: Instance Extension: VK_EXT_swapchain_colorspace (/usr/local/lib/libMoltenVK.dylib) version 0.0.4 validation layer: Instance Extension: VK_MVK_macos_surface (/usr/local/lib/libMoltenVK.dylib) version 0.0.3 validation layer: Instance Extension: VK_MVK_moltenvk (/usr/local/lib/libMoltenVK.dylib) version 0.0.29 available extensions: VK_KHR_device_group_creation VK_KHR_external_fence_capabilities VK_KHR_external_memory_capabilities VK_KHR_external_semaphore_capabilities VK_KHR_get_physical_device_properties2 VK_KHR_get_surface_capabilities2 VK_KHR_surface VK_EXT_debug_report VK_EXT_debug_utils VK_EXT_metal_surface VK_EXT_swapchain_colorspace VK_MVK_macos_surface required extensions: VK_KHR_surface VK_EXT_metal_surface VK_EXT_debug_utils libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: failed to create window surface [1] 16229 abort ./executable If i comment the throw instruction, that tell me that: vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported) returns VkResultvalidation layer: Validation Error: [ UNASSIGNED-GeneralParameterError-RequiredParameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x99fb7dfd | vkGetPhysicalDeviceSurfaceSupportKHR: required parameter surface specified as VK_NULL_HANDLE validation layer: Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x801f247e | Invalid VkSurfaceKHR Object 0x0. The Vulkan spec states: surface must be a valid VkSurfaceKHR handle. Seems that i got a problem with the surface...
@BrendanGalea
@BrendanGalea 3 года назад
Sorry!! I didn't see this reply. Is this still not working? Can you check the output of glfwCreateWindowSurface in the window implementation? Make sure in the initWindow function you have the line glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
@leocomerford
@leocomerford Год назад
The full series of tutorial videos: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Y9U9IE0gVHA.html
@billymays8864
@billymays8864 Год назад
prolly would've been better off writing it instead tbh, trying to do this with SDL instead of GLFW and process is it bit more frustrating converting code to be compatible.
@tweetyguy7347
@tweetyguy7347 Месяц назад
What was the purpose of using SDL? Why try and use it over GLFW?
@billymays8864
@billymays8864 Месяц назад
@@tweetyguy7347 sdl is not only the standard for engines but more powerful than glfw in terms of its features. Im also more familiar with it since ive been using sdl for around 4+ years
@HolyMethWizard
@HolyMethWizard 3 года назад
I love Vulkan besides setting up validation layers. they create many problems for me.
@BrendanGalea
@BrendanGalea 3 года назад
Ya unfortunately that is not all to uncommon. In the vulkanSDK/x86_64/bin folder you could try using the vkconfig program. Running that in the background has worked for some viewers if you really can't get the validation layers working.
@HolyMethWizard
@HolyMethWizard 3 года назад
@@BrendanGalea thank you for the suggestion I'll try that.
@KookoCraft
@KookoCraft 2 года назад
C++ is pretty based
@kvbc5425
@kvbc5425 Год назад
only 10k subs?!?
@PeterWraaeMarino
@PeterWraaeMarino Год назад
this fails totally on windows. macros and types are undefined. something is missing.
@PeterWraaeMarino
@PeterWraaeMarino Год назад
I do not know if I missed this is one of your previous videos, but you need to add #define GLFW_INCLUDE_VULKAN in the lve_window.h
@dmaster20ify
@dmaster20ify 11 месяцев назад
Creating a Cpp class is a fucking chore. You have to create 6 object lifetime functions. The dawn implicit move and assignement functions don't do what they are suppose to do.
@Juan-jc6oc
@Juan-jc6oc 2 года назад
In file included from lve_device.cpp:1: lve_device.hpp:33:15: error: ‘LveWindow’ has not been declared 33 | LveDevice(LveWindow::LveWindow &window); lve_device.hpp:33:39: error: expected ‘)’ before ‘&’ token 33 | LveDevice(LveWindow::LveWindow &window); lve_device.hpp:96:3: error: ‘LveWindow’ does not name a type 96 | LveWindow &window; lve_device.cpp:50:25: error: expected constructor, destructor, or type conversion before ‘(’ token 50 | LveDevice::LveDevice(LveWindow &window) : window{window} { lve_device.cpp:50:64: error: expected unqualified-id before ‘{’ token 50 | LveDevice::LveDevice(LveWindow &window) : window{window} { lve_device.cpp: In member function ‘void lve::LveDevice::createSurface()’: lve_device.cpp:196:37: error: ‘window’ was not declared in this scope 196 | void LveDevice::createSurface() { window.createWindowSurface(instance, &surface_); }
@BrendanGalea
@BrendanGalea 2 года назад
sorry for the slow reply, any luck figuring this out? For debugging-help you can try posting in that group on the discord discord.gg/CUQkuKsszr, Myself or somebody else is usually pretty quick to respond
@urisinger3412
@urisinger3412 Год назад
why are you not useing github
@BrendanGalea
@BrendanGalea Год назад
I am using GitHub? Or do you mean for the pastebin… lol that’s a good point, mainly because I record the videos before committing to git but I could make it work. Thanks for the feedback!
@devilbager
@devilbager 3 месяца назад
The problem with this tutorial is that this is a Vulkan tutorial. Although this series is most likely completed, I wanted to point out that what makes copying code so bad is that it's defeating the entire purpose of Vulkan, by copying code which is integral to Vulkan and what actually makes Vulkan it's own. The main goal of Vulkan is not to render a cube, this could be done with OpenGL or any other API, but what makes Vulkan different from an OpenGL tutorial is it's verbose low level design like setting up a logical device, etc. You can't learn a language like Spanish by using google translate. Of course this is just my opinion but again the viewers should not be dependent on downloaded code that they don't understand as beginners, which should have been the main talking points of this tutorial. Anyways that's my only issue with it, I do really like the quality of this series and how beginner friendly it is (excluding the copying).
@BrendanGalea
@BrendanGalea 2 месяца назад
Thanks for the honest critical feedback. I agree with what you’re saying. However if I was to do this again I would do it in the same way. I want to build up more of the surrounding context around renderpasses, framebuffers, etc where the tutorials covering each of these topics can really go into the proper depth, before going back and then going over the swap chain and device code. When I was first writing the tutorials for the device and swap chain code it was just information overload so I scrapped them and went the other direction. So hopefully in about 4ish months when I have a chance to start making videos again there will be just a few more topics covered before we finally go back to rewrite the swap chain and device code
@PeterWraaeMarino
@PeterWraaeMarino Год назад
downloading code,.. you almost lost me there
@Kaivuri8D
@Kaivuri8D Год назад
If you are having validation layer errors with Mac M1, try the following in replies (since youtube for some reason deletes my comment).
@tejedaAlex
@tejedaAlex 2 года назад
Great videos, but throwing code out of the blue that does x, y and z and change a, b and c to make it work it is a little bit discouraging, I'll continue with the videos left no matter what. As a suggestion, for the 3 initial videos, spending more time on the device setup code would have been more useful than the time spent explaining how to read a file or basic c++ stuff, in my opinion, people who already have knowledge in c++ should already known how to find the compiler and modify the makefile and whatnot, having a class diagram, since we are using classes, would have been useful too, take this as a constructive opinion, I'm already subscribed to your channel, thanks.
@BrendanGalea
@BrendanGalea 2 года назад
Thank you, I appreaciate the honest feedback! The main reasoning I avoided spending much time on the device setup code was I wanted to avoid just re-treading material on vulkan-tutorial.com, and also felt like its a lot of information to take in, and without some more context the later tutorials provide, is difficult to understand. But ya... honestly I'd really like to completely re-do the first 5 tutorials if I could, especially now that Vulkan 1.3 has been released which would drastically simplify the swap chain code to the point where I could have covered it from the start. As for all the other points you brought up, noted and I agree. I'll keep that in my when making future tutorials. Thanks again!
@herohiralal3255
@herohiralal3255 2 года назад
you sound a bit like joseph anderson
Далее
ALL IT TAKES... A Vulkan Story
29:10
Просмотров 128 тыс.
Старый Дим Димыч вернулся😱
00:16
GDC 2018   Getting explicit How Hard is Vulkan really
1:01:03
Realtime 2D Gravity Simulation
12:31
Просмотров 405 тыс.
2D Game Engine by 13-YEAR-OLD! // Code Review
27:36
Просмотров 261 тыс.
Weak Pointers in C++ (std::weak_ptr)
17:25
Просмотров 43 тыс.
Making my Voxel Engine Really Fast
5:41
Просмотров 136 тыс.
BEST WAY to make Desktop Applications in C++
26:00
Просмотров 897 тыс.