Cleanup: consistently hyphenate the term "swap-chain"

This commit is contained in:
Campbell Barton
2025-08-12 10:12:19 +10:00
parent ab1027c777
commit c00dfded27
9 changed files with 27 additions and 27 deletions

View File

@@ -1288,19 +1288,19 @@ int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_context,
void GHOST_GetVulkanHandles(GHOST_ContextHandle context, GHOST_VulkanHandles *r_handles);
/**
* Set the pre and post callbacks for vulkan swap chain in the given context.
* Set the pre and post callbacks for vulkan swap-chain in the given context.
*
* \param context: GHOST context handle of a vulkan context to
* get the Vulkan handles from.
* \param swap_buffers_pre_callback: Function pointer to be called at the beginning of swapBuffers.
* Inside this callback the next swap chain image needs to be acquired and filled.
* Inside this callback the next swap-chain image needs to be acquired and filled.
* \param swap_buffers_post_callback: Function to be called at th end of swapBuffers. swapBuffers
* can recreate the swap chain. When this is done the application should be informed by those
* can recreate the swap-chain. When this is done the application should be informed by those
* changes.
* \param openxr_acquire_image_callback: Function to be called when an image needs to be acquired
* to be drawn to an OpenXR swap chain.
* to be drawn to an OpenXR swap-chain.
* \param openxr_release_image_callback: Function to be called after an image has been drawn to the
* OpenXR swap chain.
* OpenXR swap-chain.
*/
void GHOST_SetVulkanSwapBuffersCallbacks(
GHOST_ContextHandle context,
@@ -1310,7 +1310,7 @@ void GHOST_SetVulkanSwapBuffersCallbacks(
void (*openxr_release_image_callback)(GHOST_VulkanOpenXRData *));
/**
* Acquire the current swap chain format.
* Acquire the current swap-chain format.
*
* \param windowhandle: GHOST window handle to a window to get the resource from.
* \param r_surface_format: After calling this function the VkSurfaceFormatKHR

View File

@@ -72,7 +72,7 @@ class GHOST_IContext {
virtual GHOST_TSuccess getVulkanHandles(GHOST_VulkanHandles &r_handles) = 0;
/**
* Acquire the current swap chain format.
* Acquire the current swap-chain format.
*
* \param windowhandle: GHOST window handle to a window to get the resource from.
* \param r_surface_format: After calling this function the VkSurfaceFormatKHR
@@ -87,20 +87,20 @@ class GHOST_IContext {
GHOST_VulkanSwapChainData *r_swap_chain_data) = 0;
/**
* Set the pre and post callbacks for vulkan swap chain in the given context.
* Set the pre and post callbacks for vulkan swap-chain in the given context.
*
* \param context: GHOST context handle of a vulkan context to
* get the Vulkan handles from.
* \param swap_buffers_pre_callback: Function pointer to be called at the beginning of
* swapBuffers. Inside this callback the next swap chain image needs to be acquired and
* swapBuffers. Inside this callback the next swap-chain image needs to be acquired and
* filled.
* \param swap_buffers_post_callback: Function to be called at th end of swapBuffers.
* swapBuffers can recreate the swap chain. When this is done the application should be
* swapBuffers can recreate the swap-chain. When this is done the application should be
* informed by those changes.
* \param openxr_acquire_image_callback: Function to be called when an
* image needs to be acquired to be drawn to an OpenXR swap chain.
* image needs to be acquired to be drawn to an OpenXR swap-chain.
* \param openxr_release_image_callback: Function to be called after an image has been drawn to
* the OpenXR swap chain.
* the OpenXR swap-chain.
*/
virtual GHOST_TSuccess setVulkanSwapBuffersCallbacks(
std::function<void(const GHOST_VulkanSwapChainData *)> swap_buffers_pre_callback,

View File

@@ -804,7 +804,7 @@ typedef struct {
typedef struct {
/** Image handle to the image that will be presented to the user. */
VkImage image;
/** Format of the swap chain. */
/** Format of the swap-chain. */
VkSurfaceFormatKHR surface_format;
/** Resolution of the image. */
VkExtent2D extent;

View File

@@ -632,7 +632,7 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
bool use_hdr_swapchain = false;
#ifdef WITH_GHOST_WAYLAND
/* Wayland doesn't provide a WSI with windowing capabilities, therefore cannot detect whether the
* swap-chain needs to be recreated. But as a side effect we can recreate the swap chain before
* swap-chain needs to be recreated. But as a side effect we can recreate the swap-chain before
* presenting. */
if (m_wayland_window_info) {
const bool recreate_swapchain =
@@ -680,7 +680,7 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
if (m_swapchain == VK_NULL_HANDLE) {
CLOG_TRACE(
&LOG,
"Swapchain invalid (due to minimized window), perform rendering to reduce render graph "
"Swap-chain invalid (due to minimized window), perform rendering to reduce render graph "
"resources.");
GHOST_VulkanSwapChainData swap_chain_data = {};
if (swap_buffers_pre_callback_) {
@@ -694,7 +694,7 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
}
CLOG_DEBUG(&LOG,
"Acquired swapchain image (render_frame=%lu, image_index=%u)",
"Acquired swap-chain image (render_frame=%lu, image_index=%u)",
m_render_frame,
image_index);
GHOST_SwapchainImage &swapchain_image = m_swapchain_images[image_index];
@@ -736,7 +736,7 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
}
if (present_result != VK_SUCCESS) {
CLOG_ERROR(&LOG,
"Vulkan: failed to present swap chain image : %s",
"Vulkan: failed to present swap-chain image : %s",
vulkan_error_as_string(present_result));
}
@@ -1049,8 +1049,8 @@ GHOST_TSuccess GHOST_ContextVK::recreateSwapchain(bool use_hdr_swapchain)
}
}
/* Swapchains with out any resolution should not be created. In the case the render extent is
* zero we should not use the swap chain.
/* Swap-chains with out any resolution should not be created. In the case the render extent is
* zero we should not use the swap-chain.
*
* VUID-VkSwapchainCreateInfoKHR-imageExtent-01689
*/

View File

@@ -71,7 +71,7 @@ struct GHOST_SwapchainImage {
VkImage vk_image = VK_NULL_HANDLE;
/**
* Semaphore for presenting; being signaled when the swap chain image is ready to be presented.
* Semaphore for presenting; being signaled when the swap-chain image is ready to be presented.
*/
VkSemaphore present_semaphore = VK_NULL_HANDLE;
@@ -84,7 +84,7 @@ struct GHOST_Frame {
* frame can acquire a new image and the semaphores can be reused.
*/
VkFence submission_fence = VK_NULL_HANDLE;
/** Semaphore for acquiring; being signaled when the swap chain image is ready to be updated. */
/** Semaphore for acquiring; being signaled when the swap-chain image is ready to be updated. */
VkSemaphore acquire_semaphore = VK_NULL_HANDLE;
GHOST_FrameDiscard discard_pile;

View File

@@ -507,7 +507,7 @@ void GHOST_XrGraphicsBindingVulkan::submitToSwapchainImageCpu(
nullptr};
vkBeginCommandBuffer(vk_command_buffer, &vk_command_buffer_begin_info);
/* Transfer imported render result & swap chain image (UNDEFINED -> GENERAL) */
/* Transfer imported render result & swap-chain image (UNDEFINED -> GENERAL). */
VkImageMemoryBarrier vk_image_memory_barrier = {VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
nullptr,
0,
@@ -694,7 +694,7 @@ void GHOST_XrGraphicsBindingVulkan::submitToSwapchainImageGpu(
nullptr};
vkBeginCommandBuffer(vk_command_buffer, &vk_command_buffer_begin_info);
/* Transfer imported render result & swap chain image (UNDEFINED -> GENERAL) */
/* Transfer imported render result & swap-chain image (UNDEFINED -> GENERAL). */
VkImageMemoryBarrier vk_image_memory_barrier[] = {{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
nullptr,
0,

View File

@@ -13,7 +13,7 @@
* - Image layouts: The layout of pixels of an image on the GPU depends on the command being
* executed. A certain `vkCmd*` requires the image to be in a certain layout. Using incorrect
* layouts could lead to rendering artifacts.
* - Resource ownership: Resources that are externally managed (swap chain or external) uses a
* - Resource ownership: Resources that are externally managed (swap-chain or external) uses a
* different workflow as its state can be altered externally and needs to be reset.
* - Read/Write access masks: To generate correct and performing pipeline barriers the src/dst
* access masks needs to be accurate and precise. When creating pipeline barriers the resource

View File

@@ -104,7 +104,7 @@ class VKThreadData : public NonCopyable, NonMovable {
/** Thread ID this instance belongs to. */
pthread_t thread_id;
/**
* Index of the active resource pool. Is in sync with the active swap chain image or cycled when
* Index of the active resource pool. Is in sync with the active swap-chain image or cycled when
* rendering.
*
* NOTE: Initialized to `UINT32_MAX` to detect first change.

View File

@@ -112,8 +112,8 @@ class VKDiscardPool {
* Move discarded resources from src_pool into this.
*
* GPU resources that are discarded from the dependency graph are stored in the device orphaned
* data. When a swap chain context list is made active the orphaned data can be merged into a
* swap chain discard pool.
* data. When a swap-chain context list is made active the orphaned data can be merged into a
* swap-chain discard pool.
*
* All moved items will receive a new timeline.
*