Commit graph

123 commits

Author SHA1 Message Date
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
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
John Zulauf
474fc19601 Correct stage masks for storage texture barriers
Change the srcStageMasks and dstStageMasks for the storage texture end
draw barriers to refer to the correct stages for the use.
2020-10-16 11:33:02 -06:00
John Zulauf
d92f2e4a2d Add barrier for buffer getting
Add barrier for source buffer when getting.  Refactor common "owner and
stage/access" code to utility function.
2020-10-16 11:33:02 -06:00
John Zulauf
5a77eb5a83 Add fragment stage to texture copy/resolve barriers
Added the fragment stage to the texture copy and resolve final barriers
for source and dest.  As the textures could subsequently be used by the
fragment stage, this was triggering a validation error from the
pre-alpha synchronization validation.
2020-10-16 11:33:02 -06:00
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
John Zulauf
98d677ef26 Cause buffer_update to emit error if called during compute/draw list
Add error message to buffer update if a compute or draw list is active.
2020-07-29 14:13:37 -06:00
Rémi Verschelde
3b340985cc SCons: Support linking system Vulkan loader while using vendored VMA 2020-07-26 13:20:08 +02:00
Sergey Minakov
fe60815d66 iOS SCons: static Vulkan binary usage
Add VMA to iphone platform Use linkflag for iphone building to enforce static linking. Works fine with dynamic '.framework' library
Updated xcode project to use '.a' static library
2020-07-25 21:55:25 +02:00
Rémi Verschelde
dfdfee04df Vulkan: Fix struct init for VkClearAttachment
The changes from #38835 were not sufficient to fix #38829, as VkClearAttachment
still had uninitialized member structs in its VkClearColor member struct.

The struct rabbit hole goes deep and trying to do validation as done in #38829
doesn't appear realistic.
2020-07-22 16:31:22 +02:00
Rémi Verschelde
f54fd5ac10
Merge pull request #38835 from madmiraal/fix-38829
Fix may be used unitialized warnings in _render_pass_create() and  _draw_list_insert_clear_region().
2020-07-22 16:12:54 +02:00
Rémi Verschelde
a5fb445121
Merge pull request #40450 from asmaloney/spelling
Fix spelling & grammar in comments, docs, and messages
2020-07-21 22:14:04 +02:00
Andy Maloney
4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
Andy Maloney
8b949918b1 Fix spelling of a var, a struct, and message output 2020-07-17 12:02:06 -04:00
bruvzg
996910b627
Add error messages if Vulkan init failed, prevent Vulkan context freeing uninitialized device and instance. 2020-07-13 19:24:21 +03:00
Juan Linietsky
201d606b3d Addition of SDFGI for open world global illumination
Move GI to a deferred pass
2020-06-26 11:06:48 -03:00
Rémi Verschelde
5e62a2ee75 Vulkan: Initialize struct members on declaration
Supersedes and closes #38945.
2020-06-03 13:18:22 +02:00
Marcel Admiraal
19d3e17f01 Fix may be used unitialized warnings in _render_pass_create()
and  _draw_list_insert_clear_region()
2020-05-19 04:14:57 +01:00
Rémi Verschelde
4f23215395
Merge pull request #38750 from madmiraal/fix-vulkan-uninitialized-warning
Silence mulitple may be used uninitialized warnings in RenderingDeviceVulkan::uniform_set_create()
2020-05-15 18:02:56 +02:00
Marcel Admiraal
8f0b3392c3 Silence mulitple may be used uninitialized warnings in
RenderingDeviceVulkan::uniform_set_create()
2020-05-15 11:48:06 +01:00
Rémi Verschelde
07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Juan Linietsky
1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Rémi Verschelde
69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde
e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
bruvzg
b5caa2e8b0
[Vulkan] Use VK_LAYER_KHRONOS_validation instead of deprecated VK_LAYER_LUNARG_standard_validation. 2020-04-26 16:47:25 +03:00
Juan Linietsky
f8ef38efed Add proper type to most public API uses of Array 2020-04-21 12:16:45 -03:00
Juan Linietsky
ae09b55a19 Exposed RenderingDevice to script API
Also added an easier way to load native GLSL shaders.

Extras:

Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload.

Note:

The precommit hooks are broken because they don't seem to support enums from one class being used in another.
Feel free to fix this after merging this PR.
2020-04-20 21:21:58 -03:00
Juan Linietsky
49d0c6a5c9 Ability to create local RenderingDevice instances. 2020-04-18 21:47:17 -03:00
qarmin
943ec79859 Fixes leaks in ResourceCache, Vulkan and X11 2020-04-15 10:27:57 +02:00
Rémi Verschelde
84142f6a5f
Merge pull request #37881 from qarmin/leak_vulkan
Fixes leaks with Vulkan device and instance
2020-04-14 21:45:48 +02:00
qarmin
2ab4b054e0 Fixes leaks with Vulkan device and instance 2020-04-14 20:15:48 +02:00
Juan Linietsky
5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Juan Linietsky
a57dc398db Implement MSAA 2020-04-12 15:33:57 -03:00
Juan Linietsky
9dc19f7619
Merge pull request #37808 from reduz/port-effects-to-compute
Moved most of the effect code to compute.
2020-04-11 23:38:05 -03:00
Juan Linietsky
d81911490b Moved most of the effect code to compute.
Simplifies it and improves performance.
Improves image barrier handling per mipmap on RenderingDeviceVulkan
2020-04-11 19:44:07 -03:00
Juan Linietsky
d06f8ef75a Shows proper scene render time in editor info
Also fixed GPU profiler, which was not working on nvidia hardware.
2020-04-10 14:19:30 -03:00
PouleyKetchoupp
802bbe87ad Fix extra warnings in Android build 2020-04-10 11:06:11 +02:00
Rémi Verschelde
23d786d6fb
Merge pull request #36919 from nekomatata/android-vulkan-rendering
Vulkan rendering support on Android
2020-04-09 00:16:26 +02:00
PouleyKetchoupp
e167af3737 Display Server support 2020-04-08 01:47:09 +02:00
Rémi Verschelde
597ec5dbf8
Merge pull request #37586 from qarmin/vulkan_allocator_leak
Fix leak with Vulkan allocator
2020-04-07 09:16:02 +02:00
Rémi Verschelde
befbdda7f2
Merge pull request #37635 from qarmin/leak_vertex
Fixed leak with vertex_formats
2020-04-06 21:32:25 +02:00