Commit graph

2412 commits

Author SHA1 Message Date
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
5525cd85c6
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
2021-01-31 15:24:56 +01:00
Pedro J. Estébanez
99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
Aaron Franke
e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05: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
Fabio Alessandrelli
2ea7592ca1 DummyRasterizer Sync. 2021-01-25 15:58:38 +01: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
Rémi Verschelde
d39f6386ce
Merge pull request #45314 from RandomShaper/modernize_rwlock
Modernize RWLock
2021-01-22 14:51:05 +01: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
Pedro J. Estébanez
8ed259b792 Modernize RWLock
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-01-19 11:53:10 +01:00
Rémi Verschelde
59495adb7c
Merge pull request #45157 from madmiraal/fix-44514
Raise SIGKILL instead of CRASH_NOW in child process when fork fails
2021-01-13 15:51:09 +01:00
Marcel Admiraal
89225884f6 Raise SIGKILL instead of CRASH_NOW in child process when fork fails 2021-01-13 10:18:57 +00:00
bruvzg
533ed0c7c8
Fix OS::execute() and OS::create_process() command line argument CharStrings freed before use. 2021-01-13 11:38:02 +02:00
Rémi Verschelde
1218441b16
Merge pull request #44514 from madmiraal/split-os-execute
Split OS::execute into two methods
2021-01-12 16:17:04 +01:00
Rémi Verschelde
f414a323b1
Merge pull request #42740 from lolleko/fix-nanosleep-usage
Fix nanosleep usage
2021-01-11 14:42:10 +01:00
Fabio Alessandrelli
88300af7e4 Sync RasterizerDummy. 2021-01-10 12:04:09 +01:00
Marcel Admiraal
2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00: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
Marcel Admiraal
fa435a550a Add override keywords to core/os.h derived classes. 2020-12-17 18:02:31 +00: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
Fabio Alessandrelli
e1ccd37e34 Sync RasterizerDummy changes.
Will also need to be renamed.
2020-12-09 14:27:41 +01:00
Rémi Verschelde
0c5d3b838c
Merge pull request #44199 from bruvzg/pvs_fixes_1
PVS-Studio static analyzer fixes
2020-12-09 10:23:21 +01: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
Rémi Verschelde
e5e1277ecd
Merge pull request #44161 from Faless/fix/fa_buffered_remove
Remove unused FileAccessBuffered
2020-12-09 09:14:14 +01:00
David Snopek
26f1d05400 Fix dummy rasterizer so that javascript can build again 2020-12-06 18:29:32 -06:00
Fabio Alessandrelli
781efc26e0 Remove now unused FileAccessBuffered. 2020-12-06 19:37:11 +01: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
2787ad65be RenderingServer reorganization 2020-12-04 18:39:46 -03: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
Fabio Alessandrelli
e2a0c44d06 Sync RasterizerDummy changes. 2020-11-30 12:07:20 +01:00
Rémi Verschelde
d1943f6a77
Merge pull request #38939 from hbina/vk_error_handling
Better error handling of vkEnumerateInstanceExtensionProperties
2020-11-29 13:03:01 +01:00
Rémi Verschelde
ef2d1f6d19
Merge pull request #42761 from fire/color-grading-3d
Environment brightness, contrast, saturation restore with 3d LUT.
2020-11-28 23:07:52 +01:00
clayjohn
076908bed9 Environment brightness, contrast, saturation restore with color correction.
Allow gradients and 2d images.

Use shader versions for LUT in tonemap

Co-authored-by: alex-poe <3957610+CptPotato@users.noreply.github.com>
Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2020-11-28 07:37:49 -08: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
Rémi Verschelde
94341ac547
Merge pull request #42987 from clayjohn/VULKAN-sky-only
Add sky_only setting to DirectionalLight3Ds
2020-11-28 09:07:09 +01:00