Commit Graph

238 Commits

Author SHA1 Message Date
efe3220b2e Fix periods in editor strings and messages
- Ensure all strings with ellipsis end with 3 periods instead of 2.
- Fix extraneous period in "Error calling from signal '...' to callable"
  messages.
2022-11-14 19:36:36 +01:00
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
382f0f97d6 RenderingDevice: Fix usage of index offset 2022-11-05 21:03:32 +01:00
a4e58ec84a Fix several render issues found while debugging XR 2022-11-01 13:27:03 +11:00
8fd92ed867 Merge pull request #64710 from MinusKube/window-size-crash
Prevent windows from having a size greater than device limit
2022-10-27 10:02:44 -07:00
6d534f6e89 Merge pull request #66221 from Mickeon/painstakingly-appending-ds-en-you-tea-es
Rename remaining "*_enable" to "*_enabled"
2022-10-11 16:17:02 +02:00
3306ffefd1 Merge pull request #67000 from RandomShaper/split_render_further
Polish rendering driver refactor further
2022-10-11 09:23:32 +02:00
8017827144 SCons: Re-enable treating #warning as error with werror
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.

We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02:00
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
24ff292999 Polish rendering driver refactor further
Mainly:
- Make `max_descriptors_per_pool` project setting Vulkan-specific.
- Use a common, render driver agnostic magic FourCC for shader binary data.
- Downgrade spirv_reflect to Vulkan-only dependency.
- Add a `RENDER_DRIVER_*` macro to GLSL shader code for per-driver customizations.
2022-10-06 21:08:54 +02:00
166df0896c Fix typos with codespell
Using codespell 2.3-dev from current git.

And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
85fe6ecc32 Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used 2022-09-28 17:05:34 +02:00
c1b5b68eee Rename remaining "*_enable" to "*_enabled"
Material.`proximity_fade_enable` -> `proximity_fade_enabled`
Material.`set_proximity_fade` -> `set_proximity_fade_enabled`
(Material.`is_proximity_fade_enabled` is unchanged)

Area3D.`reverb_bus_enable` -> `reverb_bus_enabled`
(`set_use_reverb_bus` & `is_using_reverb_bus` are unchanged)

RDPipelineRasterizationState:
`depth_bias_enable` -> `depth_bias_enabled`
`set_depth_bias_enable` -> `set_depth_bias_enabled`
`get_depth_bias_enable` -> `get_depth_bias_enabled`

Bonus:
Area3D.`set_reverb_bus` -> `set_reverb_bus_name`
Area3D.`get_reverb_bus` -> `set_get_reverb_bus_name`
2022-09-21 22:47:46 +02:00
4a1c7de57c Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
d1aed76a20 Fix crash when executing SubViewport.set_size_2d_override_stretch 2022-09-07 22:02:21 +08:00
f5a808192b Prevent windows from having a size greater than device limit 2022-09-04 22:48:54 +02:00
02d510bd07 Merge pull request #63003 from Geometror/msaa-2d 2022-08-30 14:54:20 +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
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
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
06333fb732 Validate texture format for VRS attachment 2022-07-22 15:05:31 +02:00
3fe89e7fa9 Merge pull request #63237 from RandomShaper/amend_error_msg 2022-07-20 21:39:43 +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
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
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
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