From c00dfded27c29aadf7b0afbc2f6c73f2deddb11b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Aug 2025 10:12:19 +1000 Subject: [PATCH] Cleanup: consistently hyphenate the term "swap-chain" --- intern/ghost/GHOST_C-api.h | 12 ++++++------ intern/ghost/GHOST_IContext.hh | 12 ++++++------ intern/ghost/GHOST_Types.h | 2 +- intern/ghost/intern/GHOST_ContextVK.cc | 12 ++++++------ intern/ghost/intern/GHOST_ContextVK.hh | 4 ++-- intern/ghost/intern/GHOST_XrGraphicsBindingVulkan.cc | 4 ++-- .../vulkan/render_graph/vk_resource_state_tracker.hh | 2 +- source/blender/gpu/vulkan/vk_device.hh | 2 +- source/blender/gpu/vulkan/vk_resource_pool.hh | 4 ++-- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 7cf604787a5..7a93e87e340 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -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 diff --git a/intern/ghost/GHOST_IContext.hh b/intern/ghost/GHOST_IContext.hh index 83fe7f4917f..a6331a1487e 100644 --- a/intern/ghost/GHOST_IContext.hh +++ b/intern/ghost/GHOST_IContext.hh @@ -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 swap_buffers_pre_callback, diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 92e08692097..c639d715585 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -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; diff --git a/intern/ghost/intern/GHOST_ContextVK.cc b/intern/ghost/intern/GHOST_ContextVK.cc index 3f73b7c3969..00903305843 100644 --- a/intern/ghost/intern/GHOST_ContextVK.cc +++ b/intern/ghost/intern/GHOST_ContextVK.cc @@ -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 */ diff --git a/intern/ghost/intern/GHOST_ContextVK.hh b/intern/ghost/intern/GHOST_ContextVK.hh index a4b31f82544..2ae10dc4892 100644 --- a/intern/ghost/intern/GHOST_ContextVK.hh +++ b/intern/ghost/intern/GHOST_ContextVK.hh @@ -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; diff --git a/intern/ghost/intern/GHOST_XrGraphicsBindingVulkan.cc b/intern/ghost/intern/GHOST_XrGraphicsBindingVulkan.cc index 114ec4dc8b0..350c0f14cee 100644 --- a/intern/ghost/intern/GHOST_XrGraphicsBindingVulkan.cc +++ b/intern/ghost/intern/GHOST_XrGraphicsBindingVulkan.cc @@ -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, diff --git a/source/blender/gpu/vulkan/render_graph/vk_resource_state_tracker.hh b/source/blender/gpu/vulkan/render_graph/vk_resource_state_tracker.hh index 51e0d1a7734..e402a5e669d 100644 --- a/source/blender/gpu/vulkan/render_graph/vk_resource_state_tracker.hh +++ b/source/blender/gpu/vulkan/render_graph/vk_resource_state_tracker.hh @@ -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 diff --git a/source/blender/gpu/vulkan/vk_device.hh b/source/blender/gpu/vulkan/vk_device.hh index c29101e8ea6..693a02f1b3a 100644 --- a/source/blender/gpu/vulkan/vk_device.hh +++ b/source/blender/gpu/vulkan/vk_device.hh @@ -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. diff --git a/source/blender/gpu/vulkan/vk_resource_pool.hh b/source/blender/gpu/vulkan/vk_resource_pool.hh index 6da1dfde342..fafd8d10f78 100644 --- a/source/blender/gpu/vulkan/vk_resource_pool.hh +++ b/source/blender/gpu/vulkan/vk_resource_pool.hh @@ -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. *