Skip to content

Commit e80627f

Browse files
committed
WIP
WIP-2
1 parent 07d5552 commit e80627f

54 files changed

Lines changed: 3478 additions & 1165 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -607,30 +607,30 @@ json_set_string(_json "${_json}" system_certs_path "")
607607
file(WRITE "${CMAKE_BINARY_DIR}/cmake_env.json" "${_json}\n")
608608

609609
# IMPORTANT: Must be last, so all targets have been added
610-
#if (CMAKE_GENERATOR STREQUAL "Xcode")
611-
# set(GODOT_XCODE_INHERITED_ATTRIBUTES
612-
# GCC_OPTIMIZATION_LEVEL
613-
# GCC_GENERATE_DEBUGGING_SYMBOLS
614-
# )
615-
# function(_xcode_inherit_attributes dir)
616-
# get_property(tgts DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS)
617-
# foreach (t IN LISTS tgts)
618-
# get_target_property(type ${t} TYPE)
619-
# if (type STREQUAL "INTERFACE_LIBRARY" OR type STREQUAL "UTILITY")
620-
# continue()
621-
# endif ()
622-
# foreach (attr IN LISTS GODOT_XCODE_INHERITED_ATTRIBUTES)
623-
# get_target_property(keep ${t} GODOT_XCODE_KEEP_${attr})
624-
# if (NOT keep)
625-
# set_target_properties(${t} PROPERTIES
626-
# XCODE_ATTRIBUTE_${attr} "$(inherited)")
627-
# endif ()
628-
# endforeach ()
629-
# endforeach ()
630-
# get_property(subs DIRECTORY ${dir} PROPERTY SUBDIRECTORIES)
631-
# foreach (s IN LISTS subs)
632-
# _xcode_inherit_attributes(${s})
633-
# endforeach ()
634-
# endfunction()
635-
# _xcode_inherit_attributes(${CMAKE_SOURCE_DIR})
636-
#endif ()
610+
if (CMAKE_GENERATOR STREQUAL "Xcode")
611+
set(GODOT_XCODE_INHERITED_ATTRIBUTES
612+
GCC_OPTIMIZATION_LEVEL
613+
GCC_GENERATE_DEBUGGING_SYMBOLS
614+
)
615+
function(_xcode_inherit_attributes dir)
616+
get_property(tgts DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS)
617+
foreach (t IN LISTS tgts)
618+
get_target_property(type ${t} TYPE)
619+
if (type STREQUAL "INTERFACE_LIBRARY" OR type STREQUAL "UTILITY")
620+
continue()
621+
endif ()
622+
foreach (attr IN LISTS GODOT_XCODE_INHERITED_ATTRIBUTES)
623+
get_target_property(keep ${t} GODOT_XCODE_KEEP_${attr})
624+
if (NOT keep)
625+
set_target_properties(${t} PROPERTIES
626+
XCODE_ATTRIBUTE_${attr} "$(inherited)")
627+
endif ()
628+
endforeach ()
629+
endforeach ()
630+
get_property(subs DIRECTORY ${dir} PROPERTY SUBDIRECTORIES)
631+
foreach (s IN LISTS subs)
632+
_xcode_inherit_attributes(${s})
633+
endforeach ()
634+
endfunction()
635+
_xcode_inherit_attributes(${CMAKE_SOURCE_DIR})
636+
endif ()

CMakePresets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"generator": "Xcode",
88
"binaryDir": "${sourceDir}/xcode",
99
"environment": {
10-
"MOLTENVK_SDK": "/Users/stuartcarnie/SDKs/VulkanSDK/1.3.290.0/macOS/lib"
10+
"MOLTENVK_SDK": "/Volumes/Data/SDKs/VulkanSDK/1.4.341.1/macOS/lib"
1111
},
1212
"cacheVariables": {
1313
"APPLE_BUNDLE_IDENTIFIER": "org.stuartcarnie.godot",
@@ -20,10 +20,10 @@
2020
"name": "apple-embedded-xcode",
2121
"generator": "Xcode",
2222
"cacheVariables": {
23-
"CMAKE_FRAMEWORK_PATH": "/Users/stuartcarnie/SDKs/VulkanSDK/1.3.290.0/macOS/lib",
23+
"CMAKE_FRAMEWORK_PATH": "/Volumes/Data/SDKs/VulkanSDK/1.4.341.1/macOS/lib",
2424
"CMAKE_FIND_ROOT_PATH_MODE_LIBRARY": "BOTH",
2525
"APPLE_BUNDLE_IDENTIFIER": "org.stuartcarnie.godot",
26-
"DEV_BUILD_LEVEL": "all",
26+
"DEV_BUILD_LEVEL": "none",
2727
"ARCHS": "arm64"
2828
}
2929
},

COPYRIGHT.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,11 @@ Comment: Multi-channel signed distance field generator
539539
Copyright: 2014-2025, Viktor Chlumsky
540540
License: Expat
541541

542+
Files: thirdparty/offset_allocator/*
543+
Comment: OffsetAllocator
544+
Copyright: 2023, Sebastian Aaltonen
545+
License: Expat
546+
542547
Files: thirdparty/openxr/*
543548
Comment: OpenXR Loader
544549
Copyright: 2020-2025, The Khronos Group Inc.

dev.nu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
overlay use .venv/bin/activate.nu
2+
overlay use misc/scripts/godotdev.nu
3+

doc/classes/RenderingDevice.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,14 @@
710710
This is only used by Vulkan in debug builds. Godot must also be started with the [code]--extra-gpu-memory-tracking[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
711711
</description>
712712
</method>
713+
<method name="gpu_capture_begin">
714+
<return type="int" enum="Error" />
715+
<param index="0" name="type" type="int" enum="RenderingDevice.GpuCaptureType" default="0" />
716+
<param index="1" name="count" type="int" default="1" />
717+
<description>
718+
Begins a GPU capture for debugging purposes. The [param type] parameter specifies the capture granularity, and [param count] specifies the number of frames or submissions to capture.
719+
</description>
720+
</method>
713721
<method name="has_feature" qualifiers="const">
714722
<return type="bool" />
715723
<param index="0" name="feature" type="int" enum="RenderingDevice.Features" />
@@ -2744,6 +2752,12 @@
27442752
</constant>
27452753
<constant name="FINAL_ACTION_CONTINUE" value="0" enum="FinalAction" deprecated="Final actions are solved automatically by RenderingDevice.">
27462754
</constant>
2755+
<constant name="GPU_CAPTURE_PER_FRAME" value="0" enum="GpuCaptureType">
2756+
Capture at the end of a frame.
2757+
</constant>
2758+
<constant name="GPU_CAPTURE_PER_SUBMIT" value="1" enum="GpuCaptureType">
2759+
Capture at the end of a submission.
2760+
</constant>
27472761
<constant name="SHADER_STAGE_VERTEX" value="0" enum="ShaderStage">
27482762
Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices).
27492763
</constant>

drivers/apple/foundation_helpers.mm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
#import <CoreFoundation/CFString.h>
3737

38+
namespace NS {
39+
class String;
40+
}
41+
3842
namespace conv {
3943

4044
NSString *to_nsstring(const String &p_str) {
@@ -89,4 +93,9 @@ String to_string(NSString *p_str) {
8993
return String::utf8(p_str.UTF8String);
9094
}
9195

96+
String to_string(NS::String *p_str) {
97+
NSString *str = (__bridge NSString *)p_str;
98+
return to_string(str);
99+
}
100+
92101
} //namespace conv

drivers/d3d12/rendering_device_driver_d3d12.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5861,7 +5861,9 @@ uint64_t RenderingDeviceDriverD3D12::api_trait_get(ApiTrait p_trait) {
58615861
return D3D12_TEXTURE_DATA_PITCH_ALIGNMENT;
58625862
case API_TRAIT_SECONDARY_VIEWPORT_SCISSOR:
58635863
return false;
5864-
case API_TRAIT_CLEARS_WITH_COPY_ENGINE:
5864+
case API_TRAIT_BUFFER_CLEARS_WITH_COPY_ENGINE:
5865+
return false;
5866+
case API_TRAIT_TEXTURE_CLEARS_WITH_COPY_ENGINE:
58655867
return false;
58665868
case API_TRAIT_USE_GENERAL_IN_COPY_QUEUES:
58675869
return true;

drivers/metal/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ set_target_properties(metal PROPERTIES
4747
CXX_STANDARD 20
4848
CXX_STANDARD_REQUIRED ON
4949
)
50-
target_link_libraries(metal PUBLIC core spirv-cross metal-cpp)
50+
target_link_libraries(metal PUBLIC core spirv-cross metal-cpp offset-allocator)
5151
target_compile_definitions(metal
5252
PUBLIC
5353
METAL_ENABLED

drivers/metal/SCsub

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ thirdparty_sources += [
3131
"#thirdparty/metal-cpp/metal_cpp.cpp",
3232
]
3333

34+
# Include OffsetAllocator
35+
thirdparty_sources += [
36+
"#thirdparty/offset_allocator/offsetAllocator.cpp",
37+
]
38+
3439
env_metal.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"])
3540
env_metal.Prepend(CPPPATH=[thirdparty_spirv_headers_dir + "include/spirv/unified1"])
3641

0 commit comments

Comments
 (0)