Commit graph

378 commits

Author SHA1 Message Date
Pedro J. Estébanez
5ca2ba45f1 Make inclusion of Godot version in shader hash universal 2023-01-09 17:47:02 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
f318d60e06
Merge pull request #65376 from reduz/astc-support
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Juan Linietsky
71d21c7ccb Implement basic ASTC support
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.

The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.

ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.

Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Clay John
aa8a899f52
Merge pull request #70104 from RandomShaper/vk_dev_asserts
Replace certain sanity checks with proper dev-only assertions in Vulkan RD
2022-12-15 08:22:17 -08:00
Pedro J. Estébanez
af6189711e Replace certain sanity checks with proper dev-only assertions in Vulkan RD 2022-12-15 12:34:08 +01:00
Yuri Rubinsky
807632a90c Changed STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT type to enum flags 2022-12-15 14:10:37 +03:00
Rémi Verschelde
762c6d4b36
Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-15 09:21:35 +01:00
Pedro J. Estébanez
14e301467e Refactor SPIR-V reflection into a generic RenderingDevice feature 2022-12-12 14:14:53 +01:00
Pedro J. Estébanez
c985ee985f Tidy up some aspects of Vulkan RD 2022-12-12 14:14:53 +01:00
Rémi Verschelde
f79c034713
Merge pull request #69635 from BastiaanOlij/fix_get_buffer
Fix barrier on buffer_get_data
2022-12-12 11:44:29 +01:00
Yuri Rubinsky
6e48db69a3 Changed RD::PipelineDynamicStateFlags type to enum flags 2022-12-11 15:37:35 +03:00
Bastiaan Olij
d79f692cae Fix barrier on buffer_get_data 2022-12-06 22:44:35 +11:00
Bastiaan Olij
2562c06032 Fix issue where we should be using device supported version instead of instance version for Vulkan 2022-12-05 10:12:07 +11:00
Yuri Rubinsky
5934eef44c Changed RenderingDevice::TextureUsageBits type to enum flags 2022-11-26 13:08:07 +03:00
Bastiaan Olij
a479f5af22 Improve logic for detecting and tracking extensions 2022-11-24 21:48:16 +11:00
Rémi Verschelde
e7418cac3d
Merge pull request #68942 from Chaosus/barrier_mask_flags
Expose `BarrierMask` as flags enum in `RenderingDevice`
2022-11-22 08:31:12 +01:00
Yuri Rubinsky
acaf38cfbc Expose BarrierMask as flags enum in RenderingDevice 2022-11-22 09:45:20 +03:00
Rémi Verschelde
a9a75e643e
Merge pull request #68527 from pkdawson/vertex-array-offsets
Add `offsets` parameter to RenderingDevice::vertex_array_create
2022-11-21 11:43:28 +01:00
Bastiaan Olij
616ba8745f Fix VRS issues 2022-11-17 00:32:42 +11:00
Hugo Locurcio
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
Patrick Dawson
d7136f2d51 Add offsets parameter to RenderingDevice::vertex_array_create 2022-11-11 15:45:36 +01:00
kobewi
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
Patrick Dawson
382f0f97d6 RenderingDevice: Fix usage of index offset 2022-11-05 21:03:32 +01:00
Rémi Verschelde
c98d6142d0
Merge pull request #68102 from BastiaanOlij/fix_render_issues_xr
Fix several render issues found while debugging XR
2022-11-03 22:37:42 +01:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Bastiaan Olij
a4e58ec84a Fix several render issues found while debugging XR 2022-11-01 13:27:03 +11:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
e12043ae3a
Merge pull request #67729 from Riteo/workaround-extension-feature-bug
Check for a Vulkan extension before checking its features
2022-10-31 10:48:35 +01:00
Clay John
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
Clay John
c51a42778d
Merge pull request #67541 from RandomShaper/refactor_subgroup_ads
Let the RD driver itself expose subgroup caps
2022-10-24 12:02:06 -07:00
Riteo
3ef598c9f8 Check for a Vulkan extension before checking its features
For some reason AFAICT mesa reports a feature as enabled even when its
extension isn't supported. The Vulkan specification says nothing aboutd
this so this is technically more of a workaround, but it works.
2022-10-22 15:31:42 +02:00
Pedro J. Estébanez
ae38d7930e Let the RD driver itself expose subgroup caps 2022-10-20 19:37:35 +02:00
Riteo
dca76957b2 Use opaque composition if transparency is disabled 2022-10-19 11:01:53 +02:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Clay John
d5ae80c8bd
Merge pull request #67227 from BastiaanOlij/vkCreateRenderPass2KHR_fallback
Added fallback to vkCreateRenderPass
2022-10-11 22:46:42 -07:00
Bastiaan Olij
64a78c3dad Added fallback to vkCreateRenderPass if VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME isn't supported 2022-10-12 09:31:56 +11:00
Rémi Verschelde
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
Rémi Verschelde
3306ffefd1 Merge pull request #67000 from RandomShaper/split_render_further
Polish rendering driver refactor further
2022-10-11 09:23:32 +02:00
Rémi Verschelde
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
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Pedro J. Estébanez
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
bruvzg
6afb2d0225
[Windows] Fix LLVM MinGW build. 2022-10-06 09:30:25 +03:00
Rémi Verschelde
8a47cdc933 Vulkan: Initialize VK_EXT_debug_utils only for dev build or verbose mode
End users would get spammed with messages of varying verbosity due to the
mess that thirdparty layers/extensions and drivers seem to leave in their
wake, making the Windows registry a bottomless pit of broken layer JSON.

I'm all for helping end users clean up mess in their registry / system paths
for Vulkan ICDs, layers and extensions, but the way this is done by
VK_EXT_debug_utils is just horrible - and the way for them to fix it (manual
edit of system files) is also not a good thing to recommend.

Closes countless issues where users think Godot is broken because it reports
weird errors.
2022-10-04 16:09:11 +02:00
Rémi Verschelde
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
Rémi Verschelde
85fe6ecc32 Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used 2022-09-28 17:05:34 +02:00
Micky
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
clayjohn
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
Haoyu Qiu
d1aed76a20 Fix crash when executing SubViewport.set_size_2d_override_stretch 2022-09-07 22:02:21 +08:00
MinusKube
f5a808192b Prevent windows from having a size greater than device limit 2022-09-04 22:48:54 +02:00