Commit graph

22 commits

Author SHA1 Message Date
Pedro J. Estébanez 7b7e17a626 Upgrade Vulkan memory allocator 2021-08-13 00:05:41 +02:00
Rémi Verschelde 554312a3b2
Android: Use volk instead of NDK Vulkan headers
We no longer build the Vulkan loader, and volk lets us load it dynamically.
Roblox uses volk on Android so it should work well for us too.
2021-08-12 23:39:30 +02:00
bruvzg d7957a2a20 Use "volk" instead of statically linked Vulkan loader. 2021-08-12 14:25:15 +03:00
bruvzg 53f84e39fd Fix MoltenVK static linking on macOS (add missing include path, Vulkan SDK path option, use xcframework instead of static framework). 2021-07-22 16:29:24 +03:00
Rémi Verschelde c7b53c03ae
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
2020-12-18 10:29:34 +01:00
Rémi Verschelde 6a951267ae
vulkan: Backport build fix for MinGW-w64 8.0.0
Taken from https://github.com/KhronosGroup/Vulkan-Loader/pull/475.

Supersedes and reverts #43119 since the upstream change removes the need for
that custom define.
2020-10-29 12:47:35 +01:00
K. S. Ernest (iFire) Lee b2d5b619fd Changes for 43094 mingw llvm build error. 2020-10-26 19:58:44 -07:00
Rémi Verschelde 148ad49c93
vulkan: Sync loader, headers and glslang to sdk-1.2.154.0
Actually sdk-1.2.154.1 for Vulkan-Loader.

glslang is updated to bacaef3237c515e40d1a24722be48c0a0b30f75f which is the
known-good version for Vulkan-ValidationLayers 1.2.154.0.

COPYRIGHT.txt was synced with the current version of the glslang LICENSE.txt,
and `glslang/register_types.cpp` now uses the upstream definition for its
default builtin resource instead of hardcoding it.
2020-10-15 12:29:42 +02:00
Rémi Verschelde 3b340985cc SCons: Support linking system Vulkan loader while using vendored VMA 2020-07-26 13:20:08 +02:00
Sergey Minakov fe60815d66 iOS SCons: static Vulkan binary usage
Add VMA to iphone platform Use linkflag for iphone building to enforce static linking. Works fine with dynamic '.framework' library
Updated xcode project to use '.a' static library
2020-07-25 21:55:25 +02:00
PouleyKetchoupp 802bbe87ad Fix extra warnings in Android build 2020-04-10 11:06:11 +02:00
PouleyKetchoupp e167af3737 Display Server support 2020-04-08 01:47:09 +02:00
PouleyKetchoupp af424b1c7c Vulkan rendering for Android 2020-04-03 11:18:59 +02:00
Rémi Verschelde cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00
Juan Linietsky f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Sam Green 06d7316419 Add iphone to vulkan drivers SCsub 2020-02-21 22:00:48 -08:00
Rémi Verschelde 79a7be6e7d Vulkan-Loader: Mark secure_getenv as available on Linux
It's a GNU extension part of glibc since 2.17, and it was also added
recently to musl libc. It doesn't seem to be available on *BSD (but
also not used there by Vulkan-Loader).

Could be made more thorough by doing a test compilation of a file to
check for the existence of the function on the host system, but unless
we run into actual issues, that's likely overkill.
2020-02-14 15:32:04 +01: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
bruvzg 7bf72ed14e Update Vulkan loader to 1.1.127 2020-02-11 12:05:27 +01:00
Rémi Verschelde 511f65214f SCons: Streamline Vulkan buildsystem + fixups
- Renamed option to `builtin_vulkan`, since that's the name of the
  library and if we were to add new components, we'd likely use that
  same option.
- Merge `vulkan_loader/SCsub` in `vulkan/SCsub`.
- Accordingly, don't use built-in Vulkan headers when not building
  against the built-in loader library.
- Drop Vulkan registry which we don't appear to need currently.
- Style and permission fixes.
2020-02-11 11:59:04 +01:00
Juan Linietsky 4fe3ee1730 Moved the shader source compilation code outside RenderingDevice and Vulkan 2020-02-11 11:53:29 +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