Commit Graph

44884 Commits

Author SHA1 Message Date
reduz f649678402 Clean up Shader Preprocessor
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
Yuri Roubinsky 7b94603baa Adding shader preprocessor support
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-22 22:51:57 +02:00
Rémi Verschelde 79463aa5de
Merge pull request #63310 from akien-mga/scons-vsproj-windows
SCons: Prevent using `vsproj` option outside Windows
2022-07-22 17:44:45 +02:00
Rémi Verschelde ed2a741eb1
Merge pull request #63317 from dallonf/redundant-gdscript-errors 2022-07-22 17:05:46 +02:00
Dallon Feldner 07ddc8b3b8 Don't print redundant errors when parsing GDScript
The error macros print a generic error, which isn't necessary, and could be confusing to end users.
2022-07-22 09:30:52 -05:00
Rémi Verschelde d2fa9cbdfd
Merge pull request #63141 from reduz/implement-thread-runner 2022-07-22 13:25:31 +02:00
Rémi Verschelde 4e56f96396 SCons: Prevent using `vsproj` option outside Windows
Fixes #63305.
2022-07-22 12:53:14 +02:00
Rémi Verschelde 653f95282c
Merge pull request #62996 from reduz/feature-build-profiles 2022-07-22 12:50:20 +02:00
reduz 67a260d63f Implement a Worker ThreadPool
This PR implements a worked thread pool. It uses a fixed amount of threads in a pool and allows scheduling tasks
that can be run on threads (and then waited for). It satisfies the following use cases:

* HTML5 thread count is fixed (and similar restrictions are known in consoles) so we need to reuse threads.
* Thread spawning is slow in general, so reusing threads is faster anyway.
* This implementation supports recursive waiting for tasks, making it less prone to deadlocks if threads from the pool also run tasks.

After this is approved and merged, subsequent PRs will be needed to replace the ThreadWorkPool usage by this class.
2022-07-22 11:46:48 +02:00
Rémi Verschelde f37990ed77
Merge pull request #63278 from akien-mga/scons-linux-refactor-linker 2022-07-22 11:40:10 +02:00
reduz 6236a688b7 Implement Feature Build Profiles
This PR is a continuation of #50381 (which was implemented exactly a year ago!)

* Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out).
* Add a detection system to scan the project and figure out the actual classes used.
* Added the ability for SCons to load build profiles.

Obligatory Screen:

A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size

TODO:

* Script languages need to implement used class detection (left for another PR).
* Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size.
* Options to disable some modules would be desired.
* More options to disable drivers (OpenGL, Vulkan, etc) would be desired.

In general this PR is a starting point for more contributors to improve and enhance this functionality.
2022-07-22 10:53:23 +02:00
Rémi Verschelde ed926c4ec1
Merge pull request #63303 from hansemro/x11-eraser-case-insensitive
[X11] Do case-insensitive search for pen inversion detection
2022-07-22 09:17:04 +02:00
Rémi Verschelde e92f22691c
Merge pull request #63302 from nathanfranke/rounded-svg
Round dimensions of SVG to work around floating point precision errors
2022-07-22 09:15:54 +02:00
Hansem Ro 0f5436098b [X11] Do case-insensitive search for pen inversion detection 2022-07-21 19:25:22 -07:00
Nathan Franke eb8482cf95
round dimensions of svg 2022-07-21 20:11:29 -05:00
Rémi Verschelde c8479c0d4d SCons: Refactor Linux linker options with `linker=<bfd|gold|lld|mold>`
The new option is `linker` and lets the user specify the argument to
the`-fuse_ld=` linker flag directly. The supported options are:

- `default`: No change, typically uses GNU ld (bfd) unless the user or
  distro picked a different default `/usr/bin/ld`.
- `bfd`: GNU ld from binutils
- `gold`: GNU gold from binutils
- `lld`: lld from LLVM
- `mold`: mold, an extremely fast modern linker, not (yet) intended for
  use in production but great for development speed. Provided by distro
  `mold` package or needs to be compiled from source and installed to
  `/usr` otherwise.

Removes the `use_lld=yes` option, and make lld actually usable with GCC
too.

Not all the above are compatible or recommend for LTO, we recommend
using GNU ld with GCC LTO, or lld with LLVM ThinLTO.
2022-07-22 01:00:35 +02:00
Rémi Verschelde b3bd082070
Merge pull request #63295 from winterpixelgames/master-allow-scroll-container-scroll-to-be-set-instantly 2022-07-22 00:51:43 +02:00
Rémi Verschelde 19db9ed863
Merge pull request #63286 from RandomShaper/fix_debugger_focus 2022-07-22 00:48:06 +02:00
Rémi Verschelde 2280f85bc5
Merge pull request #63300 from KoBeWi/local_speciality 2022-07-22 00:32:07 +02:00
Rémi Verschelde 9b782b7573
Merge pull request #63242 from m4gr3d/fix_slow_copy_main
Address slow copy performance when using the `FileAccessFilesystemJAndroid` implementation
2022-07-22 00:22:30 +02:00
kobewi b42bbca266 Fix node dragging not working when dock is moved 2022-07-21 23:57:52 +02:00
Pedro J. Estébanez 033001375f Fix editor re-focus on debugger break on Windows 2022-07-21 21:47:05 +02:00
Yuri Rubinsky 74be36e622
Merge pull request #63289 from Chaosus/code_style_tolerance
Rename `epsilon` to `tolerance` in the `Plane::has_point` method
2022-07-21 21:52:03 +03:00
Jason Knight 48f2d128d4 Call update_scrollbars() in sort_children() so the max is set properly so you can set scroll_container.scroll_vertical instantly after adding children to a scroll container. 2022-07-21 12:23:41 -06:00
Yuri Rubinsky ccc56cc6d4 Rename `epsilon` to `tolerance` in the `Plane::has_point` method 2022-07-21 20:15:15 +03:00
Fredia Huya-Kouadio 31712cc9e7 Address slow copy performance when using the `FileAccessFilesystemJAndroid` implementation.
Read/write ops for this implementation are done through the java layer via jni, and so for good performance, it's key to avoid numerous repeated small read/write ops due the jni overhead.

The alternative is to allocate a (conversatively-sized) large buffer to reduce the number of read/write ops over the jni boundary.
2022-07-21 09:06:29 -07:00
Rémi Verschelde d6b1dd4854
Merge pull request #63128 from cdemirer/fix-callable-comparator-error-message-argcount 2022-07-21 16:50:39 +02:00
Rémi Verschelde ea3d355f0a
Merge pull request #62433 from KoBeWi/🌈 2022-07-21 16:36:34 +02:00
Rémi Verschelde f40aafeb39
Merge pull request #63244 from KoBeWi/canvas_picker 2022-07-21 16:34:16 +02:00
Rémi Verschelde 35d7b94a54
Merge pull request #63281 from luzpaz/typos 2022-07-21 14:10:01 +02:00
luz paz 38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
Rémi Verschelde 554be0c88e
Merge pull request #63280 from bruvzg/macos_help_scr 2022-07-21 13:25:10 +02:00
bruvzg 3833165d85
[Export] Update generated CLI helper script to work on clean macOS Monterey installation. 2022-07-21 13:50:37 +03:00
kobewi dabe021f19 Fix selection list in 2D editor 2022-07-21 12:24:02 +02:00
Rémi Verschelde a9e4eac7b9
Merge pull request #63225 from bruvzg/mac_rename 2022-07-21 10:25:26 +02:00
Rémi Verschelde e63ddd9e4f
Merge pull request #63272 from akien-mga/ci-linux-san-lld 2022-07-21 09:35:49 +02:00
Rémi Verschelde 26f9e87235 CI: Use Gold (GCC) and LLD (Clang) as linker for Linux sanitizers builds
They're very memory hungry to a point where GNU ld can crash on CI.
Both Gold and LLD should be nicer to RAM and thus a safer option.
2022-07-21 08:53:11 +02:00
bruvzg 8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
Rémi Verschelde 292c952e3b
Merge pull request #63264 from MinusKube/file-bad-icon-bug
Fix FileInfo::import_valid always being set to false for TextFile in some cases
2022-07-21 08:35:28 +02:00
MinusKube a4ddb033c9 Fix FileInfo::import_valid always being set to false for TextFile in some cases 2022-07-20 23:51:29 +02:00
Rémi Verschelde 976cb7ea9f
Merge pull request #63235 from kleonc/canvas-item-remove-from-canvas-group 2022-07-20 22:37:32 +02:00
Rémi Verschelde 010289a076
Merge pull request #58457 from PhoenixFlame101/master
Fix code folding icon color not matching defined color
2022-07-20 22:34:25 +02:00
Rémi Verschelde 0f6028378f
Merge pull request #63127 from KoBeWi/raise_from_picture 2022-07-20 22:34:05 +02:00
Rémi Verschelde fa2dcc7ace
Merge pull request #47935 from HaSa1002/doc-loading-run-time 2022-07-20 22:33:49 +02:00
Rémi Verschelde 5db878a76e
Merge pull request #63170 from KoBeWi/main_failed 2022-07-20 22:33:18 +02:00
Rémi Verschelde 4ba6c9a19f
Merge pull request #63229 from Chaosus/vs_fix_icons 2022-07-20 22:25:04 +02:00
PhoenixFlame101 dd8cee4b50 Fix code folding icon color not matching defined color
Caused by reusing icons from the main editor in the code editor. These
icons were converted based on the main editor theme and not the code
editor theme.

 - Create new icons for use specifically in the code editor
 - Add these icons to the exceptions when converting dark theme icons
   to light theme automatically
 - Change the default value of the code folding color to match previous
   color
 - Code folding icon is now pure white by default to correctly match
   the color defined in settings
2022-07-20 23:05:47 +03:00
Rémi Verschelde 3fe89e7fa9
Merge pull request #63237 from RandomShaper/amend_error_msg 2022-07-20 21:39:43 +02:00
Rémi Verschelde e1901008a5
Merge pull request #63247 from YuriSizov/toolbars-go-with-the-flow 2022-07-20 21:38:56 +02:00
kleonc 57ff4032d0 Fix `CanvasItem` not exiting its canvas group on canvas exit 2022-07-20 21:35:31 +02:00