Commit graph

128 commits

Author SHA1 Message Date
Shawn Wallace b12ed82c04 Expose texture_create_from_extension to GDExtension 2023-09-23 16:57:12 -04:00
Pedro J. Estébanez bcf33cfbd1 Enhance Vulkan PSO caching 2023-08-30 12:00:54 +02:00
Dario 0d7deca4e2 Add buffer_copy method to RenderingDevice interface and an implementation for the Vulkan driver.
Direct buffer copies are required to perform certain operations more efficiently, as the only current alternative is to download the buffer to the CPU and upload it again. As the first use case, the new function is used when enabling motion vectors on multimeshes.
2023-08-12 09:38:39 -03:00
Yuri Sizov 1c40263665 Merge pull request #79606 from clayjohn/ShaderRD-compilation-groups
Shader rd compilation groups
2023-08-01 17:25:16 +02:00
Bastiaan Olij 63d6e9c557 Add custom texture create function 2023-07-26 20:46:34 +10:00
clayjohn e970f5249c Add Shader compile groups to RD Shader system
This allows us to specify a subset of variants to compile at load time and conditionally other variants later.

This works seamlessly with shader caching.

Needed to ensure that users only pay the cost for variants they use
2023-07-21 16:42:30 +02:00
Bastiaan Olij 6dd47e232b Expose RD::texture_native_handle 2023-06-14 09:58:08 +10:00
Rémi Verschelde 3dd0307f3f
Merge pull request #76348 from warriormaster12/pipeline-cache
Implement Vulkan pipeline caching
2023-06-01 00:40:33 +02:00
warriormaster12 dded713dc0 Implement Vulkan pipeline caching 2023-05-31 22:24:18 +03:00
Bastiaan Olij c328676d96 For GDExternal use, provides access to internal graphics handles for textures 2023-05-09 13:47:22 +10:00
Pedro J. Estébanez 09aa1bbdb3 Fix unsupported sampler filter used for voxel GI 2023-04-26 20:54:06 +02:00
Pedro J. Estébanez 882b869220 Fix issues with Vulkan layout transitions 2023-04-24 12:24:24 +02:00
Rémi Verschelde 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
Bastiaan Olij 093289364f Add layer slice support to render device and render buffers 2023-02-03 09:48:56 +11:00
EpEpDragon 36d02882b9 Added optional offset and size parameter to RenderDevice buffer_get_data method 2023-01-06 17:08:37 +02: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
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
Yuri Rubinsky 5934eef44c Changed RenderingDevice::TextureUsageBits type to enum flags 2022-11-26 13:08:07 +03: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
Patrick Dawson d7136f2d51 Add offsets parameter to RenderingDevice::vertex_array_create 2022-11-11 15:45:36 +01: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
Rémi Verschelde 02d510bd07
Merge pull request #63003 from Geometror/msaa-2d 2022-08-30 14:54:20 +02:00
bruvzg bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
Hendrik Brucker e96b1a2c0c Implement MSAA for 2D [Vulkan only] 2022-08-13 01:09:48 +02:00
Pedro J. Estébanez 8a3bc72954 Apply correct formatting to comments in the Vulkan driver 2022-08-09 22:11:20 +02:00
Bastiaan Olij 4417fc6d43 For dev builds, keep track of resource names in the Vulkan driver 2022-08-09 14:47:22 +10:00
Juan Linietsky 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
Bastiaan Olij 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
Pedro J. Estébanez a82352c7e3 Avoid manual memory management of certain arrays in Vulkan RD 2022-06-28 10:01:46 +02:00
Pedro J. Estébanez 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
Pedro J. Estébanez fc6ac4a155 Consider uniform writability part of the interface of the set 2022-06-27 21:56:18 +02:00
reduz 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
reduz 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
reduz 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
Hugo Locurcio 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
Rémi Verschelde 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
Pedro J. Estébanez 171e31de68 vk_mem_alloc: Update to upstream + Replace use of deprecated items 2022-03-29 11:28:09 +02:00
notSanil 36fa7059ed Fix device limit exceeding for uniform buffer 2022-03-16 16:52:35 +05:30
Pedro J. Estébanez 801741e787 vk_mem_alloc: Update to upstream + Adapt approach to small objects pooling
This updates VMA and instead of using the custom small pool approach from 4e6c9d3ae9, lazily creates pools for the relevant memory type indices, which doesn't require patching VMA.

Also, patches already merged upstream or not needed any longer are removed.
2022-02-24 14:30:55 +01:00
Bastiaan Olij a78a9fee71 Implementing OpenXR driver 2022-02-23 12:02:24 +01:00
Pedro J. Estébanez 4e6c9d3ae9 Add a separate pool for small allocations in Vulkan RD 2022-02-12 12:47:08 +01:00
luz paz 858bcd5058 Fix various typos
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
Rémi Verschelde 095c72b03e
Merge pull request #55790 from Calinou/renderingserver-add-device-type-getter
Add `RenderingServer.get_video_adapter_type()` method
2022-01-04 16:43:23 +01:00