From 6e3eaae2995bdf6168fab8fe9c7379aedfbe1339 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Apr 2024 12:05:58 +1000 Subject: [PATCH] Cleanup: spelling in comments --- intern/ghost/intern/GHOST_NDOFManagerCocoa.mm | 2 +- intern/ghost/intern/GHOST_SystemCocoa.mm | 9 +++++---- intern/ghost/intern/GHOST_WindowCocoa.mm | 10 +++++----- .../blenkernel/intern/grease_pencil_convert_legacy.cc | 2 +- .../blender/compositor/operations/COM_SMAAOperation.cc | 10 +++++----- .../engines/eevee_next/shaders/eevee_bxdf_lib.glsl | 4 ++-- .../eevee_next/shaders/eevee_deferred_light_frag.glsl | 2 +- .../engines/eevee_next/shaders/eevee_forward_lib.glsl | 2 +- .../eevee_next/shaders/eevee_horizon_resolve_comp.glsl | 2 +- .../eevee_next/shaders/eevee_light_eval_lib.glsl | 2 +- .../eevee_next/shaders/eevee_surf_volume_frag.glsl | 2 +- .../eevee_next/shaders/eevee_thickness_amend_lib.glsl | 2 +- source/blender/gpu/metal/mtl_framebuffer.mm | 8 ++++---- source/blender/gpu/vulkan/vk_to_string.py | 8 ++++---- 14 files changed, 33 insertions(+), 32 deletions(-) diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm index 96ae780137e..782020f6b45 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm +++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm @@ -47,7 +47,7 @@ struct ConnexionDeviceState { uint64_t time; uint8_t report[8]; uint16_t buttons8; /* Obsolete! (pre-10.x drivers). */ - int16_t axis[6]; /* tx, ty, tz, rx, ry, rz. */ + int16_t axis[6]; /* TX, TY, TZ, RX, RY, RZ. */ uint16_t address; uint32_t buttons; }; diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index b46ecb1d35d..d8d35612727 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -426,7 +426,7 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) { /* TODO: implement graceful termination through Cocoa mechanism * to avoid session log off to be canceled. */ - /* Note that Cmd+Q is already handled by key-handler. */ + /* Note that Command-Q is already handled by key-handler. */ systemCocoa->handleQuitRequest(); return NSTerminateCancel; } @@ -1497,8 +1497,9 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr) char *temp_buff; size_t filenameTextSize; - /* Check for blender opened windows and make the frontmost key. In case blender - * is minimized, opened on another desktop space, or in full-screen mode. */ + /* Check for blender opened windows and make the front-most key. + * In case blender is minimized, opened on another desktop space, + * or in full-screen mode. */ windowsList = [NSApp orderedWindows]; if ([windowsList count]) { [[windowsList objectAtIndex:0] makeKeyAndOrderFront:nil]; @@ -1970,7 +1971,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr) } if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSEventModifierFlagCommand)) { - break; /* Cmd-Q is directly handled by Cocoa. */ + break; /* Command-Q is directly handled by Cocoa. */ } if ([event type] == NSEventTypeKeyDown) { diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 3067b344ca0..d8e05871c3a 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -58,7 +58,7 @@ - (void)windowDidBecomeKey:(NSNotification *)notification { systemCocoa->handleWindowEvent(GHOST_kEventWindowActivate, associatedWindow); - /* Workaround for broken app-switching when combining cmd-tab and mission-control. */ + /* Workaround for broken app-switching when combining Command-Tab and mission-control. */ [(NSWindow *)associatedWindow->getOSWindow() orderFrontRegardless]; } @@ -90,7 +90,7 @@ - (void)windowDidEnterFullScreen:(NSNotification *)notification { /* macOS does not send a window resize event when switching between zoomed - * and fullscreen, when automatic show/hide of dock and menu bar are enabled. + * and full-screen, when automatic show/hide of dock and menu bar are enabled. * Send our own to prevent artifacts. */ systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow); @@ -386,7 +386,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa, if (m_systemCocoa->m_nativePixel) { /* Needs to happen early when building with the 10.14 SDK, otherwise - * has no effect until resizeing the window. */ + * has no effect until resizing the window. */ if ([view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) { [view setWantsBestResolutionOpenGLSurface:YES]; } @@ -752,11 +752,11 @@ void GHOST_WindowCocoa::setNativePixelSize(void) } /** - * \note Full-screen switch is not actual fullscreen with display capture. + * \note Full-screen switch is not actual full-screen with display capture. * As this capture removes all OS X window manager features. * * Instead, the menu bar and the dock are hidden, and the window is made border-less and enlarged. - * Thus, process switch, exposé, spaces, ... still work in fullscreen mode + * Thus, process switch, exposé, spaces, ... still work in full-screen mode. */ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state) { diff --git a/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc b/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc index b53ca5f5c28..93693be9b75 100644 --- a/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc +++ b/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc @@ -2420,7 +2420,7 @@ static void legacy_object_modifiers(Main & /*bmain*/, Object &object) * * \note De-duplication needs to assign the new, duplicated GPv2 ID to annotations, and keep the * original one assigned to objects. That way, when the object data are converted, other potential - * references to the old GPv2 ID (drivers, custom propoerties, etc.) can be safely remapped to the + * references to the old GPv2 ID (drivers, custom properties, etc.) can be safely remapped to the * new GPv3 ID. * * \warning: This makes the assumption that annotation data is not typically referenced by anything diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc index 066e23cf420..bd72b2aa98e 100644 --- a/source/blender/compositor/operations/COM_SMAAOperation.cc +++ b/source/blender/compositor/operations/COM_SMAAOperation.cc @@ -185,7 +185,7 @@ * * b) If you want to enable temporal supersampling (SMAA T2x): * - * 1. The first step is to render using subpixel jitters. I won't go into + * 1. The first step is to render using sub-pixel jitters. I won't go into * detail, but it's as simple as moving each vertex position in the * vertex shader, you can check how we do it in our DX10 demo. * @@ -195,7 +195,7 @@ * CryENGINE temporal reprojection by setting the SMAA_REPROJECTION macro. * Check out SMAA_DECODE_VELOCITY if your velocity buffer is encoded. * - * 3. The next step is to apply SMAA to each subpixel jittered frame, just as + * 3. The next step is to apply SMAA to each sub-pixel jittered frame, just as * done for 1x. * * 4. At this point you should already have something usable, but for best @@ -878,7 +878,7 @@ static float2 SMAAAreaDiag(SMAATexture2D(areaTex), float2 dist, float2 e, float /* Diagonal areas are on the second half of the texture: */ texcoord.x += 0.5f; - /* Move to proper place, according to the subpixel offset: */ + /* Move to proper place, according to the sub-pixel offset: */ texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset; /* Do it! */ @@ -1125,7 +1125,7 @@ static float2 SMAAArea(SMAATexture2D(areaTex), float2 dist, float e1, float e2, /* We do a scale and bias for mapping to texel space: */ texcoord = mad(SMAA_AREATEX_PIXEL_SIZE, texcoord, 0.5f * SMAA_AREATEX_PIXEL_SIZE); - /* Move to proper place, according to the subpixel offset: */ + /* Move to proper place, according to the sub-pixel offset: */ texcoord.y = mad(SMAA_AREATEX_SUBTEX_SIZE, offset, texcoord.y); /* Do it! */ @@ -1389,7 +1389,7 @@ static float4 SMAANeighborhoodBlendingPS(float2 texcoord, color += blendingWeight.y * SMAASampleLevelZero(colorTex, blendingCoord.zw()); #if SMAA_REPROJECTION - /* Antialias velocity for proper reprojection in a later stage: */ + /* Anti-alias velocity for proper reprojection in a later stage: */ float2 velocity = blendingWeight.x * SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.xy())); velocity += blendingWeight.y * diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_bxdf_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_bxdf_lib.glsl index a7f5edbbb98..aaf92bbd3ee 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_bxdf_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_bxdf_lib.glsl @@ -145,7 +145,7 @@ float refraction_roughness_remapping(float roughness, float ior) } /** - * `roughness` is expected to be the linear (from UI) roughess from. + * `roughness` is expected to be the linear (from UI) roughness from. */ vec3 reflection_dominant_dir(vec3 N, vec3 V, float roughness) { @@ -161,7 +161,7 @@ vec3 reflection_dominant_dir(vec3 N, vec3 V, float roughness) } /** - * `roughness` is expected to be the reflection roughess from `refraction_roughness_remapping`. + * `roughness` is expected to be the reflection roughness from `refraction_roughness_remapping`. */ vec3 refraction_dominant_dir(vec3 N, vec3 V, float ior, float roughness) { diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_deferred_light_frag.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_deferred_light_frag.glsl index 559d6e46192..b69506793f3 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_deferred_light_frag.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_deferred_light_frag.glsl @@ -34,7 +34,7 @@ void main() } /* TODO(fclem): If transmission (no SSS) is present, we could reduce LIGHT_CLOSURE_EVAL_COUNT - * by 1 for this evaluaiton and skip evaluating the transmission closure twice. */ + * by 1 for this evaluation and skip evaluating the transmission closure twice. */ light_eval_reflection(stack, P, Ng, V, vPz); #if 1 /* TODO Limit to transmission. Can bypass the check if stencil is tagged properly and use \ diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_forward_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_forward_lib.glsl index 5488d9b089e..a5b0e562476 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_forward_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_forward_lib.glsl @@ -28,7 +28,7 @@ void forward_lighting_eval(float thickness, out vec3 radiance, out vec3 transmit } /* TODO(fclem): If transmission (no SSS) is present, we could reduce LIGHT_CLOSURE_EVAL_COUNT - * by 1 for this evaluaiton and skip evaluating the transmission closure twice. */ + * by 1 for this evaluation and skip evaluating the transmission closure twice. */ light_eval_reflection(stack, g_data.P, g_data.Ng, V, vPz); #if defined(MAT_SUBSURFACE) || defined(MAT_REFRACTION) || defined(MAT_TRANSLUCENT) diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_horizon_resolve_comp.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_horizon_resolve_comp.glsl index 779d33089c8..96372ece43d 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_horizon_resolve_comp.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_horizon_resolve_comp.glsl @@ -155,7 +155,7 @@ void main() break; } case CLOSURE_BSDF_TRANSLUCENT_ID: - /* Translucent BSDF with thickness is modelled as uniform sphere distribution which drops + /* Translucent BSDF with thickness is modeled as uniform sphere distribution which drops * all the directional terms. */ L = (gbuf.thickness > 0.0) ? vec3(0.0) : -N; break; diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_light_eval_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_light_eval_lib.glsl index e1f74b46804..60df322da7d 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_light_eval_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_light_eval_lib.glsl @@ -147,7 +147,7 @@ ClosureLight closure_light_new_ex(ClosureUndetermined cl, if (is_transmission) { /* If the `thickness / sss_radius` ratio is near 0, this transmission term should converge * to a uniform term like the translucent BSDF. But we need to find what to do in other - * cases. For now, approximate the transmission term as just backfacing. */ + * cases. For now, approximate the transmission term as just back-facing. */ cl_light.N = -cl.N; cl_light.type = LIGHT_DIFFUSE; /* Lit and shadow as outside of the object. */ diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_surf_volume_frag.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_surf_volume_frag.glsl index 2f84b049fb2..2709d8beff0 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_surf_volume_frag.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_surf_volume_frag.glsl @@ -136,7 +136,7 @@ void main() #endif #ifndef VOLUME_HOMOGENOUS - /* Heterogenous volumes evaluate properties at every froxel position. */ + /* Heterogeneous volumes evaluate properties at every froxel position. */ VolumeProperties prop = eval_froxel(froxel, jitter); #endif write_froxel(froxel, prop); diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_thickness_amend_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_thickness_amend_lib.glsl index a3771e04215..eb3fa8f9929 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_thickness_amend_lib.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_thickness_amend_lib.glsl @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ /** - * Amend thickness after object rasterization using shadowmaps. + * Amend thickness after object rasterization using shadow-maps. * * Required resources: * - atlas_tx diff --git a/source/blender/gpu/metal/mtl_framebuffer.mm b/source/blender/gpu/metal/mtl_framebuffer.mm index 964dd0335c3..ff130546394 100644 --- a/source/blender/gpu/metal/mtl_framebuffer.mm +++ b/source/blender/gpu/metal/mtl_framebuffer.mm @@ -477,13 +477,13 @@ void MTLFrameBuffer::subpass_transition_impl(const GPUAttachmentState /*depth_at { const bool is_tile_based_arch = (GPU_platform_architecture() == GPU_ARCHITECTURE_TBDR); if (!is_tile_based_arch) { - /* Break renderpass if tile memory is unsupported to ensure current framebuffer results are + /* Break render-pass if tile memory is unsupported to ensure current frame-buffer results are * stored. */ context_->main_command_buffer.end_active_command_encoder(); - /* Bind framebuffer attachments as textures. - * NOTE: Follows behaviour of gl_framebuffer. However, shaders utilising subpass_in will - * need to avoid bindpoint collisions for image/texture resources. */ + /* Bind frame-buffer attachments as textures. + * NOTE: Follows behavior of gl_framebuffer. However, shaders utilizing subpass_in will + * need to avoid bind-point collisions for image/texture resources. */ for (int i : color_attachment_states.index_range()) { GPUAttachmentType type = GPU_FB_COLOR_ATTACHMENT0 + i; GPUTexture *attach_tex = this->attachments_[type].tex; diff --git a/source/blender/gpu/vulkan/vk_to_string.py b/source/blender/gpu/vulkan/vk_to_string.py index 9c9f764ef27..6a3f2df2111 100644 --- a/source/blender/gpu/vulkan/vk_to_string.py +++ b/source/blender/gpu/vulkan/vk_to_string.py @@ -270,7 +270,7 @@ def parse_features(root): features = [] for feature_name in FEATURES: feature = root.find(f"feature[@name='{feature_name}']") - assert(feature) + assert (feature) features.append(feature) return features @@ -280,7 +280,7 @@ def parse_extensions(root): extensions = [] for extension_name in EXTENSIONS: extension = root.find(f"extensions/extension[@name='{extension_name}']") - assert(extension) + assert (extension) extensions.append(extension) return extensions @@ -361,7 +361,7 @@ def generate_to_string(vk_xml, header): vk_to_string += generate_bitflag_to_string_hpp(flag_to_generate) for struct_to_generate in structs_to_generate: struct = root.find(f"types/type[@category='struct'][@name='{struct_to_generate}']") - assert(struct) + assert (struct) vk_to_string += generate_struct_to_string_hpp(struct) else: for enum_to_generate in enums_to_generate: @@ -376,7 +376,7 @@ def generate_to_string(vk_xml, header): for struct_to_generate in structs_to_generate: struct = root.find(f"types/type[@category='struct'][@name='{struct_to_generate}']") - assert(struct) + assert (struct) vk_to_string += generate_struct_to_string_cpp(struct, flags_to_generate, enums_to_generate,