Commit graph

180 commits

Author SHA1 Message Date
Bastiaan Olij
90ef5d73c4 Cleanup vulkan capabilities check and add multiview check 2021-05-06 12:06:07 +10:00
Hugo Locurcio
bf7c4da804
Tweak warning messages related to leaked RIDs
- Use hardcoded pluralization for messages.
  - Since these messages are English-only, it's fine to hardcode it.
- Use double quotes for consistency with other messages.
2021-05-03 16:05:38 +02:00
Rémi Verschelde
5b16020846
Replace remaining uses of NULL with nullptr
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-29 11:53:27 +02:00
Rémi Verschelde
8247667a3e
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
Szymon Majewski
0a29322991 Validation layers on Android 2021-04-12 10:09:06 -07:00
Rémi Verschelde
9e8acb3897
Merge pull request #47640 from BastiaanOlij/fix_vulkan_format
Chose format from supported ones that we support
2021-04-05 14:55:32 +02:00
Bastiaan Olij
ceebe4b565 Chose format from supported ones that we support 2021-04-05 22:39:17 +10:00
Rémi Verschelde
9bbe51dc27
Style: Apply clang-tidy's modernize-use-nullptr 2021-04-05 14:05:07 +02:00
Szymon Majewski
1328208063 Removed debug code 2021-04-01 20:09:48 -07:00
Rémi Verschelde
8621c86f4d
Merge pull request #47283 from Panquesito7/fix_lgtm_alerts
fix: 3 LGTM alerts/warnings
2021-03-31 18:52:04 +02:00
David Leal
a31626ae0b
fix: 3 LGTM alerts/warnings 2021-03-31 10:34:40 -06:00
Rémi Verschelde
9cd1e50969
Merge pull request #47250 from BastiaanOlij/check_vulkan_version
Obtain supported Vulkan API
2021-03-31 13:45:43 +02:00
Szymon Majewski
c3de4aeb75 WIP: Add support for VK_EXT_debug_report in Vulkan 2021-03-30 10:18:16 -07:00
Bastiaan Olij
a6c989bc1b Obtain supported Vulkan API 2021-03-26 12:06:57 +11:00
Anshul7sp1
91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
Rafał Mikrut
f9d0ea9f6b Fix memory leak in VulkanContext 2021-03-07 15:28:47 +01:00
reduz
33278b0721 Fixes to get Godot running again on Intel IGP
-Fixed strange bug with shadowed instance_param (this should not have worked anywhere, odd..)
-Cleaned up barrier usage further.
2021-02-05 00:02:06 -03:00
reduz
f20999f6fe Rewrote how barriers work for faster rendering
-Added more finegrained control in RenderingDevice API
-Optimized barriers (use less ones for thee same)
-General optimizations
-Shadows render all together unbarriered
-GI can render together with shadows.
-SDFGI can render together with depth-preoass.
-General fixes
-Added GPU detection
2021-02-04 09:42:28 -03:00
bruvzg
7be7e87ff3
Always init DEBUG_UTILS_MESSENGER_CREATE_INFO structure if DEBUG_UTILS functions are used. Add temporary variables to fix potential use-after-free. 2021-02-02 11:27:47 +02:00
Rémi Verschelde
96bcaadbf2
Merge pull request #45476 from qarmin/add_temp_variable
Add temporary variable to not use freed memory
2021-01-26 17:14:46 +01:00
reduz
280f334f81 Reorganize RenderingDevice barriers
-Removed sync to draw, now everything syncs to draw by default.
-Fixed many validation layer errors.
-Added support for VkImageViewUsageCreateInfo to fix validation layer warnings.
-Texture, buffer, raster and compute functions now all allow spcifying which barriers will be used.
2021-01-26 10:24:12 -03:00
Rafał Mikrut
b80c502c2c Add temporary variable to not use freed memory 2021-01-26 13:41:42 +01:00
clayjohn
7323cbab4b Add named resources and debug labels in RenderDoc 2021-01-25 20:04:13 -08:00
reduz
a9beb7aa8c Shadow map rendering optimization
-All shadow rendering is done with raster now (no compute)
-All shadow rendering is done by rendering directly to the shadow atlas
-Improved how buffer clearing is done to optimize the above.
-Ability to set shadows as 16 bits.
2021-01-24 20:17:28 -03:00
reduz
099dee35f4 Added GPU based cluster builder
Clustering is now GPU based, uses an implementation based on the Activision algorithm.
2021-01-19 23:31:06 +01:00
Rémi Verschelde
07e89131c6
spirv-reflect: Update to upstream commit c0ce03a (Jan 6, 2021) 2021-01-08 14:30:44 +01:00
reduz
77bc3e9ac3 Threaded optimizations to cull and render
-Reorganize thread work pool for rendering
-Fixes to make secondary command buffers to work (disabled because they need more testing)
2021-01-05 08:50:18 -03:00
Rémi Verschelde
00f5ea2ed2
Merge pull request #44842 from clayjohn/VULKAN-SSAO-2
SSAO renames and move push constant binding
2021-01-04 23:03:54 +01:00
clayjohn
0015260c4b SSAO cleanup and fixes 2021-01-03 21:32:22 -08:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
clayjohn
44f8922305 Port ASSAO to Godot to replace SAO 2020-12-21 23:08:59 -08:00
Rémi Verschelde
e9d12f9e4e
Merge pull request #44521 from madmiraal/rename-rect2-clip
Rename Rect2 and Rect2i clip() to intersection()
2020-12-19 21:32:14 +01:00
reduz
666d5f3431 Fix error spam on wrong attachment
-For now, disable reading from depth this was always broken, needs to be fixed later
-Give better error showing binding and set when this happens.
2020-12-19 10:18:08 -03:00
Marcel Admiraal
2df9a8ccad Rename Rect2 and Rect2i clip() to intersection() 2020-12-19 12:59:08 +00:00
reduz
985892bfec Turn off robust buffer access by default.
It can be a performance bottleneck in some hardware.
2020-12-18 21:12:55 -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
reduz
bf77016c8a Reimplement skeletons and blend shapes
Uses compute shaders, which only once, on demand, and all in parallel.
2020-12-16 14:32:04 -03:00
bruvzg
644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Aaron Franke
5dddf4377a
Rename RD texture "type" to "texture_type"
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-04 19:34:50 -05:00
Aaron Franke
19bdd01438
Rename RD uniform "type" to "uniform_type"
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-04 19:34:50 -05:00
reduz
70f5972905 Refactored Mesh internals and formats.
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES.
-Removed compression, it now always uses the most efficient format.
-Added support for custom arrays (up to 8 custom formats)
-Added support for 8 weights in skeleton data.
-Added a simple optional versioning system for imported assets, to reimport if binary is newer
-Fixes #43979 (I needed to test)

WARNING:

-NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change.
-NOT backwards compatible with 3.x scenes, this will be eventually re-added.
-Skeletons not working any longer, will fix in next PR.
2020-12-02 13:07:59 -03:00
Hanif Bin Ariffin
cc2097c79c Better error handling of vkEnumerateInstanceExtensionProperties
Refer: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceExtensionProperties.html
According to the documentation, there are 2 success code:
1. VK_SUCCESS
2. VK_INCOMPLETE

VK_INCOMPLETE will be returned when not all avaiable properties are returned.
2020-11-28 19:28:23 +08:00
Rafał Mikrut
7bd03b7188 Initialize class/struct variables with default values in core/ and drivers/ 2020-11-23 17:38:46 +01:00
Jordan Schidlowsky
e9527d0353 allow vulkan validation layers in release builds if explicity asked for 2020-11-18 14:07:28 -06:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
bruvzg
f09a37a8d5
Fixes crash if Vulkan presentation surface is not available. 2020-11-14 13:41:13 +02:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
John Zulauf
784f8fbbe5 Synchronization - Clean subpass dependency init
Fix incorrect subpass dependency initialization
2020-10-29 15:53:47 -06: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