Commit Graph

216 Commits

Author SHA1 Message Date
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
f8ef38efed Add proper type to most public API uses of Array 2020-04-21 12:16:45 -03:00
ae09b55a19 Exposed RenderingDevice to script API
Also added an easier way to load native GLSL shaders.

Extras:

Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload.

Note:

The precommit hooks are broken because they don't seem to support enums from one class being used in another.
Feel free to fix this after merging this PR.
2020-04-20 21:21:58 -03:00
49d0c6a5c9 Ability to create local RenderingDevice instances. 2020-04-18 21:47:17 -03:00
943ec79859 Fixes leaks in ResourceCache, Vulkan and X11 2020-04-15 10:27:57 +02:00
5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
a57dc398db Implement MSAA 2020-04-12 15:33:57 -03:00
9dc19f7619 Merge pull request #37808 from reduz/port-effects-to-compute
Moved most of the effect code to compute.
2020-04-11 23:38:05 -03:00
d81911490b Moved most of the effect code to compute.
Simplifies it and improves performance.
Improves image barrier handling per mipmap on RenderingDeviceVulkan
2020-04-11 19:44:07 -03:00
d06f8ef75a Shows proper scene render time in editor info
Also fixed GPU profiler, which was not working on nvidia hardware.
2020-04-10 14:19:30 -03:00
23d786d6fb Merge pull request #36919 from nekomatata/android-vulkan-rendering
Vulkan rendering support on Android
2020-04-09 00:16:26 +02:00
e167af3737 Display Server support 2020-04-08 01:47:09 +02:00
597ec5dbf8 Merge pull request #37586 from qarmin/vulkan_allocator_leak
Fix leak with Vulkan allocator
2020-04-07 09:16:02 +02:00
befbdda7f2 Merge pull request #37635 from qarmin/leak_vertex
Fixed leak with vertex_formats
2020-04-06 21:32:25 +02:00
f4301b7259 Fixed leak with vertex_formats 2020-04-06 18:07:31 +02:00
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
a0832e6f5e Fix leak with Vulkan allocator 2020-04-04 20:16:48 +02:00
af424b1c7c Vulkan rendering for Android 2020-04-03 11:18:59 +02:00
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
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
cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
d99bea20dc More explicit error messages when vulkan calls return errors 2020-03-09 13:25:54 +01:00
a0e33e17fb Merge pull request #36733 from qarmin/static_analyzer_fixes
Fixes bugs found by Sonarcloud and Coverity
2020-03-04 13:41:38 +01:00
c933eb7acc Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assert 2020-03-04 04:44:47 -03:00
1f209bfc41 Fixes bugs found by Sonarcloud and Coverity 2020-03-02 19:17:20 +01:00
54dfdd1cdb Correct condition wrongly converted to ERR_FAIL_COND_MSG
Fixes debugging of giprobes not working, likely other stuff
2020-02-22 11:36:26 -03:00
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
d2537407ef Fix various GCC compilation warnings after Vulkan merge
Part of #36132.
2020-02-14 10:02:31 +01:00
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
bd364d1447 Auto exposure re-implemented in Vulkan 2020-02-11 12:14:23 +01:00
da0457fa29 Several fixes to GIProbes 2020-02-11 12:04:56 +01:00
2af701fa03 Use a different strategy to get textures from GPU (via buffers), for more compatibility. 2020-02-11 12:04:54 +01:00
d5df1b651c Improve HiDPI handling, fix incorrect window viewport clipping. 2020-02-11 12:04:04 +01:00
561b431d85 Dynamic object support for GI Probes (a bit buggy still) 2020-02-11 12:03:52 +01:00
6ee2f5e6b6 More GIProbe work and fixes 2020-02-11 12:03:49 +01:00
965185c765 Better GIProbe quality settings. 2020-02-11 12:03:23 +01:00
acf0f6c8a7 GIProbes working. 2020-02-11 12:03:20 +01:00
263bebe023 Untested support for compute shaders 2020-02-11 12:02:34 +01:00
123ee5995c Visual GPU profiler and related profiling support in Vulkan. 2020-02-11 12:01:26 +01:00
6deffa62fb Several fixes to 3D rendering, and multimesh implementation. 2020-02-11 12:01:22 +01:00
920db604d2 Rewrote large part of rendering, omni and spot shadows now work. 2020-02-11 12:01:18 +01:00
2d6a916835 Environment sky more or less working. 2020-02-11 12:01:05 +01:00
8cee7703a6 Yay very basic 3D (only white) finally shows. 2020-02-11 11:59:27 +01:00
449df8f688 Base 3D engine done, still untested, though. 2020-02-11 11:59:25 +01:00
6289e7d147 Merge pull request #29993 from bruvzg/vulkan
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11 11:57:40 +01:00
b456bfad5c Add runtime GLES2 / Vulkan context selection. 2020-02-11 11:57:34 +01:00
eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
4fe3ee1730 Moved the shader source compilation code outside RenderingDevice and Vulkan 2020-02-11 11:53:29 +01:00