Commit graph

5088 commits

Author SHA1 Message Date
Rémi Verschelde c7a4e2196e
Merge pull request #47878 from clayjohn/rename-get_surface_material
Rename get_surface_material to get_surface_override_material
2021-04-15 07:57:15 +02:00
clayjohn 92731d292c Rename get_surface_material to get_surface_override_material 2021-04-14 20:24:03 -07:00
Rémi Verschelde b6a31d0bf6
Merge pull request #47890 from akien-mga/etcpak-compress-only
etcpak: We only need the compression code, remove rest of etcpak app
2021-04-14 17:44:20 +02:00
Rémi Verschelde 638cfec853
etcpak: We only need the compression code, remove rest of etcpak app
We do our own image loading, threading, and memory management in Godot already,
so the only components we need from etcpak (at least as of now) are the
`Compress*` methods defined in `ProcessDxtc.cpp` and `ProcessRGB.cpp`.

So we don't need to compile or vendor the rest.
2021-04-14 16:50:02 +02:00
reduz d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
George Marques 8fc4a732de
Merge pull request #47330 from Blackiris/fix-corrupt-scene-when-export-has-setter
Fix corrupt scene when export var has setter
2021-04-14 10:00:57 -03:00
Rémi Verschelde 3d1d3ab3db
Merge pull request #47807 from Blackiris/fix-is-type-treated-as-address
Fix type argument in is_builtin which was treated as an address
2021-04-14 14:50:02 +02:00
Julien Nguyen 79a16b8a44 Fix corrupt scene when export var has setter 2021-04-14 09:14:50 +02:00
K. S. Ernest (iFire) Lee 3cae9a802b Export gltf2 normal textures correctly. 2021-04-13 13:28:26 -07:00
K. S. Ernest (iFire) Lee d840165a32
Add etcpak library for faster ETC/ETC2/S3TC imports.
- `etc` module was renamed to `etcpak` and modified to use the new library.
- PKM importer is removed in the process, it's obsolete.
- Old library `etc2comp` is removed.
- S3TC compression no longer done via `squish` (but decompression still is).
- Slight modifications to etcpak sources for MinGW compatibility,
  to fix LLVM `-Wc++11-narrowing` errors, and to allow using vendored or
  system libpng.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-04-13 00:12:12 +02:00
Julien Nguyen 9936abb3d5 Fix type argument in is_builtin which was treated as an address 2021-04-11 20:34:48 +02:00
George Marques cf4079cb5f
Reduce number of addressing modes in GDScript VM
There's now only 3 addressing modes: stack, constant, and member.

Self, class, and nil are now present respectively in the first 3 stack
slots. Global and class constants are moved to local constants when
compiling. Named globals is only present on editor to use on tool
singletons, so its use now emits a new instruction to copy the global to
the stack.

This allow us to further optimize the VM later by embedding the
addressing modes in the instructions themselves, which is better done
with less permutations.
2021-04-08 14:29:55 -03:00
Lyuma 7d8e981262 Fix crash on importing empty .fbx file 2021-04-08 02:50:01 -07:00
Fabio Alessandrelli f7ae5442a6
Merge pull request #47708 from Calinou/doc-websocketclient-secure
Document secure wss:// caveats for WebSocketClient
2021-04-08 00:47:04 +02:00
Rémi Verschelde 40dff7117a
Merge pull request #47648 from Blackiris/fix-gdscript-editor-hangs
Fix infinite loop when guessing argument type from parent class
2021-04-07 23:19:29 +02:00
Rémi Verschelde 73a1253095
Merge pull request #47672 from Blackiris/fix-setter-stackoverflow
Fix stack overflow in setter
2021-04-07 23:17:30 +02:00
Hugo Locurcio a56e37545b
Document secure wss:// caveats for WebSocketClient
See https://github.com/godotengine/godot/issues/37739.
2021-04-07 21:32:17 +02:00
Rémi Verschelde e261c2dd9d
Merge pull request #46877 from W4RH4WK/always-dynamically-allocate-property-table
Always dynamically allocate PropertyTable
2021-04-07 11:25:38 +02:00
Marcel Admiraal ff9a6c4e39 Check for the use of an empty shape in Bullet Kinematic collisions 2021-04-06 18:40:13 +01:00
Julien Nguyen 43c1c680f0 Fix stack overflow in setter 2021-04-06 19:00:08 +02:00
Bastiaan Olij 81131bd844 Only cleanup meta data if GDNative library is reloadable and we're about to unload it 2021-04-06 11:55:15 +10:00
Julien Nguyen 20f18f1621 Fix infinite loop when guessing argument type from parent class 2021-04-05 16:39:41 +02:00
Rémi Verschelde 5b2c4ad91c
Merge pull request #47569 from vnen/gdscript-typed-return
GDScript: Properly validate return type
2021-04-05 15:16:43 +02:00
George Marques 35682d3079
GDScript: Properly validate return type
When the type cannot be validated at compile time, the runtime must do a
check to ensure type safety is kept, as the code might be assuming the
return type is correct in another place, leading to crashes if the
contract is broken.
2021-04-05 09:52:05 -03:00
Rémi Verschelde d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
Rémi Verschelde 9bbe51dc27
Style: Apply clang-tidy's modernize-use-nullptr 2021-04-05 14:05:07 +02:00
Rémi Verschelde 65a2888057
Style: Apply clang-tidy's modernize-use-default-member-init 2021-04-05 13:37:27 +02:00
Rémi Verschelde 0f0c0e5933
Style: Apply clang-tidy's modernize-use-bool-literals 2021-04-05 13:16:35 +02:00
Rémi Verschelde 33b8f1448e
Merge pull request #47592 from jmb462/fix-VisualScriptFunctionState-connect-to-null-signal-crash
Fix VisualScriptFunctionState connect to null object crash (Fix #47572)
2021-04-05 12:15:58 +02:00
Rémi Verschelde e0b24467f7
Merge pull request #47627 from Blackiris/fix-gdscript-var-address
Fix GDScript variables addresses getting mixed
2021-04-05 11:55:47 +02:00
Rémi Verschelde 77dc4c3cb6
Merge pull request #47636 from qarmin/input
Fix crashes in *_input functions
2021-04-05 11:54:08 +02:00
Rafał Mikrut 504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Julien Nguyen 3168c2a513 Fix GDScript variables addresses getting mixed 2021-04-04 19:03:15 +02:00
Jan Haller 0fe851da23 Fixes #47607 (forgotten statement in GDNative cleanup)
Co-authored-by: geekrelief <geekrelief@gmail.com>
2021-04-04 16:11:16 +02:00
jmb462 3a0a71fa6a Fix VisualScriptFunctionState connect to null object crash 2021-04-03 12:13:26 +02:00
Rémi Verschelde ed2f51b15f
Merge pull request #47452 from BastiaanOlij/xr_positional_tracker_ref
Change XRPositionalTracker to a reference (master)
2021-04-03 10:13:23 +02:00
Rémi Verschelde 4b6e9f3157
Merge pull request #46991 from madmiraal/rename-invert-reverse
Rename Array.invert() to Array.reverse()
2021-04-01 13:32:22 +02:00
Kyle 618dd892f5 Fix gdnative config file set as null
Fixes #

Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error.
2021-03-31 15:00:31 -04:00
Rémi Verschelde 9cd1e50969
Merge pull request #47250 from BastiaanOlij/check_vulkan_version
Obtain supported Vulkan API
2021-03-31 13:45:43 +02:00
Bastiaan Olij e93c9fc4ed As GLSLang seems to be all or nothing, added our own defines 2021-03-31 21:47:25 +11:00
bruvzg 0d3fa2a125
[Complex Text Layouts] Provide access to glyph contour points. 2021-03-31 09:32:14 +03:00
Rémi Verschelde 737f09895d
Merge pull request #47131 from vnen/gdscript-export-fix
Fix a few issues with @export in GDScript
2021-03-30 15:12:04 +02:00
Rémi Verschelde 7c14e987b4
Merge pull request #47492 from vnen/gdscript-typed-arrays
GDScript: Fix array type check on constants
2021-03-30 14:37:42 +02:00
George Marques 5d9585d83b
GDScript: Fix array type check on constants
They mistakenly pointing to the wrong union member (variable instead of
constant).
2021-03-30 09:09:13 -03:00
George Marques 2b9be53243
GDScript: Implement export of typed arrays 2021-03-30 08:29:38 -03:00
George Marques 160c260495
GDScript: Allow export of enum variables
Also fix the enum type in variables to be integer.
2021-03-30 08:29:38 -03:00
George Marques 3e4ecd9669
GDScript: Show error on invalid initializer expression 2021-03-30 08:29:38 -03:00
George Marques 577a17980d
Move GDSript annotation application after type-checking
This ensures that annotations that rely on the datatype (such as
@export) can validated it timely, allowing compound expressions instead
of only literal values.
2021-03-30 08:29:36 -03:00
Rémi Verschelde d71eed2865
FBX: Fix first bone getting unnecessary '_1' suffix
Fixes #43820.

Co-authored-by: Gordon MacPherson <gordon@gordonite.tech>
2021-03-29 17:25:12 +02:00
Rémi Verschelde aba03110ba
Merge pull request #46830 from vnen/gdscript-typed-arrays
GDScript typed arrays
2021-03-29 16:47:38 +02:00