You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
4
.github/workflows/android_builds.yml
vendored
4
.github/workflows/android_builds.yml
vendored
@@ -62,8 +62,8 @@ jobs:
|
|||||||
- name: Download pre-built Android Swappy Frame Pacing Library
|
- name: Download pre-built Android Swappy Frame Pacing Library
|
||||||
uses: dsaltares/fetch-gh-release-asset@1.1.2
|
uses: dsaltares/fetch-gh-release-asset@1.1.2
|
||||||
with:
|
with:
|
||||||
repo: darksylinc/godot-swappy
|
repo: godotengine/godot-swappy
|
||||||
version: tags/v2023.3.0.0
|
version: tags/from-source-2025-01-31
|
||||||
file: godot-swappy.7z
|
file: godot-swappy.7z
|
||||||
target: swappy/godot-swappy.7z
|
target: swappy/godot-swappy.7z
|
||||||
|
|
||||||
|
|||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -263,6 +263,11 @@ bld/
|
|||||||
!thirdparty/**/arm/
|
!thirdparty/**/arm/
|
||||||
!thirdparty/**/arm64/
|
!thirdparty/**/arm64/
|
||||||
|
|
||||||
|
thirdparty/swappy-frame-pacing/arm64-v8a/abi.json
|
||||||
|
thirdparty/swappy-frame-pacing/armeabi-v7a/abi.json
|
||||||
|
thirdparty/swappy-frame-pacing/x86/abi.json
|
||||||
|
thirdparty/swappy-frame-pacing/x86_64/abi.json
|
||||||
|
|
||||||
# Visual Studio 2015/2017 cache/options directory
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
.vs/
|
.vs/
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ def configure(env: "SConsEnvironment"):
|
|||||||
has_swappy = detect_swappy()
|
has_swappy = detect_swappy()
|
||||||
if not has_swappy:
|
if not has_swappy:
|
||||||
print_warning(
|
print_warning(
|
||||||
"Swappy Frame Pacing not detected! It is strongly recommended you download it from https://github.com/darksylinc/godot-swappy/releases and extract it so that the following files can be found:\n"
|
"Swappy Frame Pacing not detected! It is strongly recommended you download it from https://github.com/godotengine/godot-swappy/releases and extract it so that the following files can be found:\n"
|
||||||
+ " thirdparty/swappy-frame-pacing/arm64-v8a/libswappy_static.a\n"
|
+ " thirdparty/swappy-frame-pacing/arm64-v8a/libswappy_static.a\n"
|
||||||
+ " thirdparty/swappy-frame-pacing/armeabi-v7a/libswappy_static.a\n"
|
+ " thirdparty/swappy-frame-pacing/armeabi-v7a/libswappy_static.a\n"
|
||||||
+ " thirdparty/swappy-frame-pacing/x86/libswappy_static.a\n"
|
+ " thirdparty/swappy-frame-pacing/x86/libswappy_static.a\n"
|
||||||
|
|||||||
@@ -37,5 +37,6 @@
|
|||||||
#define ANDROID_GAMESDK_MINOR_VERSION(PACKED) (((PACKED) >> 8) & 0xff)
|
#define ANDROID_GAMESDK_MINOR_VERSION(PACKED) (((PACKED) >> 8) & 0xff)
|
||||||
#define ANDROID_GAMESDK_BUGFIX_VERSION(PACKED) ((PACKED) & 0xff)
|
#define ANDROID_GAMESDK_BUGFIX_VERSION(PACKED) ((PACKED) & 0xff)
|
||||||
|
|
||||||
#define AGDK_STRING_VERSION(MAJOR, MINOR, BUGFIX, GIT) \
|
#define AGDK_STRINGIFY(NUMBER) #NUMBER
|
||||||
#MAJOR "." #MINOR "." #BUGFIX "." #GIT
|
#define AGDK_STRING_VERSION(MAJOR, MINOR, BUGFIX) \
|
||||||
|
AGDK_STRINGIFY(MAJOR) "." AGDK_STRINGIFY(MINOR) "." AGDK_STRINGIFY(BUGFIX)
|
||||||
|
|||||||
59
thirdparty/swappy-frame-pacing/swappyVk.h
vendored
59
thirdparty/swappy-frame-pacing/swappyVk.h
vendored
@@ -384,7 +384,8 @@ void SwappyVk_enableStats(VkSwapchainKHR swapchain, bool enabled);
|
|||||||
|
|
||||||
* @see SwappyVk_enableStats.
|
* @see SwappyVk_enableStats.
|
||||||
*/
|
*/
|
||||||
void SwappyVk_recordFrameStart(VkQueue queue, VkSwapchainKHR swapchain, uint32_t image);
|
void SwappyVk_recordFrameStart(VkQueue queue, VkSwapchainKHR swapchain,
|
||||||
|
uint32_t image);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the stats collected, if statistics collection was toggled on.
|
* @brief Returns the stats collected, if statistics collection was toggled on.
|
||||||
@@ -396,8 +397,8 @@ void SwappyVk_recordFrameStart(VkQueue queue, VkSwapchainKHR swapchain, uint32_t
|
|||||||
* conditions.
|
* conditions.
|
||||||
*
|
*
|
||||||
* @param[in] swapchain - The swapchain for which stats are being queried.
|
* @param[in] swapchain - The swapchain for which stats are being queried.
|
||||||
* @param swappyStats - Pointer to a SwappyStats that will be populated with
|
* @param swappyStats - Pointer to a SwappyStats that will be populated
|
||||||
* the collected stats. Cannot be NULL.
|
* with the collected stats. Cannot be NULL.
|
||||||
* @see SwappyStats
|
* @see SwappyStats
|
||||||
*/
|
*/
|
||||||
void SwappyVk_getStats(VkSwapchainKHR swapchain, SwappyStats* swappyStats);
|
void SwappyVk_getStats(VkSwapchainKHR swapchain, SwappyStats* swappyStats);
|
||||||
@@ -413,6 +414,58 @@ void SwappyVk_getStats(VkSwapchainKHR swapchain, SwappyStats *swappyStats);
|
|||||||
*/
|
*/
|
||||||
void SwappyVk_clearStats(VkSwapchainKHR swapchain);
|
void SwappyVk_clearStats(VkSwapchainKHR swapchain);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reset the swappy pacing mechanism
|
||||||
|
*
|
||||||
|
* In cases where the frame timing history is irrelevant (for example during
|
||||||
|
* scene/level transitions or after loading screens), calling this would
|
||||||
|
* remove all the history for frame pacing. Calling this entry point
|
||||||
|
* would reset the frame rate to the initial state at the end of the current
|
||||||
|
* frame. Then swappy would just pace as normal with fresh state from next
|
||||||
|
* frame. There are no error conditions associated with this call.
|
||||||
|
*
|
||||||
|
* @param[in] swapchain - The swapchain for which frame pacing is reset.
|
||||||
|
*/
|
||||||
|
void SwappyVk_resetFramePacing(VkSwapchainKHR swapchain);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable/Disable the swappy pacing mechanism
|
||||||
|
*
|
||||||
|
* By default frame pacing is enabled when swappy is used, however it can be
|
||||||
|
* disabled at runtime by calling `SwappyVk_enableFramePacing(swapchain,
|
||||||
|
* false)`. When the frame pacing is disabled, ::SwappyVk_enableBlockingWait
|
||||||
|
* will control whether
|
||||||
|
* ::SwappyVk_queuePresent will return immediately, or will block until the
|
||||||
|
* previous frame's GPU work is completed. All enabling/disabling effects take
|
||||||
|
* place from next frame. Once disabled, `SwappyVk_enableFramePacing(swapchain,
|
||||||
|
* true)` will enable frame pacing again with a fresh frame time state -
|
||||||
|
* equivalent of calling ::SwappyVk_resetFramePacing().
|
||||||
|
*
|
||||||
|
* @param[in] swapchain - The swapchain for which stats are being queried.
|
||||||
|
* @param enable - If true, enables frame pacing otherwise disables it
|
||||||
|
*/
|
||||||
|
void SwappyVk_enableFramePacing(VkSwapchainKHR swapchain, bool enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable/Disable blocking wait when frame-pacing is disabled
|
||||||
|
*
|
||||||
|
* By default ::SwappyVk_queuePresent will do a blocking wait until previous
|
||||||
|
* frame's GPU work is completed. However when frame pacing is disabled, calling
|
||||||
|
* `SwappyVk_enableBlockingWait(swapchain, false)` will ensure that
|
||||||
|
* ::SwappyVk_queuePresent returns without waiting for previous frame's GPU
|
||||||
|
* work. This behaviour impacts the GPU time returned in the
|
||||||
|
* ::SwappyPostWaitCallback callback. If the last frame's GPU work is done by
|
||||||
|
* the time ::SwappyVk_queuePresent for this frame is called, then the previous
|
||||||
|
* frame's GPU time will be returned otherwise `-1` will be delivered in the
|
||||||
|
* callback for the frame. This setting has no impact when frame pacing is
|
||||||
|
* enabled.
|
||||||
|
*
|
||||||
|
* @param[in] swapchain - The swapchain for which stats are being queried.
|
||||||
|
* @param enable - If true, ::SwappyVk_queuePresent will block until
|
||||||
|
* the previous frame's GPU work is complete.
|
||||||
|
*/
|
||||||
|
void SwappyVk_enableBlockingWait(VkSwapchainKHR swapchain, bool enable);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
// Internal macros to track Swappy version, do not use directly.
|
// Internal macros to track Swappy version, do not use directly.
|
||||||
#define SWAPPY_MAJOR_VERSION 2
|
#define SWAPPY_MAJOR_VERSION 2
|
||||||
#define SWAPPY_MINOR_VERSION 0
|
#define SWAPPY_MINOR_VERSION 2
|
||||||
#define SWAPPY_BUGFIX_VERSION 0
|
#define SWAPPY_BUGFIX_VERSION 0
|
||||||
#define SWAPPY_PACKED_VERSION \
|
#define SWAPPY_PACKED_VERSION \
|
||||||
ANDROID_GAMESDK_PACKED_VERSION(SWAPPY_MAJOR_VERSION, SWAPPY_MINOR_VERSION, \
|
ANDROID_GAMESDK_PACKED_VERSION(SWAPPY_MAJOR_VERSION, SWAPPY_MINOR_VERSION, \
|
||||||
@@ -178,7 +178,6 @@ typedef struct SwappyStats {
|
|||||||
uint64_t latencyFrames[MAX_FRAME_BUCKETS];
|
uint64_t latencyFrames[MAX_FRAME_BUCKETS];
|
||||||
} SwappyStats;
|
} SwappyStats;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user