Commit Graph

327 Commits

Author SHA1 Message Date
02d510bd07 Merge pull request #63003 from Geometror/msaa-2d 2022-08-30 14:54:20 +02:00
43dfc12e72 Merge pull request #64883 from RandomShaper/vk_swapchain_sizing
Let platforms override the sizing of Vulkan swapchain and window
2022-08-30 07:28:21 +02:00
994d2faf97 Let platforms override the sizing of Vulkan swapchain and window 2022-08-25 19:16:36 +02:00
bcc3643989 Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
bbbcdd725a Remove requirement to have vertex positions when creating a mesh. Meshes can now be constructed from an index buffer alone 2022-08-19 14:50:12 -06:00
e96b1a2c0c Implement MSAA for 2D [Vulkan only] 2022-08-13 01:09:48 +02:00
8a3bc72954 Apply correct formatting to comments in the Vulkan driver 2022-08-09 22:11:20 +02:00
4417fc6d43 For dev builds, keep track of resource names in the Vulkan driver 2022-08-09 14:47:22 +10:00
9e361bfaaf Merge pull request #62787 from RandomShaper/vk_object_name
Set default resource names under pure debug in Vulkan RD
2022-08-06 00:35:09 +02:00
f999f52f0a Add a Framebuffer cache
Adds a FramebufferCache singletion that operates the same way as UniformSetCache.

Allows creating framebuffers on the fly (and keep them cached if re-requested) such as:

```C++
RID fb = FramebufferCache::get_singleton()->get_cache(texture1,texture2);
```
2022-08-05 13:37:29 +02:00
d2271eb300 Improve error message when the requested V-Sync mode cannot be used 2022-08-04 00:15:09 +02:00
82811367cb Merge pull request #63571 from RandomShaper/conservative_validate_vrs 2022-07-28 15:34:47 +02:00
5f71b55380 Improve handling of the format of the VRS image
- Validate format conservatively. (This is to have VRS images created regardless whether VRS attachments are supported, which avoids errors in places where the code assumes such images were created on low-spec GPUs.)
- Create a non-layered default VRS image, which is what Vulkan (and D3D12, by the way) expect.
2022-07-28 12:24:03 +02:00
df0a7ce17a Remove unintended string copies 2022-07-27 18:16:57 +02:00
a446d761fb Merge pull request #63296 from RandomShaper/fix_vk_singleview 2022-07-27 13:23:45 +02:00
6d0c84717f Fill view and correlation masks correctly for single view in Vulkan RD 2022-07-27 13:15:50 +02:00
57ac638724 Merge pull request #63314 from RandomShaper/validate_vrs_format 2022-07-27 13:01:46 +02:00
f4e603f432 Merge pull request #63323 from RandomShaper/const_ref_capabilities
Avoid copies of structures when returning Vulkan capabilities
2022-07-26 20:55:46 +02:00
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
e49e9fec22 Avoid copies of structures when returning Vulkan capabilities 2022-07-22 22:07:51 +02:00
06333fb732 Validate texture format for VRS attachment 2022-07-22 15:05:31 +02:00
8823eae328 Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
3fe89e7fa9 Merge pull request #63237 from RandomShaper/amend_error_msg 2022-07-20 21:39:43 +02:00
a21f8b7c13 Improve linuxbsd headless building, cleanup build scripts
Now the `linuxbsd` platform can be built headlessly (e.g. without X11
development libraries).

I also cleaned up some weird (old?) usages of the `env` variable which
seem to make no difference and are used nowhere else.
2022-07-20 19:48:35 +02:00
73ba313368 Improve messages about VRS 2022-07-20 19:37:05 +02:00
b9c94f6780 Add missing fields to VkRenderPassCreateInfo2KHR struct 2022-07-20 12:52:37 +10:00
d29e17d9d2 Merge pull request #63057 from sakrel/vulkan-fix-2d-shadows 2022-07-18 21:53:12 +02:00
5bea531228 Merge pull request #62848 from RandomShaper/shader_writability_improvement 2022-07-18 15:11:42 +02:00
309f7965c7 Enhance determination of uniform writability in Vulkan RD
- Check block decoration in addition to type decoration to be sure to find `readonly` decorators
- Verify uniforms have same writability across all shader stages in Vulkan RD
2022-07-18 14:46:28 +02:00
77a525168d Improve versioning of shader binary data files
- Include Godot version and commit hash in shader cache key
- Reject files when format doesn't match, even if it's lower, since we don't have backwards compatibility here
2022-07-18 14:45:36 +02:00
97df94ae90 Update comments in vulkan_context.cpp
Co-authored-by: Quinn Leavitt <59779489+QuinnLeavitt@users.noreply.github.com>
2022-07-17 12:45:17 -05:00
d139131aab Adding Variable Rate Shading support to Godot
Improve GI renderer and add VRS support
Implement render device has_feature and move subgroup settings to limit_get
2022-07-17 15:42:24 +10:00
16a8967757 Fix DirectionalLight2D and PointLight2D shadows not rendering correctly 2022-07-15 23:55:15 +02:00
498bbd0fb4 Set default resource names under pure debug in Vulkan RD 2022-07-06 19:19:16 +02:00
08044aa2e3 Vulkan: Make loader_get_json "error" a verbose message on Windows
In far most cases it seems like it's going to message about bogus manifests
in the Windows registry which point to JSON files which have since been
uninstalled, but without clearing the registry.

This happens with bogus Vulkan overlays from Twitch, Epic Online Services,
NVIDIA Nsight Systems, OBS Studio, Rockstar Games... fix your mess folks.

Fixes #56089.
2022-07-02 19:25:01 +02:00
95ac9081d6 Use a more robust method of determining writability of bindings 2022-06-30 20:07:30 +02:00
a82352c7e3 Avoid manual memory management of certain arrays in Vulkan RD 2022-06-28 10:01:46 +02:00
3d58b79792 Fix confusion between Vulkan and RD storage buffer usage values 2022-06-28 10:01:46 +02:00
525de52b08 Stop debug time full barriers preventing layout transitions in Vulkan RD 2022-06-28 10:01:45 +02:00
e1645567a6 Optimize texture update in Vulkan RD 2022-06-28 10:01:45 +02:00
509c0eb86b Apply some small fixes/enhancements to the Vulkan RD
- Initialize queue indices to values meaning 'unset'
- Remove unused parameters & members
- Make texture update access flags consistent with texture copy
- Fix style and pass type of some parameters
- Synchronize setup-draw in flush with a semaphore
- Add no current list validation to draw_list_begin_splits()
- Update texture usage flags on destination of copy
- Fix misuse of Vulkan flag
2022-06-28 10:01:45 +02:00
fc6ac4a155 Consider uniform writability part of the interface of the set 2022-06-27 21:56:18 +02:00
997810e417 Split GI effects and fix stereoscopic rendering of GI effects 2022-06-22 12:50:17 +10:00
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
31194f5b1c Add get_video_adapter_api_version() to RenderingServer
This method can be used to get the graphics API version currently in
use (such as Vulkan). It can be used by projects for troubleshooting
or statistical purposes.
2022-05-03 01:18:35 +02:00
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
de4c97758a Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00