Commit Graph

78 Commits

Author SHA1 Message Date
qarmin 2ab4b054e0 Fixes leaks with Vulkan device and instance 2020-04-14 20:15:48 +02:00
Rémi Verschelde 61342e5831 Vulkan: Use VK_NULL_HANDLE for handles, fixes 32-bit builds
Some Vulkan types are defined as "non dispatchable handles" and use a
different typedef on 32-bit and 64-bit systems (struct pointer on
64-bit, `uint64_t` otherwise).

0e78ffd1dc/include/vulkan/vulkan_core.h (L59-L65)

Contrarily to `NULL`, `nullptr` can't be converted to `uint64_t` so
build was now failing on 32-bit after converting the codebase from
using `NULL` to `nullptr`.

Fixes #37620.
2020-04-06 10:21:32 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Rémi Verschelde f70b5fa30c Revert "Enhanced physical device selection to use device type and available memory in relation to issue #35397"
This reverts commit 4f3006e5ac.
2020-03-10 08:58:34 +01:00
Haoyu Qiu 46230d253b Initializes VulkanContext::queue_props to NULL 2020-03-10 14:36:39 +08:00
Rémi Verschelde 3625b057af Vulkan: Use Godot print macros matching MessageSeverity flag
Otherwise any verbose/info/warning debug message from Vulkan would
raise an error, confusing users about the severity of the message.

Cf. #36185, #36790.
2020-03-04 15:02:49 +01:00
Rémi Verschelde 98f88a4102
Merge pull request #36585 from disks86/master
Enhanced physical device selection
2020-03-04 13:00:52 +01:00
Haoyu Qiu 771e66b080 Adds null check of pMessageIdName 2020-02-29 18:26:38 +08:00
Christopher Joseph Dean Schaefer 4f3006e5ac Enhanced physical device selection to use device type and available memory in relation to issue #35397 2020-02-28 21:02:29 -05:00
Rémi Verschelde 3a7f1300ee
Merge pull request #36186 from Calinou/remove-vulkan-debugging-prints
Remove Vulkan debugging prints
2020-02-27 21:11:24 +01:00
Rémi Verschelde e596439497 Vulkan: Work around false positive on 64-bit Linux w/ 32-bit ICDs
In the vast majority of cases, this will be a false positive error
thrown by Vulkan-Loader when a Linux system has Vulkan ICDs for both
32-bit and 64-bit. The error is of the form:
```
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
```

The loader dlopen's the 32-bit ICDs first, raises this error, and then
happily goes on to try and use the 64-bit ICDs.

Upstream report: https://github.com/KhronosGroup/Vulkan-Loader/issues/262

Fixes #36185.
2020-02-22 15:32:20 +01:00
Marcel Admiraal 529f924aaa Fix VisualStudio throwing multiple C4996 warnings in vulkan_context.cpp.
Use Godot's String to concatenate C-strings instead of strcat and sprintf,
which are unsafe, because they don't check for buffer overflows.
2020-02-18 12:35:59 +01:00
Rémi Verschelde d2537407ef Fix various GCC compilation warnings after Vulkan merge
Part of #36132.
2020-02-14 10:02:31 +01:00
Hugo Locurcio 71b74195de
Remove Vulkan debugging prints 2020-02-13 18:50:07 +01:00
Haoyu Qiu a23a52db3f Fixes some memory leaks 2020-02-13 09:46:13 +08:00
Rémi Verschelde db81928e08 Vulkan: Move thirdparty code out of drivers, style fixes
- `vk_enum_string_helper.h` is a generated file taken from the SDK
  (Vulkan-ValidationLayers).
- `vk_mem_alloc.h` is a library from GPUOpen:
  https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-02-11 14:08:44 +01:00
Juan Linietsky 561b431d85 Dynamic object support for GI Probes (a bit buggy still) 2020-02-11 12:03:52 +01:00
Juan Linietsky 6ee2f5e6b6 More GIProbe work and fixes 2020-02-11 12:03:49 +01:00
Juan Linietsky acf0f6c8a7 GIProbes working. 2020-02-11 12:03:20 +01:00
Juan Linietsky 2d6a916835 Environment sky more or less working. 2020-02-11 12:01:05 +01:00
bruvzg eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky 8bbbb97336 Completed material/2D shader support (missing SCREEN_TEXTURE) 2020-02-11 11:53:29 +01:00
Juan Linietsky ef083a583b Modified light rendering to make it more compatible.
Modified polygon management to make it more compatible with MoltenVK
2020-02-11 11:53:28 +01:00
Juan Linietsky e3905f9af3 Added ability to retrieve back textures stored on GPU 2020-02-11 11:53:28 +01:00
Juan Linietsky 1b4281b895 basic 2D engine is more or less working with Vulkan, including editor.
Still a lot to do
2020-02-11 11:53:27 +01:00
Juan Linietsky 42b44f43ee Basic 2D engine is more or less working, needs more work for editor to be usable. 2020-02-11 11:53:27 +01:00
Juan Linietsky fd188ddd51 Initial work on Vulkan:
-Added VulkanContext
-Added an X11 implementation
-Added a rendering device abstraction
-added a Vulkan rendering device abstraction
-Engine does not work, only shows Godot logo (run it from bin/)
2020-02-11 11:53:26 +01:00