Commit Graph

263 Commits

Author SHA1 Message Date
089dbecef4 Make draw command labels thread safe 2023-02-10 21:27:31 +01:00
ed85a2c8ce Merge pull request #70663 from EpEpDragon/feature_buffer_get_data_size_option
Add optional size parameter to the RenderDevice buffer_get_data method.
2023-02-10 18:49:28 +01:00
093289364f Add layer slice support to render device and render buffers 2023-02-03 09:48:56 +11:00
5931d504c1 Add a few more checks to ensure that unsupported image formats are not used in the mobile renderer 2023-01-23 12:38:09 -08:00
318656d326 Enabling additional vulkan extension and adding further checks 2023-01-15 14:49:15 +11:00
5ca2ba45f1 Make inclusion of Godot version in shader hash universal 2023-01-09 17:47:02 +01:00
36d02882b9 Added optional offset and size parameter to RenderDevice buffer_get_data method 2023-01-06 17:08:37 +02:00
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
f318d60e06 Merge pull request #65376 from reduz/astc-support
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
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
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
af6189711e Replace certain sanity checks with proper dev-only assertions in Vulkan RD 2022-12-15 12:34:08 +01:00
807632a90c Changed STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT type to enum flags 2022-12-15 14:10:37 +03:00
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
14e301467e Refactor SPIR-V reflection into a generic RenderingDevice feature 2022-12-12 14:14:53 +01:00
c985ee985f Tidy up some aspects of Vulkan RD 2022-12-12 14:14:53 +01:00
f79c034713 Merge pull request #69635 from BastiaanOlij/fix_get_buffer
Fix barrier on buffer_get_data
2022-12-12 11:44:29 +01:00
6e48db69a3 Changed RD::PipelineDynamicStateFlags type to enum flags 2022-12-11 15:37:35 +03:00
d79f692cae Fix barrier on buffer_get_data 2022-12-06 22:44:35 +11:00
5934eef44c Changed RenderingDevice::TextureUsageBits type to enum flags 2022-11-26 13:08:07 +03:00
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
acaf38cfbc Expose BarrierMask as flags enum in RenderingDevice 2022-11-22 09:45:20 +03:00
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
616ba8745f Fix VRS issues 2022-11-17 00:32:42 +11:00
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
d7136f2d51 Add offsets parameter to RenderingDevice::vertex_array_create 2022-11-11 15:45: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