summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-format43
-rw-r--r--core/math/bvh_logic.inc1
-rw-r--r--core/math/bvh_misc.inc1
-rw-r--r--core/math/bvh_structs.inc1
-rw-r--r--drivers/gles3/shaders/canvas_uniforms_inc.glsl1
-rw-r--r--misc/utility/.clang-format-glsl5
-rw-r--r--modules/betsy/CrossPlatformSettings_piece_all.glsl1
-rw-r--r--modules/betsy/UavCrossPlatform_piece_all.glsl1
-rw-r--r--modules/lightmapper_rd/lm_common_inc.glsl1
-rw-r--r--servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl1
-rw-r--r--servers/rendering/renderer_rd/shaders/decal_data_inc.glsl1
-rw-r--r--servers/rendering/renderer_rd/shaders/effects/luminance_reduce_raster_inc.glsl1
12 files changed, 39 insertions, 19 deletions
diff --git a/.clang-format b/.clang-format
index 338ce6b7f3..a6822dc2cd 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,6 +1,6 @@
# Commented out parameters are those with the same value as base LLVM style.
# We can uncomment them if we want to change their value, or enforce the
-# chosen value in case the base style changes (last sync: Clang 18.1.8).
+# chosen value in case the base style changes (last sync: Clang 19.1.0).
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
@@ -37,7 +37,29 @@ AlignAfterOpenBracket: DontAlign
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
+# AlignCaseArrows: false
# AlignCaseColons: false
+# AlignConsecutiveTableGenBreakingDAGArgColons:
+# Enabled: false
+# AcrossEmptyLines: false
+# AcrossComments: false
+# AlignCompound: false
+# AlignFunctionPointers: false
+# PadOperators: false
+# AlignConsecutiveTableGenCondOperatorColons:
+# Enabled: false
+# AcrossEmptyLines: false
+# AcrossComments: false
+# AlignCompound: false
+# AlignFunctionPointers: false
+# PadOperators: false
+# AlignConsecutiveTableGenDefinitionColons:
+# Enabled: false
+# AcrossEmptyLines: false
+# AcrossComments: false
+# AlignCompound: false
+# AlignFunctionPointers: false
+# PadOperators: false
# AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments:
@@ -47,6 +69,7 @@ AlignTrailingComments:
AllowAllParametersOfDeclarationOnNextLine: false
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowShortBlocksOnASingleLine: Never
+# AllowShortCaseExpressionOnASingleLine: true
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
@@ -54,9 +77,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
-# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
-# AlwaysBreakTemplateDeclarations: MultiLine
# AttributeMacros:
# - __capability
# BinPackArguments: true
@@ -84,6 +105,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterJavaFieldAnnotations: false
+# BreakAfterReturnType: None
# BreakArrays: true
# BreakBeforeBinaryOperators: None
# BreakBeforeBraces: Attach
@@ -91,8 +113,10 @@ AllowAllParametersOfDeclarationOnNextLine: false
# BreakBeforeInlineASMColon: OnlyMultiline
# BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
+# BreakFunctionDefinitionParameters: false
# BreakInheritanceList: BeforeColon
# BreakStringLiterals: true
+# BreakTemplateDeclarations: MultiLine
ColumnLimit: 0
# CommentPragmas: '^ IWYU pragma:'
# CompactNamespaces: false
@@ -150,13 +174,16 @@ JavaImportGroups:
- javax
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
-# KeepEmptyLinesAtEOF: false
-KeepEmptyLinesAtTheStartOfBlocks: false
+KeepEmptyLines:
+ AtEndOfFile: false
+ AtStartOfBlock: false
+ AtStartOfFile: false
# LambdaBodyIndentation: Signature
# Language: Cpp
# LineEnding: DeriveLF
# MacroBlockBegin: ''
# MacroBlockEnd: ''
+# MainIncludeChar: Quote
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
@@ -219,13 +246,12 @@ RemoveSemicolon: true
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: Never
# SpacesInContainerLiterals: true
-## Godot TODO: We'll want to use a min of 1, but we need to see how to fix
-## our comment capitalization at the same time.
SpacesInLineCommentPrefix:
- Minimum: 0
+ Minimum: 0 # We want a minimum of 1 for comments, but allow 0 for disabled code.
Maximum: -1
# SpacesInParens: Never
# SpacesInParensOptions:
+# ExceptDoubleParentheses: false
# InConditionalStatements: false
# InCStyleCasts: false
# InEmptyParentheses: false
@@ -238,6 +264,7 @@ Standard: c++20
# - Q_UNUSED
# - QT_REQUIRE_VERSION
TabWidth: 4
+# TableGenBreakInsideDAGArg: DontBreak
UseTab: Always
# VerilogBreakBetweenInstancePorts: true
# WhitespaceSensitiveMacros:
diff --git a/core/math/bvh_logic.inc b/core/math/bvh_logic.inc
index dd3b135bb5..aaa91bc9d3 100644
--- a/core/math/bvh_logic.inc
+++ b/core/math/bvh_logic.inc
@@ -1,4 +1,3 @@
-
// for slow incremental optimization, we will periodically remove each
// item from the tree and reinsert, to give it a chance to find a better position
void _logic_item_remove_and_reinsert(uint32_t p_ref_id) {
diff --git a/core/math/bvh_misc.inc b/core/math/bvh_misc.inc
index 9b35a1d36d..ef1261a759 100644
--- a/core/math/bvh_misc.inc
+++ b/core/math/bvh_misc.inc
@@ -1,4 +1,3 @@
-
int _handle_get_tree_id(BVHHandle p_handle) const {
if (USE_PAIRS) {
return _extra[p_handle.id()].tree_id;
diff --git a/core/math/bvh_structs.inc b/core/math/bvh_structs.inc
index d40c631ce2..6326cd63ef 100644
--- a/core/math/bvh_structs.inc
+++ b/core/math/bvh_structs.inc
@@ -1,4 +1,3 @@
-
public:
struct ItemRef {
uint32_t tnode_id; // -1 is invalid
diff --git a/drivers/gles3/shaders/canvas_uniforms_inc.glsl b/drivers/gles3/shaders/canvas_uniforms_inc.glsl
index f6ad2b730a..d98cbdac54 100644
--- a/drivers/gles3/shaders/canvas_uniforms_inc.glsl
+++ b/drivers/gles3/shaders/canvas_uniforms_inc.glsl
@@ -1,4 +1,3 @@
-
#define MAX_LIGHTS_PER_ITEM uint(16)
#define M_PI 3.14159265359
diff --git a/misc/utility/.clang-format-glsl b/misc/utility/.clang-format-glsl
index 59efa8fa35..c588df0236 100644
--- a/misc/utility/.clang-format-glsl
+++ b/misc/utility/.clang-format-glsl
@@ -30,7 +30,10 @@ JavaImportGroups:
- com.google
- java
- javax
-KeepEmptyLinesAtTheStartOfBlocks: false
+KeepEmptyLines:
+ AtEndOfFile: false
+ AtStartOfBlock: false
+ AtStartOfFile: false
ObjCBlockIndentWidth: 4
PackConstructorInitializers: NextLine
RemoveSemicolon: false # Differs from base .clang-format
diff --git a/modules/betsy/CrossPlatformSettings_piece_all.glsl b/modules/betsy/CrossPlatformSettings_piece_all.glsl
index b7abac7fcc..001d8e63b2 100644
--- a/modules/betsy/CrossPlatformSettings_piece_all.glsl
+++ b/modules/betsy/CrossPlatformSettings_piece_all.glsl
@@ -1,4 +1,3 @@
-
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
diff --git a/modules/betsy/UavCrossPlatform_piece_all.glsl b/modules/betsy/UavCrossPlatform_piece_all.glsl
index 30854df637..5f074137af 100644
--- a/modules/betsy/UavCrossPlatform_piece_all.glsl
+++ b/modules/betsy/UavCrossPlatform_piece_all.glsl
@@ -1,4 +1,3 @@
-
#define OGRE_imageLoad2D(inImage, iuv) imageLoad(inImage, int2(iuv))
#define OGRE_imageLoad2DArray(inImage, iuvw) imageLoad(inImage, int3(iuvw))
diff --git a/modules/lightmapper_rd/lm_common_inc.glsl b/modules/lightmapper_rd/lm_common_inc.glsl
index 98d11b9e69..962e444911 100644
--- a/modules/lightmapper_rd/lm_common_inc.glsl
+++ b/modules/lightmapper_rd/lm_common_inc.glsl
@@ -1,4 +1,3 @@
-
/* SET 0, static data that does not change between any call */
layout(set = 0, binding = 0) uniform BakeParameters {
diff --git a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
index 84017a1fe1..59e0bdfe99 100644
--- a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
@@ -1,4 +1,3 @@
-
#define MAX_LIGHTS_PER_ITEM 16
#define M_PI 3.14159265359
diff --git a/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl b/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl
index 158096d3c7..3d6eaab8e1 100644
--- a/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl
@@ -1,4 +1,3 @@
-
struct DecalData {
highp mat4 xform; //to decal transform
highp vec3 inv_extents;
diff --git a/servers/rendering/renderer_rd/shaders/effects/luminance_reduce_raster_inc.glsl b/servers/rendering/renderer_rd/shaders/effects/luminance_reduce_raster_inc.glsl
index b8860f6518..fc45b1f827 100644
--- a/servers/rendering/renderer_rd/shaders/effects/luminance_reduce_raster_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/effects/luminance_reduce_raster_inc.glsl
@@ -1,4 +1,3 @@
-
layout(push_constant, std430) uniform PushConstant {
ivec2 source_size;
ivec2 dest_size;