This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
Image staging and memory type lookups for cross vendor support #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the major PR containing everything necessary to have the demo run on hardware from different vendors. I have successfully tested this with NVIDIA and AMD on recent Vulkan drivers.
Note that I don't have a windows setup with an Intel GPU to test this on (my ultrabook with Haswell only runs Ubuntu), so you may want to test and make sure that it still works on Intel with these changes. From the experience with my samples (that also run on Intel under Linux) these changes should not break anything, but better check before a merge 馃槈
The major changes to get this working :
Use staging
Most GPUs have very limited support for linear tiled images. So this example uses optimal tiled images and copies the image data over from a buffer. This should work on all vendors.
Lookup memory type indices
Not all vendors offer a device local memory type at index 0, so the memory type index will be passed to all VKU_Alloc_Image_Object calls to make sure the right memory type index for the given memory property bits is selected.
Note that I haven't updated the .exe, I'll leave that up to you if everything looks okay from your side 馃憤