diff options
Diffstat (limited to 'misc')
| -rw-r--r-- | misc/dist/linux/godot.6 | 8 | ||||
| -rw-r--r-- | misc/dist/shell/_godot.zsh-completion | 2 | ||||
| -rw-r--r-- | misc/dist/shell/godot.bash-completion | 2 | ||||
| -rw-r--r-- | misc/dist/shell/godot.fish | 2 | ||||
| -rw-r--r-- | misc/extension_api_validation/4.0-stable_4.1-stable.expected (renamed from misc/extension_api_validation/4.0-stable.expected) | 98 | ||||
| -rw-r--r-- | misc/extension_api_validation/4.1-stable.expected | 118 | ||||
| -rw-r--r-- | misc/scripts/gitignore_check.sh | 26 | ||||
| -rwxr-xr-x | misc/scripts/validate_extension_api.sh | 33 |
8 files changed, 187 insertions, 102 deletions
diff --git a/misc/dist/linux/godot.6 b/misc/dist/linux/godot.6 index 2481869d8a..beb92c96b5 100644 --- a/misc/dist/linux/godot.6 +++ b/misc/dist/linux/godot.6 @@ -58,6 +58,9 @@ Password for remote filesystem. \fB\-\-audio\-driver\fR <driver> Audio driver ('PulseAudio', 'ALSA', 'Dummy'). .TP +\fB\-\-audio\-output\-latency\fR <ms> +Override audio output latency in milliseconds (default is 15 ms). Lower values make sound playback more reactive but increase CPU usage, and may result in audio cracking if the CPU can't keep up. +.TP \fB\-\-video\-driver\fR <driver> Video driver ('Vulkan', 'GLES2'). .SS "Display options:" @@ -105,8 +108,11 @@ Show collisions shapes when running the scene. \fB\-\-debug\-navigation\fR Show navigation polygons when running the scene. .TP +\fB\-\-max\-fps\fR <fps> +Set a maximum number of frames per second rendered (can be used to limit power usage). A value of 0 results in unlimited framerate. +.TP \fB\-\-frame\-delay\fR <ms> -Simulate high CPU load (delay each frame by <ms> milliseconds). +Simulate high CPU load (delay each frame by <ms> milliseconds). Do not use as a FPS limiter; use --max-fps instead. .TP \fB\-\-time\-scale\fR <scale> Force time scale (higher values are faster, 1.0 is normal speed). diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion index 89fe840166..490af0a8a5 100644 --- a/misc/dist/shell/_godot.zsh-completion +++ b/misc/dist/shell/_godot.zsh-completion @@ -43,6 +43,7 @@ _arguments \ '--remote-fs[use a remote filesystem]:remote filesystem address' \ '--remote-fs-password[password for remote filesystem]:remote filesystem password' \ '--audio-driver[set the audio driver]:audio driver name' \ + '--audio-output-latency[override audio output latency in milliseconds (default is 15 ms)]:number of milliseconds' \ '--display-driver[set the display driver]:display driver name' \ "--rendering-method[set the renderer]:renderer name:((forward_plus\:'Desktop renderer' mobile\:'Desktop and mobile renderer' gl_compatibility\:'Desktop, mobile and web renderer'))" \ "--rendering-driver[set the rendering driver]:rendering driver name:((vulkan\:'Vulkan renderer' opengl3\:'OpenGL ES 3.0 renderer' dummy\:'Dummy renderer'))" \ @@ -69,6 +70,7 @@ _arguments \ '--debug-collisions[show collision shapes when running the scene]' \ '--debug-navigation[show navigation polygons when running the scene]' \ '--debug-stringnames[print all StringName allocations to stdout when the engine quits]' \ + '--frame-delay[set a maximum number of frames per second rendered (can be used to limit power usage), a value of 0 results in unlimited framerate]:maximum frames per seocnd' \ '--frame-delay[simulate high CPU load (delay each frame by the given number of milliseconds)]:number of milliseconds' \ '--time-scale[force time scale (higher values are faster, 1.0 is normal speed)]:time scale' \ '--disable-vsync[disable vertical synchronization even if enabled in the project settings]' \ diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion index a7ce11e524..c78f0a1f33 100644 --- a/misc/dist/shell/godot.bash-completion +++ b/misc/dist/shell/godot.bash-completion @@ -46,6 +46,7 @@ _complete_godot_options() { --remote-fs --remote-fs-password --audio-driver +--audio-output-latency --display-driver --rendering-method --rendering-driver @@ -72,6 +73,7 @@ _complete_godot_options() { --debug-collisions --debug-navigation --debug-stringnames +--max-fps --frame-delay --time-scale --disable-vsync diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish index ed58d8dcf6..fbfa7344f1 100644 --- a/misc/dist/shell/godot.fish +++ b/misc/dist/shell/godot.fish @@ -59,6 +59,7 @@ complete -c godot -l render-thread -d "Set the render thread mode" -x -a "unsafe complete -c godot -l remote-fs -d "Use a remote filesystem (<host/IP>[:<port>] address)" -x complete -c godot -l remote-fs-password -d "Password for remote filesystem" -x complete -c godot -l audio-driver -d "Set the audio driver" -x +complete -c godot -l audio-output-latency -d "Override audio output latency in milliseconds (default is 15 ms)" -x complete -c godot -l display-driver -d "Set the display driver" -x complete -c godot -l rendering-method -d "Set the renderer" -x -a "(godot_rendering_method_args)" complete -c godot -l rendering-driver -d "Set the rendering driver" -x -a "(godot_rendering_driver_args)" @@ -89,6 +90,7 @@ complete -c godot -l remote-debug -d "Enable remote debugging" complete -c godot -l debug-collisions -d "Show collision shapes when running the scene" complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene" complete -c godot -l debug-stringnames -d "Print all StringName allocations to stdout when the engine quits" +complete -c godot -l max-fps -d "Set a maximum number of frames per second rendered (can be used to limit power usage), a value of 0 results in unlimited framerate" -x complete -c godot -l frame-delay -d "Simulate high CPU load (delay each frame by the given number of milliseconds)" -x complete -c godot -l time-scale -d "Force time scale (higher values are faster, 1.0 is normal speed)" -x complete -c godot -l disable-render-loop -d "Disable render loop so rendering only occurs when called explicitly from script" diff --git a/misc/extension_api_validation/4.0-stable.expected b/misc/extension_api_validation/4.0-stable_4.1-stable.expected index 823af03c8e..5c3bf07fb2 100644 --- a/misc/extension_api_validation/4.0-stable.expected +++ b/misc/extension_api_validation/4.0-stable_4.1-stable.expected @@ -1,21 +1,5 @@ -This file contains the expected output of --validate-extension-api when run against the extension_api.json of the -4.0-stable tag (the basename of this file). - -Only lines that start with "Validate extension JSON:" matter, everything else is considered a comment and ignored. They -should instead be used to justify these changes and describe how users should work around these changes. - -Add new entries at the end of the file. - -======================================================================================================================== - -Misc ----- -Validate extension JSON: API was removed: classes/FramebufferCacheRD -Validate extension JSON: API was removed: classes/UniformSetCacheRD - -FIXME: These aren't written when dumping the interface with a headless build -(since there's no RD backend in use). We need to fix this inconsistency somehow. - +This file contains, when concatenated to the expected output since 4.1, the expected output of --validate-extension-api +when run against the extension_api.json of the 4.0-stable tag (first part of the basename of this file). ## Changes between 4.0-stable and 4.1-stable @@ -365,81 +349,3 @@ Validate extension JSON: Error: Hash changed for 'classes/EditorUndoRedoManager/ Validate extension JSON: Error: Hash changed for 'classes/UndoRedo/methods/create_action', from 0AEC1BFC to E87757EB. This means that the function has changed and no compatibility function was provided. Added a optional parameters with default values. No adjustments should be necessary. - - -## Changes between 4.1-stable and 4.2-stable - -GH-79911 --------- -Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/BarrierMask/values/BARRIER_MASK_RASTER': value changed value in new API, from 1.0 to 9. -Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/BarrierMask/values/BARRIER_MASK_ALL_BARRIERS': value changed value in new API, from 7.0 to 32767. -Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/BarrierMask/values/BARRIER_MASK_NO_BARRIER': value changed value in new API, from 8.0 to 32768. -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_update/arguments/3': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_copy/arguments/9': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_clear/arguments/6': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_resolve_multisample/arguments/2': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/buffer_update/arguments/4': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/buffer_clear/arguments/3': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/draw_list_end/arguments/0': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Hash changed for 'classes/RenderingDevice/methods/draw_list_end', from 19365687 to E9B4FA8E. This means that the function has changed and no compatibility function was provided. -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/compute_list_end/arguments/0': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Hash changed for 'classes/RenderingDevice/methods/compute_list_end', from 19365687 to E9B4FA8E. This means that the function has changed and no compatibility function was provided. -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/barrier/arguments/0': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/barrier/arguments/1': default_value changed value in new API, from "7" to "32767". -Validate extension JSON: Error: Hash changed for 'classes/RenderingDevice/methods/barrier', from 0FE50041 to DD9E8DAB. This means that the function has changed and no compatibility function was provided. - -Raster barrier was split into vertex and fragment barriers for use in mobile renderer. - - -GH-79308 --------- -Validate extension JSON: API was removed: classes/GraphEdit/methods/get_scroll_ofs -Validate extension JSON: API was removed: classes/GraphEdit/methods/get_snap -Validate extension JSON: API was removed: classes/GraphEdit/methods/get_zoom_hbox -Validate extension JSON: API was removed: classes/GraphEdit/methods/is_using_snap -Validate extension JSON: API was removed: classes/GraphEdit/methods/set_scroll_ofs -Validate extension JSON: API was removed: classes/GraphEdit/methods/set_snap -Validate extension JSON: API was removed: classes/GraphEdit/methods/set_use_snap -Validate extension JSON: API was removed: classes/GraphEdit/properties/snap_distance -Validate extension JSON: API was removed: classes/GraphEdit/properties/use_snap -Validate extension JSON: API was removed: classes/GraphNode/methods/is_comment -Validate extension JSON: API was removed: classes/GraphNode/methods/set_comment -Validate extension JSON: API was removed: classes/GraphNode/properties/comment -Validate extension JSON: Error: Field 'classes/GraphEdit/properties/scroll_offset': getter changed value in new API, from "get_scroll_ofs" to &"get_scroll_offset". -Validate extension JSON: Error: Field 'classes/GraphEdit/properties/scroll_offset': setter changed value in new API, from "set_scroll_ofs" to &"set_scroll_offset". - -Intentional compatibility breakage during refactoring of API marked as experimental. - -FIXME: Still a WIP, review this list once the work is completed, especially if compatibility -code is added. - - -GH-73196 --------- -Validate extension JSON: Error: Field 'classes/CodeEdit/methods/get_text_for_symbol_lookup': is_const changed value in new API, from false to true. - -Function was made `const`. No adjustments should be necessary. - - -GH-78328 --------- -Validate extension JSON: Error: Field 'classes/TileMap/methods/get_used_rect': is_const changed value in new API, from false to true. - -Function was made `const`. No adjustments should be necessary. - - -GH-79606 --------- -Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/shader_create_from_bytecode/arguments': size changed value in new API, from 1 to 2. - -Added optional argument. Compatibility method registered. - - -GH-78266 --------- -Validate extension JSON: API was removed: classes/FontFile/properties/fallbacks -Validate extension JSON: API was removed: classes/FontVariation/properties/fallbacks -Validate extension JSON: API was removed: classes/SystemFont/properties/fallbacks - -The property was moved to their common base class Font. -The setters and getters were already in Font, so this shouldn't affect compatibility. diff --git a/misc/extension_api_validation/4.1-stable.expected b/misc/extension_api_validation/4.1-stable.expected new file mode 100644 index 0000000000..ff66f9d51d --- /dev/null +++ b/misc/extension_api_validation/4.1-stable.expected @@ -0,0 +1,118 @@ +This file contains the expected output of --validate-extension-api when run against the extension_api.json of the +4.1-stable tag (the basename of this file). + +Only lines that start with "Validate extension JSON:" matter, everything else is considered a comment and ignored. They +should instead be used to justify these changes and describe how users should work around these changes. + +Add new entries at the end of the file. + +## Changes between 4.1-stable and 4.2-stable + +GH-79911 +-------- +Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/BarrierMask/values/BARRIER_MASK_RASTER': value changed value in new API, from 1.0 to 9. +Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/BarrierMask/values/BARRIER_MASK_ALL_BARRIERS': value changed value in new API, from 7.0 to 32767. +Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/BarrierMask/values/BARRIER_MASK_NO_BARRIER': value changed value in new API, from 8.0 to 32768. +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_update/arguments/3': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_copy/arguments/9': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_clear/arguments/6': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/texture_resolve_multisample/arguments/2': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/buffer_update/arguments/4': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/buffer_clear/arguments/3': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/draw_list_end/arguments/0': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Hash changed for 'classes/RenderingDevice/methods/draw_list_end', from 19365687 to E9B4FA8E. This means that the function has changed and no compatibility function was provided. +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/compute_list_end/arguments/0': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Hash changed for 'classes/RenderingDevice/methods/compute_list_end', from 19365687 to E9B4FA8E. This means that the function has changed and no compatibility function was provided. +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/barrier/arguments/0': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/barrier/arguments/1': default_value changed value in new API, from "7" to "32767". +Validate extension JSON: Error: Hash changed for 'classes/RenderingDevice/methods/barrier', from 0FE50041 to DD9E8DAB. This means that the function has changed and no compatibility function was provided. + +Raster barrier was split into vertex and fragment barriers for use in mobile renderer. + + +GH-79308 +-------- +Validate extension JSON: API was removed: classes/GraphEdit/methods/get_scroll_ofs +Validate extension JSON: API was removed: classes/GraphEdit/methods/get_snap +Validate extension JSON: API was removed: classes/GraphEdit/methods/get_zoom_hbox +Validate extension JSON: API was removed: classes/GraphEdit/methods/is_using_snap +Validate extension JSON: API was removed: classes/GraphEdit/methods/set_scroll_ofs +Validate extension JSON: API was removed: classes/GraphEdit/methods/set_snap +Validate extension JSON: API was removed: classes/GraphEdit/methods/set_use_snap +Validate extension JSON: API was removed: classes/GraphEdit/properties/snap_distance +Validate extension JSON: API was removed: classes/GraphEdit/properties/use_snap +Validate extension JSON: API was removed: classes/GraphNode/methods/is_comment +Validate extension JSON: API was removed: classes/GraphNode/methods/set_comment +Validate extension JSON: API was removed: classes/GraphNode/properties/comment +Validate extension JSON: Error: Field 'classes/GraphEdit/properties/scroll_offset': getter changed value in new API, from "get_scroll_ofs" to &"get_scroll_offset". +Validate extension JSON: Error: Field 'classes/GraphEdit/properties/scroll_offset': setter changed value in new API, from "set_scroll_ofs" to &"set_scroll_offset". + +Intentional compatibility breakage during refactoring of API marked as experimental. + +FIXME: Still a WIP, review this list once the work is completed, especially if compatibility +code is added. + + +GH-73196 +-------- +Validate extension JSON: Error: Field 'classes/CodeEdit/methods/get_text_for_symbol_lookup': is_const changed value in new API, from false to true. + +Function was made `const`. No adjustments should be necessary. + + +GH-78328 +-------- +Validate extension JSON: Error: Field 'classes/TileMap/methods/get_used_rect': is_const changed value in new API, from false to true. + +Function was made `const`. No adjustments should be necessary. + + +GH-79606 +-------- +Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/shader_create_from_bytecode/arguments': size changed value in new API, from 1 to 2. + +Added optional argument. Compatibility method registered. + + +GH-78266 +-------- +Validate extension JSON: API was removed: classes/FontFile/properties/fallbacks +Validate extension JSON: API was removed: classes/FontVariation/properties/fallbacks +Validate extension JSON: API was removed: classes/SystemFont/properties/fallbacks + +The property was moved to their common base class Font. +The setters and getters were already in Font, so this shouldn't affect compatibility. + + +GH-36493 +-------- +Validate extension JSON: Error: Field 'classes/PopupMenu/methods/add_icon_shortcut/arguments': size changed value in new API, from 4 to 5. +Validate extension JSON: Error: Field 'classes/PopupMenu/methods/add_shortcut/arguments': size changed value in new API, from 3 to 4. + +Added optional argument. Compatibility methods registered. + + +GH-80954 +-------- +Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 4 to 8. + +Added optional arguments. Compatibility method registered. + + +GH-80852 +-------- + +Validate extension JSON: API was removed: classes/GDScriptEditorTranslationParserPlugin +Validate extension JSON: API was removed: classes/GDScriptNativeClass +Validate extension JSON: API was removed: classes/GodotPhysicsServer2D +Validate extension JSON: API was removed: classes/GodotPhysicsServer3D +Validate extension JSON: API was removed: classes/IPUnix +Validate extension JSON: API was removed: classes/MovieWriterMJPEG +Validate extension JSON: API was removed: classes/MovieWriterPNGWAV +Validate extension JSON: API was removed: classes/ResourceFormatImporterSaver +Validate extension JSON: API was removed: classes/FramebufferCacheRD +Validate extension JSON: API was removed: classes/UniformSetCacheRD +Validate extension JSON: API was removed: classes/GLTFDocumentExtensionPhysics +Validate extension JSON: API was removed: classes/GLTFDocumentExtensionTextureWebP + +Excluded unexposed classes from extension_api.json. diff --git a/misc/scripts/gitignore_check.sh b/misc/scripts/gitignore_check.sh new file mode 100644 index 0000000000..f162e25391 --- /dev/null +++ b/misc/scripts/gitignore_check.sh @@ -0,0 +1,26 @@ +set -uo pipefail +shopt -s globstar + +echo -e ".gitignore validation..." + +# Get a list of files that exist in the repo but are ignored. + +# The --verbose flag also includes files un-ignored via ! prefixes. +# We filter those out with a somewhat awkward `awk` directive. + # (Explanation: Split each line by : delimiters, + # see if the actual gitignore line shown in the third field starts with !, + # if it doesn't, print it.) + +# ignorecase for the sake of Windows users. + +output=$(git -c core.ignorecase=true check-ignore --verbose --no-index **/* | \ + awk -F ':' '{ if ($3 !~ /^!/) print $0 }') + +# Then we take this result and return success if it's empty. +if [ -z "$output" ]; then + exit 0 +else + # And print the result if it isn't. + echo "$output" + exit 1 +fi diff --git a/misc/scripts/validate_extension_api.sh b/misc/scripts/validate_extension_api.sh index f2f7c28e70..75f03a7086 100755 --- a/misc/scripts/validate_extension_api.sh +++ b/misc/scripts/validate_extension_api.sh @@ -10,7 +10,12 @@ if [ $# != 1 ]; then echo "Usage: @0 <path-to-godot-executable>" fi +api_validation_dir="$( dirname -- "$( dirname -- "${BASH_SOURCE[0]//\.\//}" )" )/extension_api_validation/" + has_problems=0 +warn_extra=0 +reference_tag="" +expected_errors="" make_annotation() { @@ -27,26 +32,44 @@ make_annotation() fi } +get_expected_output() +{ + local parts=() + IFS='_' read -ra parts <<< "$(basename -s .expected "$1")" + + if [[ "${#parts[@]}" == "2" ]]; then + cat "$1" >> "$expected_errors" + get_expected_output "$(find "$api_validation_dir" -name "${parts[1]}*.expected")" + reference_tag="${parts[0]}" + warn_extra=0 + else + cat "$1" >> "$expected_errors" + reference_tag="${parts[0]}" + warn_extra=1 + fi +} + while read -r file; do reference_file="$(mktemp)" validate="$(mktemp)" validation_output="$(mktemp)" allowed_errors="$(mktemp)" + expected_errors="$(mktemp)" + get_expected_output "$file" # Download the reference extension_api.json - reference_tag="$(basename -s .expected "$file")" wget -qcO "$reference_file" "https://raw.githubusercontent.com/godotengine/godot-cpp/godot-$reference_tag/gdextension/extension_api.json" # Validate the current API against the reference "$1" --headless --validate-extension-api "$reference_file" 2>&1 | tee "$validate" | awk '!/^Validate extension JSON:/' - || true # Collect the expected and actual validation errors awk '/^Validate extension JSON:/' - < "$validate" | sort > "$validation_output" - awk '/^Validate extension JSON:/' - < "$file" | sort > "$allowed_errors" + awk '/^Validate extension JSON:/' - < "$expected_errors" | sort > "$allowed_errors" # Differences between the expected and actual errors new_validation_error="$(comm -23 "$validation_output" "$allowed_errors")" obsolete_validation_error="$(comm -13 "$validation_output" "$allowed_errors")" - if [ -n "$obsolete_validation_error" ]; then + if [ -n "$obsolete_validation_error" ] && [ "$warn_extra" = "1" ]; then make_annotation "The following validation errors no longer occur (compared to $reference_tag):" "$obsolete_validation_error" warning "$file" fi if [ -n "$new_validation_error" ]; then @@ -54,7 +77,7 @@ while read -r file; do has_problems=1 fi - rm -f "$reference_file" "$validate" "$validation_output" "$allowed_errors" -done <<< "$(find "$( dirname -- "$( dirname -- "${BASH_SOURCE[0]//\.\//}" )" )/extension_api_validation/" -name "*.expected")" + rm -f "$reference_file" "$validate" "$validation_output" "$allowed_errors" "$expected_errors" +done <<< "$(find "$api_validation_dir" -name "*.expected")" exit $has_problems |
