Matias N. Goldberg
364f916f3f
Add debug utilities for Vulkan
...
Features:
- Debug-only tracking of objects by type. See
get_driver_allocs_by_object_type et al.
- Debug-only Breadcrumb info for debugging GPU crashes and device lost
- Performance report per frame from get_perf_report
- Some VMA calls had to be modified in order to insert the necessary
memory callbacks
Functionality marked as "debug-only" is only available in debug or dev
builds.
Misc fixes:
- Early break optimization in RenderingDevice::uniform_set_create
============================
The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.
2024-08-21 23:48:08 +02:00
Rémi Verschelde
6e9bcc0f18
SCons: Better validation for platform-specific opt-in drivers
...
This replaces cryptic compilation errors with a clear error message
and early build termination.
2024-08-21 22:53:34 +02:00
bruvzg
66832e9968
[Windows] Run native file dialogs in thread to make it non-blocking.
2024-08-19 12:58:16 +03:00
Hilderin
0987a9dc06
Fix drag&drop between window on Windows
2024-08-16 18:40:46 -04:00
bruvzg
f72e74f395
[Windows/Linux] Check custom export templates architecture.
2024-08-16 15:52:12 +03:00
Rémi Verschelde
b084b6a8bb
Merge pull request #94971 from bruvzg/drv_msgs
...
[Windows] Improve video driver error messages.
2024-08-16 14:32:50 +02:00
Rémi Verschelde
a8bbb09bd5
Merge pull request #95143 from TV4Fun/fix_non_windows_library_load
...
Fix reload of GDExtension libraries in framework package on macOS
2024-08-16 10:35:19 +02:00
Alvin Wong
16a563b9ac
DisplayServerWindows: Fix logic when creating with transient parent
2024-08-15 04:10:15 +08:00
Joel Croteau
f44d6a235f
Fix reload of GDExtension libraries in framework package on macos
...
`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.
This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.
This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.
2024-08-08 08:31:49 -06:00
Rémi Verschelde
e693ff814a
Merge pull request #95155 from bruvzg/win_pen_checks
...
[Windows] Reject `WM_POINTER(UP/DOWN)` messages for non pen pointer type.
2024-08-06 12:32:02 +02:00
bruvzg
e5efde9481
[Windows] Reject WM_POINTER(UP/DOWN) messages for non pen pointer type.
2024-08-04 20:07:14 +03:00
bruvzg
27474c9563
[Windows] Check if transparency is enabled in the project setting before applying DWM blur.
2024-08-01 10:30:46 +03:00
Rémi Verschelde
1d57b81d26
Merge pull request #94976 from bruvzg/win_app_name
...
[Windows] Improve editor grouping, set friendly name registry key for exported projects.
2024-07-31 16:13:21 +02:00
bruvzg
3f8cc6678b
[Windows] Improve editor grouping, set friendly name registry key for exported projects.
2024-07-31 15:04:00 +03:00
Rémi Verschelde
3fce516155
Merge pull request #94428 from alvinhochun/windows-angle-resize-sync
...
Windows: Update ANGLE surface size when window is resized
2024-07-31 11:37:37 +02:00
bruvzg
68ae413893
[Windows] Improve video driver error messages.
2024-07-31 11:16:38 +03:00
bruvzg
ad0ab2f396
[Windows] Improve OpenGL/ANGLE switching on ARM64.
2024-07-30 10:11:58 +03:00
Rémi Verschelde
9a8f18b9bf
Merge pull request #94796 from kus04e4ek/backfall
...
Windows: Fall back to D3D12 if Vulkan is not supported and vice versa
2024-07-29 15:17:26 +02:00
Alvin Wong
25270d5907
Allow llvm-mingw sanitizers only on x86_32/x86_64
2024-07-28 17:21:35 +08:00
Alvin Wong
0cda0b935d
Windows: Add sanitizers for llvm-mingw, increase stack for ASan
...
ASan and UBSan are supported by llvm-mingw. They can be enabled by
passing `use_asan=yes use_ubsan=yes` to scons.
2024-07-28 04:32:18 +08:00
Alvin Wong
28c60a5ff9
Combine existing modes when calling SetConsoleMode
...
Otherwise the default modes will be cleared, which causes long lines to
be truncated in some terminals (e.g. Windows Terminal).
2024-07-28 00:32:40 +08:00
bruvzg
5d5d51937f
[Windows] Remove libSynchronization
2024-07-27 17:12:27 +03:00
Kusok
d30c1e6a8f
Fall back to D3D12 if Vulkan is not supported and vice versa
2024-07-27 16:17:20 +08:00
Rémi Verschelde
44342c385c
Merge pull request #94735 from aitorciki/nvdrs-memset-initialization
...
[Windows] Use default aggregate initialization for NVAPI settings
2024-07-26 13:44:13 +02:00
Aitor Guevara
21f3e69a24
[Windows] Use default aggregate initialization for NVAPI settings
...
Using the member initialization encouraged in NVAPI documentation for
NVDRS_SETTING results in builds enabling `dev_mode` breaking. Default
aggregate initialization results in a clean build though.
2024-07-25 14:41:46 +02:00
Alvin Wong
97aa278edb
Pass window exclusive and transient properties for subwindow creation
...
On Windows this allows to avoid having to change the owner of the window
after it has been created, which in rare circumstances may cause the
window to bug out.
2024-07-25 00:27:27 +08:00
bruvzg
52a2836861
Disable FP contraction.
2024-07-23 14:33:51 +03:00
Rémi Verschelde
a50fe87b89
Merge pull request #94078 from Repiteo/scons/msvc-flag-fix
...
SCons: Don't override cl flags on msvc
2024-07-22 14:12:45 +02:00
bruvzg
0e519118d2
[Windows] Fix release export template build for ARM64 Windows.
2024-07-19 14:33:40 +03:00
Rémi Verschelde
18da250ffb
Merge pull request #93737 from aitorciki/disable-windowed-gsync
...
[Windows] Disable G-SYNC in windowed mode
2024-07-19 11:10:31 +02:00
Rémi Verschelde
287521c2c2
Merge pull request #94466 from bruvzg/angle_update_lib
...
[Windows] Add `libSynchronization` to link flags.
2024-07-18 10:45:40 +02:00
Rémi Verschelde
ea018a8131
Merge pull request #94120 from bruvzg/fix_kbd_names
...
[Windows] Fix reading keyboard layout names.
2024-07-17 15:44:50 +02:00
Rémi Verschelde
1ca4ce284e
Merge pull request #94063 from bruvzg/tablet_drag
...
[Winink] Check pointer button states.
2024-07-17 15:44:47 +02:00
bruvzg
9f714bfde5
[Windows] Add libSynchronization
to link flags.
2024-07-17 10:58:03 +03:00
Alvin Wong
88581a7705
Support GPU preference for MS Store packaged apps
2024-07-16 23:46:37 +08:00
Alvin Wong
4091abd727
Respect integrated GPU preference in Windows Settings
2024-07-16 23:46:37 +08:00
Alvin Wong
a1a0acff7c
Windows: Update ANGLE surface size when window is resized
...
ANGLE needs to be told to resize the DXGI swap chain using
`eglWaitNative`. Otherwise the resize will only happen in
`eglSwapBuffers`, which causes some janky stretching during window
resize.
2024-07-16 17:01:42 +08:00
Alvin Wong
d7f023ab73
Windows: Do not attempt to resize surface before it is created
...
`WM_WINDOWPOSCHANGED` may be received before `CreateWindowExW` has even
returned, when the window's rendering context or OpenGL context hasn't
been created yet.
2024-07-16 17:01:42 +08:00
Alvin Wong
1d542257e5
Windows: Fix wrong initial size passed to rendering driver
2024-07-16 03:30:44 +08:00
bruvzg
3afe1e7481
[Winink] Check pointer button states, fix drag and double-click.
2024-07-15 12:23:07 +03:00
Rémi Verschelde
1aa1a1879d
Merge pull request #94203 from RandomShaper/bye_bye_dxil_dll
...
D3D12: Get rid of `DXIL.dll`!
2024-07-11 23:16:59 +02:00
Rémi Verschelde
6c2699cbf6
Merge pull request #94187 from akien-mga/windows-remove-unused-is_wow64
...
Remove unused `is_wow64` method in `OS_Windows`
2024-07-11 23:16:54 +02:00
Rémi Verschelde
c349f0d6a7
Remove unused is_wow64
method in OS_Windows
...
It was added in b4d369c88
for `get_processor_count`, but this was later
changed to rely on `std::thread` in 6bf02c016
.
2024-07-11 23:16:12 +02:00
Pedro J. Estébanez
ee2c1584e4
D3D12: Get rid of DXIL.dll!
2024-07-11 17:56:45 +02:00
Rémi Verschelde
1b49d6393d
Merge pull request #93733 from alvinhochun/windows-restore-sizing
...
Windows: Restore to windowed mode using `SW_NORMAL`
2024-07-11 09:40:58 +02:00
bruvzg
fea8ab0999
[Windows] Fix reading keyboard layout names.
2024-07-09 11:46:06 +03:00
Rémi Verschelde
3220b6fb11
Merge pull request #93976 from Hilderin/fix-caret-disappear-from-script-editor
...
Fix caret can disappear from script editor
2024-07-08 19:13:31 +02:00
Thaddeus Crews
0f691efb1b
SCons: Don't override cl flags on msvc
2024-07-08 09:48:18 -05:00
Hilderin
ebd1ab646c
Fix caret can disappear from script editor
2024-07-08 07:11:17 -04:00
Rémi Verschelde
ec02d406ca
Merge pull request #94067 from RandomShaper/fix_build
...
Windows: Fix build error due to missing definition of Texture2D
2024-07-08 11:48:36 +02:00
Pedro J. Estébanez
50bf2e5b37
Windows: Fix build error due to missing definition of Texture2D
2024-07-08 10:40:17 +02:00
bruvzg
eddc9cea11
[NativeMenu] Do not auto toggle check/multi-state items. Add is_native_menu
method.
2024-07-08 11:20:28 +03:00
Rémi Verschelde
abfce31ba7
Merge pull request #93152 from RandomShaper/prebuilt_asan
...
Enable usage of asan-enabled versions of prebuilt libraries
2024-07-02 17:27:31 +02:00
Aitor Guevara
b8edc64379
[Windows] Disable G-SYNC in windowed mode
...
G-SYNC (NVIDIA's VRR) is known to be buggy on windowed mode in Windows.
While the driver only enables G-SYNC for full screen mode by default,
users can toggle it on for windowed mode too, resulting in unstable
refresh rates during Editor usage.
This patch extends Godot's NVIDIA profile to force the default full
screen mode only G-SYNC with Godot.
2024-06-29 13:40:15 +02:00
Alvin Wong
c54477b7e6
Windows: Restore to windowed mode using SW_NORMAL
...
If window was maximized before minimizing, restoring the window
afterwards using SW_RESTORE seems to cause the window to forget its
original size and position before being maximized, causing the window to
fill the screen instead.
2024-06-29 18:24:45 +08:00
Pedro J. Estébanez
32d9c93af3
Improve handling of rendering startup errors
2024-06-28 19:31:50 +02:00
Max Hilbrunner
63911b994c
Windows: Fix arch detection via VCTOOLSINSTALLDIR
2024-06-25 13:31:46 +02:00
Rémi Verschelde
f3195bfcee
Merge pull request #93491 from patwork/fix-type-limits-windows-utils
...
Fix type-limits warning in `windows_utils`
2024-06-24 17:48:49 +02:00
Rémi Verschelde
f9c51183bb
Merge pull request #93342 from kus04e4ek/build-fix
...
Fix not using `encoding="utf-8"` when writing to files or reading from them
2024-06-24 11:14:10 +02:00
Thaddeus Crews
cc6dd8d02c
Style: Optimize .svg
files with svgo
2024-06-23 08:15:19 -05:00
patwork
2e84638147
Fix type-limits warning in windows_utils
2024-06-22 23:04:00 +02:00
bruvzg
04d70c11fc
[Windows/ARM64] Fix raycast/embree ARM64 build with LLVM/MinGW.
2024-06-20 15:52:04 +03:00
Kusok
0c6dbbd050
Fix not using encoding="utf-8"
when writing to files or reading from them
...
Co-authored-by: ChristopheClaustre <christophe.claustre.31@gmail.com>
2024-06-19 23:35:03 +08:00
Hugo Locurcio
29348be0ca
Tweak warning messages related to V-Sync on OpenGL
...
- Make warnings print only once per session.
- Tweak the message to be less confusing, and mention that the issue
most likely stems from a graphics driver limitation.
2024-06-16 21:22:10 +02:00
Pedro J. Estébanez
d1eebd3493
Enable usage of asan-enabled versions of prebuilt libraries
2024-06-14 14:06:38 +02:00
bruvzg
dbc4e3f350
[Windows] Add Windows version and Wine checks for Windows 10+ dark mode API.
2024-06-13 14:28:14 +03:00
kit
45c6971a36
Input use GetKeyState instead of GetAsyncKeyState
2024-06-12 18:37:31 -04:00
Rémi Verschelde
31277e43a7
Merge pull request #91890 from Repiteo/scons/silence_msvc-fixes
...
SCons: Fix `silence_msvc` implementation errors
2024-06-11 13:57:01 +02:00
Rémi Verschelde
b80e591448
Merge pull request #92843 from anniryynanen/tooltip-in-popup
...
Stop color picker tooltip from stealing input events
2024-06-10 16:11:52 +02:00
Rémi Verschelde
a139cd611a
Merge pull request #92826 from bruvzg/nat_icon_checks
...
Improve native menu and status indicator icons conversion and checks.
2024-06-07 23:30:39 +02:00
Rémi Verschelde
ea7d988b72
Merge pull request #92781 from bruvzg/menu_open_close_imp
...
[macOS] Improve native menu open/close callbacks.
2024-06-07 23:30:15 +02:00
Rémi Verschelde
e52658643d
Merge pull request #92702 from kleonc/cursor_image_from_atlas_texture_fix
...
Fix creating cursor image from `AtlasTexture`
2024-06-07 23:29:57 +02:00
Anni Ryynänen
ae1e2182ec
Stop color picker tooltip from stealing input events
...
Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.
I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.
I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.
Fixes #79500 .
2024-06-06 20:00:05 +03:00
bruvzg
28ec2240c4
Improve native menu and status indicator icons conversion and checks.
2024-06-06 07:46:09 +03:00
bruvzg
1f7bf27780
[macOS] Improve native menu open/close callbacks.
2024-06-05 20:22:41 +03:00
kleonc
91e995e704
Fix creating cursor image from AtlasTexture
2024-06-05 01:44:05 +02:00
Hilderin
e201e5bf30
Fix Windows Activate Process
2024-06-03 19:33:41 -04:00
bruvzg
5168647530
Use current mouse button state instead of saved values.
2024-05-31 15:50:14 +03:00
Rémi Verschelde
d30456fea8
Merge pull request #92415 from bruvzg/win_mod_keys
...
[Windows] Use current keyboard state instead of saved values for modifier keys.
2024-05-31 14:16:13 +02:00
patwork
909f28a534
Fix multichar warning in windows_utils
2024-05-30 13:58:56 +02:00
Rémi Verschelde
ffad49f169
Merge pull request #86029 from 0x0ACB/resize_fix
...
Remove dead code from `DisplayServerWindows::window_set_size`
2024-05-30 11:47:21 +02:00
Rémi Verschelde
c98fef08bf
Merge pull request #89033 from bruvzg/doc_end_err
...
[DisplayServer] Add error messages and descriptions to callbacks.
2024-05-28 17:48:42 +02:00
bruvzg
714effdf07
[DisplayServer] Add error messages and descriptions to callbacks.
2024-05-28 17:36:54 +03:00
Rémi Verschelde
576d9a5c12
Merge pull request #92325 from Repiteo/scons/res-race-condition-fix
...
SCons: Fix `RES` race condition
2024-05-28 15:48:12 +02:00
ACB
9dd1268306
remove dead code from DisplayServerWindows::window_set_size
2024-05-28 08:55:15 +02:00
bruvzg
62e41087d5
[Windows] Use current keyboard state instead of saved values for modifier keys.
2024-05-27 09:15:01 +03:00
bruvzg
fc89a0c118
Fix build with vuklan=no
and d3d12=no
after #91505 .
2024-05-25 21:08:50 +03:00
Thaddeus Crews
18fb492afe
SCons: Fix RES
race condition
2024-05-24 12:44:44 -05:00
bruvzg
628c81d2d9
[DisplayServer] Add method to check if window transparency is supported and enabled.
2024-05-23 15:23:18 +03:00
Rémi Verschelde
7870b28ed3
Merge pull request #92252 from poiati/fix-wayland-window-class
...
Properly set window class in Wayland
2024-05-23 08:59:23 +02:00
Thaddeus Crews
896b003cc8
SCons: Convert platform get_flags
to dictionary
2024-05-22 13:53:20 -05:00
Paulo Poiati
a3769c0edc
Properly set window class in Wayland
2024-05-22 10:42:12 -03:00
Jakub Marcowski
d9f8ef68df
Update pre-commit hooks configuration to use ruff
instead of black
2024-05-21 18:02:29 -05:00
bruvzg
497f65fa50
[Windows] Use CRLF in the terminal prints.
2024-05-20 14:23:17 +03:00
Thaddeus Crews
0ec4ec0f90
SCons: Fix silence_msvc
implementation errors
2024-05-14 12:22:54 -05:00
Rémi Verschelde
8a57f64255
Revert "Implement "get_mingw_tool" to fix mingw prefixes"
...
This reverts commits ecebe0b40d
and 15d37ed2a8
.
Fixes #91710 .
2024-05-09 11:10:32 +02:00
Pedro J. Estébanez
fc08eca524
DisplayServer: Avoid deadlocks while issuing input events and recursive main loop iterations
2024-05-08 17:41:40 +02:00
A Thousand Ships
a0dbdcc3ab
Replace find
with contains/has
where applicable
...
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde
a7f4860b72
Merge pull request #91698 from bruvzg/mingw_exe_size
...
[MinGW] Restore executable size check.
2024-05-08 12:31:36 +02:00
bruvzg
15d37ed2a8
[MinGW] Restore executable size check.
2024-05-08 12:43:02 +03:00