Commit graph

2377 commits

Author SHA1 Message Date
Fabio Alessandrelli
e1ccd37e34 Sync RasterizerDummy changes.
Will also need to be renamed.
2020-12-09 14:27:41 +01:00
Rémi Verschelde
0c5d3b838c
Merge pull request #44199 from bruvzg/pvs_fixes_1
PVS-Studio static analyzer fixes
2020-12-09 10:23:21 +01:00
bruvzg
644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Rémi Verschelde
e5e1277ecd
Merge pull request #44161 from Faless/fix/fa_buffered_remove
Remove unused FileAccessBuffered
2020-12-09 09:14:14 +01:00
David Snopek
26f1d05400 Fix dummy rasterizer so that javascript can build again 2020-12-06 18:29:32 -06:00
Fabio Alessandrelli
781efc26e0 Remove now unused FileAccessBuffered. 2020-12-06 19:37:11 +01:00
Aaron Franke
5dddf4377a
Rename RD texture "type" to "texture_type"
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-04 19:34:50 -05:00
Aaron Franke
19bdd01438
Rename RD uniform "type" to "uniform_type"
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-04 19:34:50 -05:00
reduz
2787ad65be RenderingServer reorganization 2020-12-04 18:39:46 -03:00
reduz
70f5972905 Refactored Mesh internals and formats.
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES.
-Removed compression, it now always uses the most efficient format.
-Added support for custom arrays (up to 8 custom formats)
-Added support for 8 weights in skeleton data.
-Added a simple optional versioning system for imported assets, to reimport if binary is newer
-Fixes #43979 (I needed to test)

WARNING:

-NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change.
-NOT backwards compatible with 3.x scenes, this will be eventually re-added.
-Skeletons not working any longer, will fix in next PR.
2020-12-02 13:07:59 -03:00
Fabio Alessandrelli
e2a0c44d06 Sync RasterizerDummy changes. 2020-11-30 12:07:20 +01:00
Rémi Verschelde
d1943f6a77
Merge pull request #38939 from hbina/vk_error_handling
Better error handling of vkEnumerateInstanceExtensionProperties
2020-11-29 13:03:01 +01:00
Rémi Verschelde
ef2d1f6d19
Merge pull request #42761 from fire/color-grading-3d
Environment brightness, contrast, saturation restore with 3d LUT.
2020-11-28 23:07:52 +01:00
clayjohn
076908bed9 Environment brightness, contrast, saturation restore with color correction.
Allow gradients and 2d images.

Use shader versions for LUT in tonemap

Co-authored-by: alex-poe <3957610+CptPotato@users.noreply.github.com>
Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2020-11-28 07:37:49 -08:00
Hanif Bin Ariffin
cc2097c79c Better error handling of vkEnumerateInstanceExtensionProperties
Refer: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceExtensionProperties.html
According to the documentation, there are 2 success code:
1. VK_SUCCESS
2. VK_INCOMPLETE

VK_INCOMPLETE will be returned when not all avaiable properties are returned.
2020-11-28 19:28:23 +08:00
Rémi Verschelde
94341ac547
Merge pull request #42987 from clayjohn/VULKAN-sky-only
Add sky_only setting to DirectionalLight3Ds
2020-11-28 09:07:09 +01:00
Cooper Harasyn
25b2f82ccf Prevent ALSA audio corruption
When using the ALSA driver, corruption would occur if `snd_pcm_writei`
was unable to consume the entire sound buffer. This would occur
frequently on the Raspberry Pi 3 which uses the `snd_bcm2835` audio
driver.

This bug resulted from incorrect pointer math on line 187, resulting in
the sample source pointer being advanced by `total * ad->channels` bytes
instead of `total * ad->channels` samples. In my opinion, the best fix
is to change `*src` to type `int16_t`, since that is the sample type in
use.

Fixes #43927.
2020-11-27 16:05:59 -05:00
Rafał Mikrut
7bd03b7188 Initialize class/struct variables with default values in core/ and drivers/ 2020-11-23 17:38:46 +01:00
Rémi Verschelde
a655de89e3
doc: Warn about using Node internal processing
See #43689.

Also 'fixed' some spelling for behavior in publicly visible strings.
(Sorry en_GB, en_CA, en_AU, and more... Silicon Valley won the tech spelling
war.)
2020-11-20 09:52:37 +01:00
Jordan Schidlowsky
e9527d0353 allow vulkan validation layers in release builds if explicity asked for 2020-11-18 14:07:28 -06:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
bruvzg
f09a37a8d5
Fixes crash if Vulkan presentation surface is not available. 2020-11-14 13:41:13 +02:00
Fabio Alessandrelli
25d56e9666 RasterizerDummy fixes. 2020-11-10 11:42:51 +01:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
John Zulauf
784f8fbbe5 Synchronization - Clean subpass dependency init
Fix incorrect subpass dependency initialization
2020-10-29 15:53:47 -06:00
Rémi Verschelde
6a951267ae
vulkan: Backport build fix for MinGW-w64 8.0.0
Taken from https://github.com/KhronosGroup/Vulkan-Loader/pull/475.

Supersedes and reverts #43119 since the upstream change removes the need for
that custom define.
2020-10-29 12:47:35 +01:00
reduz
8ab9b39707 Implement CanvasGroup and CanvasItem clipping
-Allows merging several 2D objects into a single draw operation
-Use current node to clip children nodes
-Further fixes to Vulkan barriers
-Changed font texture generation to white, fixes dark eges when blurred
-Other small misc fixes to backbuffer code.
2020-10-28 18:53:32 -03:00
Rémi Verschelde
54e6338c9b
Vulkan: Make validation layers optional
They're now disabled by default, and can be enabled with the command line
argument `--vk-layers`.

When enabled, the errors about them being missing are now warnings, as
users were confused and thought this meant Vulkan is broken for them.

Fix crash in `~VulkanContext` when validation layers are disabled (exposed by
this PR since before they could not be disabled without source modification).

Also moved VulkanContext member initializations to header.

Fixes #37102.
2020-10-27 16:19:15 +01:00
K. S. Ernest (iFire) Lee
b2d5b619fd Changes for 43094 mingw llvm build error. 2020-10-26 19:58:44 -07:00
Rémi Verschelde
825ab3b784
Merge pull request #42817 from akien-mga/vulkan-sdk-1.2.154.0
vulkan: Sync loader, headers and glslang to sdk-1.2.154.0
2020-10-26 15:15:19 +01:00
Rémi Verschelde
d77deda7b6
Merge pull request #43056 from Ev1lbl0w/bugfix-wrong-exitcode
Fix wrong exit code being returned
2020-10-26 08:58:13 +01:00
rsjtdrjgfuzkfg
b1f95e150e Fix crash in RenderingDeviceVulkan::shader_create
This commit moves the declaration of a local variable to ensure its
scope survives long enough; at least in some versions of GCC and LLVM
the associated memory was freed too early and thus caused issues ranging
from black screens to crashes.
2020-10-25 22:32:10 +01:00
reduz
84d734da0e Refactored 2D shader and lighting system
-Removed normal/specular properties from nodes
-Create CanvasTexture, which can contain normal/specular channels
-Refactored, optimized and simplified 2D shaders
-Use atlas for light textures.
-Use a shadow atlas for shadow textures.
-Use both items aboves to make light rendering stateless (faster).
-Reorganized uniform sets for more efficiency.
2020-10-24 15:57:25 -03:00
Ev1lbl0w
0d3a168a53
Fix wrong exit code being returned 2020-10-24 19:16:49 +01:00
clayjohn
6299575250 Add sky_only setting to DirectionalLight3Ds 2020-10-21 23:28:08 -07:00
reduz
dd0b097e44 Fix invalid buffer updates in SDFGI 2020-10-19 17:39:09 -03:00
Juan Linietsky
c71e941ee8
Revert "Revert "Synchronization validation fix patch set 3 (inclusive of all previous patches)"" 2020-10-19 17:32:19 -03:00
Juan Linietsky
f11f28936d
Revert "Synchronization validation fix patch set 3 (inclusive of all previous patches)" 2020-10-19 17:04:24 -03:00
Juan Linietsky
791b259a63
Revert "Cause buffer_update to emit error if called during compute/draw list" 2020-10-19 17:00:13 -03:00
Juan Linietsky
5f65eba5c4
Merge pull request #40849 from jzulauf-lunarg/zulauf_buffer_update_err_msg
Cause buffer_update to emit error if called during compute/draw list
2020-10-19 14:10:41 -03:00
Juan Linietsky
f9918cbc0e
Merge pull request #42866 from jzulauf-lunarg/zulauf_sync_fixes_3
Synchronization validation fix patch set 3 (inclusive of all previous patches)
2020-10-19 14:10:06 -03:00
Juan Linietsky
53d5a252bb
Revert "Replace SAO implementation with MSSAO" 2020-10-18 19:27:51 -03:00
Juan Linietsky
d98261ab8f
Merge pull request #42077 from clayjohn/MSSAO
Replace SAO implementation with MSSAO
2020-10-18 18:34:43 -03:00
clayjohn
366ee46774 Replace SAO implementation with MSSAO 2020-10-18 13:15:51 -07:00
clayjohn
63a34b93aa Optimize Glow with local memory 2020-10-18 11:37:12 -07:00
John Zulauf
d2083282c0 Add pre-copy barrier to buffer update
Add a barrier to "safe" the buffer update write from previous accesses
to buffer range being updated.  Remove duplicate unneed barrier.
2020-10-16 19:18:33 -06:00
John Zulauf
459fa078e0 Add subpass sync support for layout transitions
Add additional source and dest mask bits for "from external" and "to
external" subpass dependencies (respectively) when intial and final
layouts cause implicit layout transitions.

This is a big hammer -- any transition in a given direction will create
a full barrier.  Attachment specific stage and access flags could be
used instead with additional logic to deduce the prior and intended
subsequent usages.
2020-10-16 19:17:07 -06:00
John Zulauf
5191a8e9db Sync fix for clear texture
Make pre and post barriers non-conditional on format, as there are cases
where pending operations in the GENERAL layout hazarding with clear.
2020-10-16 15:50:48 -06:00
John Zulauf
9a9f667818 Sync fix texture_get_data bad barrier param
Changed srcStageMask to the valid stage for post transfer barrier.
2020-10-16 15:43:51 -06:00
John Zulauf
3a1f14461a Additional synchronization fixes w/o FORCE_FULL_BARRIER
Additional synchronization fixes from hazards arising from disabling
FORCE_FULL_BARRIER.
2020-10-16 11:33:02 -06:00