Commit graph

3024 commits

Author SHA1 Message Date
Pedro J. Estébanez
e38ae8d7e4 Fix bugs in RID_Alloc
- Replace unintended `%` with `&`
- `get_owned_list()`: make thread-safe and fix logic
- Apply same logic fix to the destructor

Previously, the determination of owned RIDs was wrong. For instance, it could skip owned items or include duplicates in the list.

Avoids the engine crashing at exit.
2020-02-11 12:04:41 +01:00
Juan Linietsky
6ee2f5e6b6 More GIProbe work and fixes 2020-02-11 12:03:49 +01:00
bruvzg
26318f3bd1 Fix Vector3 ambiguities and out of bounds init. 2020-02-11 12:03:39 +01:00
Juan Linietsky
acf0f6c8a7 GIProbes working. 2020-02-11 12:03:20 +01:00
Juan Linietsky
4aea9f74e6 Rewritten StreamTexture for better code reuse, added basis universal support 2020-02-11 12:02:36 +01:00
Juan Linietsky
123ee5995c Visual GPU profiler and related profiling support in Vulkan. 2020-02-11 12:01:26 +01:00
Juan Linietsky
6deffa62fb Several fixes to 3D rendering, and multimesh implementation. 2020-02-11 12:01:22 +01:00
Juan Linietsky
9d7b7f931b Reflection probes working 2020-02-11 12:01:21 +01:00
Juan Linietsky
920db604d2 Rewrote large part of rendering, omni and spot shadows now work. 2020-02-11 12:01:18 +01:00
Juan Linietsky
8cee7703a6 Yay very basic 3D (only white) finally shows. 2020-02-11 11:59:27 +01:00
Rémi Verschelde
61cf68fb48 RID_Alloc: Fix locking in getornull and free early returns
Those missing unlocks were preventing the editor from starting.
2020-02-11 11:59:16 +01:00
Juan Linietsky
dc3b47f3ab Vulkan/RD rasterizer now does clean exit. 2020-02-11 11:58:16 +01:00
Rémi Verschelde
6289e7d147 Merge pull request #29993 from bruvzg/vulkan
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11 11:57:40 +01:00
bruvzg
b456bfad5c Add runtime GLES2 / Vulkan context selection. 2020-02-11 11:57:34 +01:00
bruvzg
eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky
c613ead5fa Added a spinlock template as well as a thread work pool class.
Also, optimized shader compilation to happen on threads.
2020-02-11 11:53:29 +01:00
Juan Linietsky
0586e18449 Custom material support seems complete. 2020-02-11 11:53:29 +01:00
Juan Linietsky
a7b2ac7bb1 Normalmapping and Specularmapping working in 2D engine
Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).
2020-02-11 11:53:28 +01:00
Juan Linietsky
1b4281b895 basic 2D engine is more or less working with Vulkan, including editor.
Still a lot to do
2020-02-11 11:53:27 +01:00
Juan Linietsky
42b44f43ee Basic 2D engine is more or less working, needs more work for editor to be usable. 2020-02-11 11:53:27 +01:00
Juan Linietsky
9b0dd4f571 A lot of progress with canvas rendering, still far from working. 2020-02-11 11:53:27 +01:00
Juan Linietsky
9ffe57a10e Modify RenderingDevice to use RIDs, now that they are O(1) 2020-02-11 11:53:26 +01:00
Juan Linietsky
4f163972bb Refactored RID/RID_Owner to always use O(1) allocation.
* Implements a growing chunked allocator
* Removed redudant methods get and getptr, only getornull is supported now.
2020-02-11 11:53:26 +01:00
Juan Linietsky
fd188ddd51 Initial work on Vulkan:
-Added VulkanContext
-Added an X11 implementation
-Added a rendering device abstraction
-added a Vulkan rendering device abstraction
-Engine does not work, only shows Godot logo (run it from bin/)
2020-02-11 11:53:26 +01:00
Rémi Verschelde
3e3f8a4761
Merge pull request #36097 from madmiraal/fix-c4715-warning
Prevent Visual Studio compiler throwing C4715: not all control paths return a value.
2020-02-11 11:43:58 +01:00
Marcel Admiraal
07d21b84a3 Refactor List operator[] to prevent compiler warnings.
Prevents GCC compiler throwing: control reaches end of non-void function.
Prevents Visual Studio throwing C4715: not all control paths return a value.
2020-02-11 10:29:01 +01:00
Rémi Verschelde
0b4b24883d
Merge pull request #33731 from madmiraal/fix-c4996-warning
Fix Visual Studio throwing C4996 warning in ustring.cpp.
2020-02-11 10:22:36 +01:00
Rémi Verschelde
6fb6405408
Merge pull request #36072 from RandomShaper/imvu/configfile_parse
Add ConfigFile::parse()
2020-02-11 09:21:45 +01:00
Rémi Verschelde
b390ad5a64
Merge pull request #36073 from RandomShaper/imvu/fix_variantparser_eof
Fix VariantParser::StreamString EOF determination
2020-02-10 12:44:51 +01:00
Rémi Verschelde
0ead0eeabb Merge pull request #35301 from Calinou/improve-console-error-logging
Improve the console error logging appearance
2020-02-10 11:16:01 +01:00
Pedro J. Estébanez
e5bd3b707f Add ConfigFile::parse() 2020-02-10 11:12:33 +01:00
Pedro J. Estébanez
521da75380 Fix VariantParser::StreamString EOF determination 2020-02-10 10:57:01 +01:00
Rémi Verschelde
b2a7c08cc4
Merge pull request #36011 from madmiraal/fix-33391
Remove do{ } while(0) wrapper around error macros.
2020-02-08 23:27:06 +01:00
Rémi Verschelde
3a5f45a6d1 Merge pull request #35682 from nathanwfranke/canvas-cull-control-fix
Fix bug where canvas culls things at origin with size 0
2020-02-08 14:14:10 +01:00
Marcel Admiraal
d2b02a3d7b Remove do{ } while(0) wrapper around error macros.
As pointed out by Faless, a do{ } while(0) wrapper around a continue or
break just ends the do{ } while(0) loop. The do{ } while(0) loop exists
to enable the macro to be used as a function which requires a semicolon.

The alternative approach is to use an if(1) { } else ((void)0) wrapper.
Since the macro already has an if(unlikely(m_cond)) { } this patch simply
adds the else ((void)0) to this if statement instead.

For consistency all the macros have been updated in the same way, and
trailing else warnings corrected. However, the wrappers around ERR_PRINT
and WARN_PRINT were removed, because they generated too many ambiguous
trailing else warnings. They are also single line macros so a wrapper is
not needed.
2020-02-08 11:21:46 +01:00
nathanwfranke
e5cb557b73 Fix bug where Control at origin with 0 size not rendered
Make a new method instead to make the code more elegant


Move Function down a bit
2020-02-07 14:43:27 -06:00
Rémi Verschelde
b7297fb39c SCons: Generate header with info on which modules are enabled
We already had `MODULE_*_ENABLED` defines but only in the modules
environment, and a few custom `*_ENABLED` defines in the main env
when we needed the information in core.

Now this is defined in a single header which can be included in the
files that need this information.
2020-02-07 11:31:37 +01:00
Rémi Verschelde
f120acceb8
Merge pull request #35887 from dankan1890/quick_fix
Fixed String::humanize_size crash.
2020-02-06 10:29:00 +01:00
Marcel Admiraal
677604685d Apply macro documentation from #35521. 2020-02-05 14:53:06 +01:00
Marcel Admiraal
110f4f2dc5 Remove trailing semicolons from do..while wrappers.
- Remove trailing semicolons from ERR_FAIL_INDEX macros.
- Remove trailing semicolons from ERR_FAIL_UNSIGNED_INDEX macros.
- Remove trailing semicolons from CRASH_BAD_INDEX macros.
- Remove trailing semicolons from CRASH_BAD_UNSIGNED_INDEX macros.
2020-02-05 11:19:40 +01:00
Marcel Admiraal
6d69cd40bd Add do..while(0) wrappers to macros without one.
- Add do..while(0) wrapper to ERR_FAIL_NULL macros.
- Add do..while(0) wrapper to ERR_FAIL_COND macros.
- Add do..while(0) wrapper to ERR_CONTINUE macros.
- Add do..while(0) wrapper to ERR_BREAK macros.
- Add do..while(0) wrapper to CRASH_COND macros.
- Add do..while(0) wrapper to ERR_FAIL macros.
- Add do..while(0) wrapper to ERR_PRINT macros.
- Add do..while(0) wrapper to WARN_PRINT macros.
- Add do..while(0) wrapper to WARN_DEPRECATED macros.
- Add do..while(0) wrapper to CRASH_NOW macros.
2020-02-05 11:19:12 +01:00
Marcel Admiraal
f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
Marcel Admiraal
2b1084fab3 Clean up error_macros.h 2020-02-05 11:13:02 +01:00
dankan1890
ca0ee767cb Fixed String::humanize_size crash.
Close #35872
2020-02-03 17:59:24 +01:00
Rémi Verschelde
505fee0b6d Color: Fix deprecation warning mentioning 'get_v()' instead of 'v'
Fixes #35657.
2020-01-28 12:41:04 +01:00
Rémi Verschelde
cab55bbb9d MessageQueue: Fix setting name in OOM error message
Cf. #35653.
2020-01-28 09:03:46 +01:00
Haoyu Qiu
f7d4e6ef6b Fixes invalid writes in Image operations 2020-01-28 13:47:28 +08:00
Rémi Verschelde
c8d64de766
Merge pull request #35521 from Calinou/improve-error-macros
Improve and document error macros
2020-01-26 16:39:11 +01:00
Rémi Verschelde
cbdbfb00ca doc: Document named color constants
Busywork but it's good for our completion rate :)
2020-01-26 12:08:16 +01:00