Commit Graph

127 Commits

Author SHA1 Message Date
bruvzg
74df6f192a
[macOS] Update Vulkan SDK install script. 2024-10-08 19:37:09 +03:00
David Snopek
6f7c52d17f Temporarily disable "validation errors no longer occur" warnings 2024-08-22 18:16:11 -05:00
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
Andreia Gaita
09f2b9513c Fix header_guards so it detects the copyright header properly.
Having hardcoded offsets is a problem if the copyright header ever changes
or when running on forks with different copyright header formats.
2024-07-23 12:19:20 +02:00
Pedro J. Estébanez
ee2c1584e4 D3D12: Get rid of DXIL.dll! 2024-07-11 17:56:45 +02:00
Thaddeus Crews
47babe860e
Style: Relocate godot_gdb_pretty_print.py 2024-06-23 10:54:12 -05:00
Thaddeus Crews
576c9e4fe8
CI: Add pre-commit hook for clang-tidy
• Set to "manual" so it isn't invoked in normal workflow
• Modernize `.clang-tidy` file
2024-06-17 11:27:18 -05:00
Jakub Marcowski
d9f8ef68df
Update pre-commit hooks configuration to use ruff instead of black 2024-05-21 18:02:29 -05:00
Thaddeus Crews
96d1e61ee6
CI: Fix incorrect executable perms 2024-05-17 10:47:40 -05:00
Rémi Verschelde
e63b5ba9e4
Merge pull request #91416 from Calinou/d3d12-sdk-update-install-script
Update dependencies in D3D12 SDK installer script
2024-05-15 13:51:31 +02:00
Thaddeus Crews
f4e58691c2
SCons: Consolidate pysettings via pyproject.toml 2024-05-14 12:01:48 -05:00
Mitten Orvan
829c33aed1
Create a GDB pretty printing file for String, StringName, and Vector
GDB supports custom pretty-printers implemented in Python.
When debugging Godot, checking the values of Strings and StringNames
in the debugger was very inconvenient as the data is fairly deep
in the structure. This makes the values immediately visible.

The custom pretty printer can be taken into use manually by calling
`source misc/scripts/godot_gdb_pretty_print.py` in the GDB console.
In VS code, it can be activated by default by adding the source
command to the `setupCommands` of the configuration in launch.json.

Like this:
```json
// launch.json
{
    "configurations": [
        {
            "name": "C/C++: debug,
            "type": "cppdbg",
	    ...
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Load custom pretty-printers for Godot types.",
                    "text": "source ${workspaceRoot}/misc/scripts/godot_gdb_pretty_print.py"
                }
            ],
            "miDebuggerPath": "gdb"
        }
    ],
    "version": "2.0.0"
}
```

Extended the pretty-printer python script to support Vectors.
The printer needs to be uncomfortably aware of CowData
implementation details, but I don't think there is any
way around that.
2024-05-11 12:33:35 +02:00
Thaddeus Crews
df969ff742
CI: Overhaul static checks to use pre-commit 2024-05-08 10:30:24 -05:00
Hugo Locurcio
47ac22486d
Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +02:00
Rémi Verschelde
4b070e8031
Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
ajreckof
d3d4b2e25e Fix infinite while loop on empty added file. 2024-04-12 19:38:37 +02:00
A Thousand Ships
4933fa8bf5
[Buildsystem] Fix encoding when reading files 2024-03-24 18:02:56 +01:00
Rémi Verschelde
e520359147
Pre-commit: Fix copyright_headers.py to run on all relevant files
It was only running on the first file passed by pre-commit, instead of all.
Fixes compatibility with Windows paths to get the basename.
2024-03-15 15:32:50 +01:00
Thaddeus Crews
fb299d0fb1
SCons: Ensure with statement where applicable 2024-03-10 12:57:57 -05:00
Thaddeus Crews
d9fa40f2df
Enforce \n eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Raul Santos
97851f0340
Move dotnet-format script to pre-commit
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2024-03-02 08:25:48 +01:00
Aarni Koskela
20c563de40
Replace hand-written pre-commit hooks with pre-commit Python tool
`pre-commit` can be installed with pip, and configured in the Godot repo with
`pre-commit install`. It can then easily be run both locally with
`pre-commit run`, and on CI, in a cross-platform way.

This makes it much easier for contributors to set up pre-commit hooks,
without having to manually copy files to their git folder.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-26 14:57:53 +01:00
Rémi Verschelde
5fd9d0891f
SCons: Add proper MinGW support to D3D12 deps install script
Fix a couple GCC warnings.
2024-02-23 22:13:22 +01:00
Rémi Verschelde
7223c5b54a
Fix various typos with codespell
Using 2.2.7.dev115+g0eb441d6.

Had to add `cancelled` to the ignore list, as it's a Wayland signal which
we're handling in our code, so we don't want codespell to fix that "typo".

Also includes the typo fix from #87927.

Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
2024-02-07 11:09:34 +01:00
A Thousand Ships
6da378afea
Fix printf for format checks
Prevents errors with input being invalid format strings
2024-02-02 15:10:46 +01:00
Rémi Verschelde
b4e519b07f
SCons: Fix Windows cross-compilation from Linux after #86717 2024-01-26 12:42:09 +01:00
MrBBBaiXue
ea2c6f1d0b Add a python script to install Direct3D 12 SDK components.
This makes it much faster to get started with Direct3D 12 builds,
as you only need to run `python .\misc\scripts\install_d3d12_sdk_windows.py`
then run `scons d3d12=yes`.

This installs DirectX Shader Compiler, Mesa NIR, WinPixEventRuntime
and DirectX 12 Agility SDK.

- Define a default path that uses the locations from the script.
- Now the default path is in "%LOCALAPPDATA%\Godot\build_deps\"
- Updated CI to use this new python script.

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-01-24 20:11:43 +08:00
Thaddeus Crews
8cd984b3cb
SCons: Update mypy 2023-12-11 15:59:06 -06:00
Rémi Verschelde
ba713c80df
Fix various typos with codespell
Using 2.2.7.dev51+geb4a58fe.
2023-11-11 23:01:24 +01:00
bruvzg
1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
RedworkDE
e36bd595fa CI: Compat checks: Make fetching the reference API more robust 2023-09-05 15:27:44 +02:00
RedworkDE
b83dff752c CI: Compare API compatibility against both 4.0 and 4.1 2023-08-30 23:33:09 +02:00
Rémi Verschelde
5b5471e30a
Merge pull request #78908 from zorbathut/pr_gitignore
Add static check for overzealous .gitignores and fix an example of such.
2023-08-29 12:41:53 +02:00
bruvzg
231c07d1af
Fix API validation script on macOS. 2023-08-10 08:46:34 +03:00
Rémi Verschelde
858e8748e8
Fix or workaround recent extension API compatibility issues
- Add compatibility methods for `RenderingDevice::shader_create_from_bytecode`
  and `CodeEdit::get_text_for_symbol_loopup`.
- Silence errors which now have compatibility methods.
- Acknowledge GraphEdit/GraphNode compat breakage, intended and WIP.
2023-08-03 12:07:21 +02:00
Ben Rog-Wilhelm
7ea171adca Add static check for overzealous .gitignores. 2023-07-01 08:41:36 -05:00
Rémi Verschelde
6fb391bc23
Fix various typos with codespell
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
RedworkDE
3ed8721c97 Update list of known breaking changes compared to 4.0-stable (3) 2023-06-14 16:06:24 +02:00
RedworkDE
0cf491bcb5 Allow validating the extension api against a reference version and a list of known changes. 2023-05-19 18:43:04 +02:00
Rémi Verschelde
b226f7e587
CI: Make codespell checks blocking, but only check changed files 2023-05-08 11:50:55 +02:00
Rémi Verschelde
068f893072
CI: Speed up static checks by checking only changed files
- file_format, header_guards and clang-format benefit from this short list.
- dotnet-format, Python and JS checks don't, but they're only relevant for
  PRs changing a specific set of files, so we skip them when those files
  aren't modified.

The logic to get changed files only works reliably for:
- Pull request events
- Non-force pushed push events

So when force pushing a branch in your fork, or creating a new branch,
it will still scan all files as fallback.

Upgraded CI runner to Ubuntu 22.04 so we get clang-format 14 out of the box,
so we don't need to install a custom version (saves ~15 s). We also cache
the APT dependencies to speed up the build and avoid flaky Ubuntu/Microsoft
repos.
2023-04-20 11:40:09 +02:00
Rémi Verschelde
266280ffca
CI: Visibly print trailing whitespace when static checks fail
GitHub Actions seems to be hiding colored whitespace, and after lots of
attempts I couldn't find a way to work it around.

So instead I'm using a perl expression to replace trailing spaces with
`·` and tabs with `<TAB>` in the ANSI colored diff output. This ensure
that they're visible, and they are properly colored as expected too.
2023-04-05 18:31:46 +02:00
Rémi Verschelde
491ded1898
Minor typo and docs URL fixes 2023-02-28 13:38:01 +01:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
Rémi Verschelde
394bb0ee2b
Fix various typos with codespell
Finally do the childs -> children rename too.
2023-02-01 08:45:41 +01:00
Rémi Verschelde
312011fade
Fix various typos with codespell
And include #72377.

Co-authored-by: Wiktor Kocielski <withaust@gmail.com>
2023-01-30 14:22:47 +01:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Aaron Franke
06450bfb0f
Fix file formatting script dependencies and cleanup 2023-01-12 16:25:21 -06:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
bruvzg
c6498b0f1f
[CI] Use multiple forced unmount attempts for MoltenVK image. 2023-01-03 11:16:30 +02:00