Commit graph

191 commits

Author SHA1 Message Date
reduz 6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
K. S. Ernest (iFire) Lee d87526b391 Enum constant in boolean context
error: enum constant in boolean context [-Werror=int-in-bool-context]
2021-06-30 01:38:56 -07:00
reduz 4d19c052f7 Fix Context Validation Layer Errors
* Multisampling was wrongly selected, possibly fixes #49937
* Image semaphore acquisition is now per window, possibly fixes #41614

Please make sure to test the above two issues again, since I can't reproduce either anyway.
2021-06-28 17:43:10 -03:00
reduz bde6f5eed1 Implement Framebuffer Subpass support
* Required for better optimizing mobile platforms
* Will be used by the Vulkan mobile renderer.
2021-06-24 15:59:15 -03:00
Bastiaan Olij 15c1a76361 Add stereoscopic rendering through multiview 2021-06-13 22:52:20 +10:00
Rémi Verschelde 9e328bb5b7
Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
Rémi Verschelde ba82626c2c
Merge pull request #49506 from akien-mga/vulkan_prefer_discrete_gpu
Prefer discrete GPU over integrated one
2021-06-11 13:34:38 +02:00
Blazej Floch 36130e5a05
Prefer discrete GPU over integrated one
This unblocks launching on Linux laptops that default to the integrated
GPU which can not handle Vulkan in many instances.
Ideally a manual device selection, or an option for the optimal selection
strategy should be provided via CLI or config, but for the time being
this will unblock the Linux devs.

Partially addresses #42348 and #43714
2021-06-11 13:02:30 +02:00
Rémi Verschelde c1c76850cb
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.
2021-06-07 11:03:08 +02:00
Rémi Verschelde 4219a4cb6f
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
Hugo Locurcio 064ca9adae
Remove debugging prints in the Linux DisplayServer
Some Vulkan debugging prints were also changed to be printed only
in verbose mode.
2021-05-08 19:07:50 +02:00
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