diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
commit | 17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch) | |
tree | 8a164422f7eb7d3aa9f7473c19c80da535c29a05 /intern | |
parent | b62b923f544fa1df0aecd56f3568dd5185601306 (diff) |
Cleanup: correct spelling in comments
Diffstat (limited to 'intern')
75 files changed, 145 insertions, 147 deletions
diff --git a/intern/cycles/app/cycles_cubin_cc.cpp b/intern/cycles/app/cycles_cubin_cc.cpp index 7631cb9bed5..e5d256dd113 100644 --- a/intern/cycles/app/cycles_cubin_cc.cpp +++ b/intern/cycles/app/cycles_cubin_cc.cpp @@ -103,7 +103,7 @@ static bool compile_cuda(CompilationSettings &settings) return false; } - /* Tranfer options to a classic C array. */ + /* Transfer options to a classic C array. */ vector<const char *> opts(options.size()); for (size_t i = 0; i < options.size(); i++) { opts[i] = options[i].c_str(); diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp index d5dd7215c47..ae43dae4dc1 100644 --- a/intern/cycles/blender/blender_particles.cpp +++ b/intern/cycles/blender/blender_particles.cpp @@ -31,7 +31,7 @@ bool BlenderSync::sync_dupli_particle(BL::Object &b_ob, BL::DepsgraphObjectInstance &b_instance, Object *object) { - /* test if this dupli was generated from a particle sytem */ + /* Test if this dupli was generated from a particle system. */ BL::ParticleSystem b_psys = b_instance.particle_system(); if (!b_psys) return false; diff --git a/intern/cycles/blender/blender_session.h b/intern/cycles/blender/blender_session.h index 68db8a2fb58..d967b81c854 100644 --- a/intern/cycles/blender/blender_session.h +++ b/intern/cycles/blender/blender_session.h @@ -136,7 +136,7 @@ class BlenderSession { /* ** Resumable render ** */ - /* Overall number of chunks in which the sample range is to be devided. */ + /* Overall number of chunks in which the sample range is to be divided. */ static int num_resumable_chunks; /* Current resumable chunk index to render. */ diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 4bcadab35a1..aea601480bf 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -942,7 +942,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine, else if (shadingsystem == 1) params.shadingsystem = SHADINGSYSTEM_OSL; - /* color managagement */ + /* Color management. */ params.display_buffer_linear = b_engine.support_display_space_shader(b_scene); if (b_engine.is_preview()) { diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index 1727082b7ec..296f9130f43 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -703,7 +703,7 @@ BVHNode *BVHBuild::build_node(const BVHRange &range, unalignedSplitSAH = params.sah_node_cost * unaligned_split.bounds.half_area() + params.sah_primitive_cost * unaligned_split.nodeSAH; /* TOOD(sergey): Check we can create leaf already. */ - /* Check whether unaligned split is better than the regulat one. */ + /* Check whether unaligned split is better than the regular one. */ if (unalignedSplitSAH < splitSAH) { do_unalinged_split = true; } @@ -842,7 +842,7 @@ BVHNode *BVHBuild::create_leaf_node(const BVHRange &range, const vector<BVHRefer vector<BVHReference, LeafReferenceStackAllocator> object_references; uint visibility[PRIMITIVE_NUM_TOTAL] = {0}; - /* NOTE: Keep initializtion in sync with actual number of primitives. */ + /* NOTE: Keep initialization in sync with actual number of primitives. */ BoundBox bounds[PRIMITIVE_NUM_TOTAL] = { BoundBox::empty, BoundBox::empty, BoundBox::empty, BoundBox::empty}; int ob_num = 0; diff --git a/intern/cycles/device/cuda/device_cuda_impl.cpp b/intern/cycles/device/cuda/device_cuda_impl.cpp index cff30eb9b48..44a51835f4c 100644 --- a/intern/cycles/device/cuda/device_cuda_impl.cpp +++ b/intern/cycles/device/cuda/device_cuda_impl.cpp @@ -184,7 +184,7 @@ CUDADevice::CUDADevice(DeviceInfo &info, Stats &stats, Profiler &profiler, bool functions.loaded = false; - /* Intialize CUDA. */ + /* Initialize CUDA. */ CUresult result = cuInit(0); if (result != CUDA_SUCCESS) { set_error(string_printf("Failed to initialize CUDA runtime (%s)", cuewErrorString(result))); diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp index 44959577fb5..b272e59f99d 100644 --- a/intern/cycles/device/device_multi.cpp +++ b/intern/cycles/device/device_multi.cpp @@ -296,7 +296,7 @@ class MultiDevice : public Device { i++; } - /* Change geomtry BVH pointers back to the multi BVH */ + /* Change geometry BVH pointers back to the multi BVH. */ for (size_t k = 0; k < bvh->geometry.size(); ++k) { bvh->geometry[k]->bvh = geom_bvhs[k]; } diff --git a/intern/cycles/device/device_network.h b/intern/cycles/device/device_network.h index e74c4508ab6..b3a0f6daa57 100644 --- a/intern/cycles/device/device_network.h +++ b/intern/cycles/device/device_network.h @@ -80,7 +80,7 @@ class network_device_memory : public device_memory { vector<char> local_data; }; -/* Common netowrk error function / object for both DeviceNetwork and DeviceServer*/ +/* Common network error function / object for both DeviceNetwork and DeviceServer. */ class NetworkError { public: NetworkError() diff --git a/intern/cycles/device/opencl/device_opencl.h b/intern/cycles/device/opencl/device_opencl.h index 4fd3c27f17e..2d6c6d04214 100644 --- a/intern/cycles/device/opencl/device_opencl.h +++ b/intern/cycles/device/opencl/device_opencl.h @@ -34,7 +34,7 @@ CCL_NAMESPACE_BEGIN /* Disable workarounds, seems to be working fine on latest drivers. */ # define CYCLES_DISABLE_DRIVER_WORKAROUNDS -/* Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable workaounds for testing */ +/* Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable workarounds for testing. */ # ifndef CYCLES_DISABLE_DRIVER_WORKAROUNDS /* Work around AMD driver hangs by ensuring each command is finished before doing anything else. */ # undef clEnqueueNDRangeKernel @@ -287,7 +287,7 @@ class OpenCLDevice : public Device { /* Try to load the program from device cache or disk */ bool load(); - /* Compile the kernel (first separate, failback to local) */ + /* Compile the kernel (first separate, fail-back to local). */ void compile(); /* Create the OpenCL kernels after loading or compiling */ void create_kernels(); @@ -628,7 +628,7 @@ class OpenCLDevice : public Device { void release_mem_object_safe(cl_mem mem); void release_program_safe(cl_program program); - /* ** Those guys are for workign around some compiler-specific bugs ** */ + /* ** Those guys are for working around some compiler-specific bugs ** */ cl_program load_cached_kernel(ustring key, thread_scoped_lock &cache_locker); diff --git a/intern/cycles/device/opencl/device_opencl_impl.cpp b/intern/cycles/device/opencl/device_opencl_impl.cpp index ec699462bfe..aee3b0fb64f 100644 --- a/intern/cycles/device/opencl/device_opencl_impl.cpp +++ b/intern/cycles/device/opencl/device_opencl_impl.cpp @@ -2151,7 +2151,7 @@ void OpenCLDevice::release_program_safe(cl_program program) } } -/* ** Those guys are for workign around some compiler-specific bugs ** */ +/* ** Those guys are for working around some compiler-specific bugs ** */ cl_program OpenCLDevice::load_cached_kernel(ustring key, thread_scoped_lock &cache_locker) { diff --git a/intern/cycles/kernel/bvh/bvh_types.h b/intern/cycles/kernel/bvh/bvh_types.h index b173568266b..9f0879a2069 100644 --- a/intern/cycles/kernel/bvh/bvh_types.h +++ b/intern/cycles/kernel/bvh/bvh_types.h @@ -42,7 +42,7 @@ CCL_NAMESPACE_BEGIN #define BVH_FEATURE(f) (((BVH_FUNCTION_FEATURES) & (f)) != 0) -/* Debugging heleprs */ +/* Debugging helpers. */ #ifdef __KERNEL_DEBUG__ # define BVH_DEBUG_INIT() \ do { \ diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h index d9e81535b62..32639ba24ec 100644 --- a/intern/cycles/kernel/closure/bsdf_microfacet.h +++ b/intern/cycles/kernel/closure/bsdf_microfacet.h @@ -125,7 +125,7 @@ ccl_device_inline void microfacet_beckmann_sample_slopes(KernelGlobals *kg, } *slope_y = fast_ierff(2.0f * randv - 1.0f); #else - /* Use precomputed table on CPU, it gives better perfomance. */ + /* Use precomputed table on CPU, it gives better performance. */ int beckmann_table_offset = kernel_data.tables.beckmann_offset; *slope_x = lookup_table_read_2D( diff --git a/intern/cycles/kernel/filter/filter_transform_gpu.h b/intern/cycles/kernel/filter/filter_transform_gpu.h index adc85881fe5..ec258a5212a 100644 --- a/intern/cycles/kernel/filter/filter_transform_gpu.h +++ b/intern/cycles/kernel/filter/filter_transform_gpu.h @@ -78,7 +78,7 @@ ccl_device void kernel_filter_construct_transform(const ccl_global float *ccl_re /* === Generate the feature transformation. === * This transformation maps the num_features-dimensional feature space to a reduced feature * (r-feature) space which generally has fewer dimensions. - * This mainly helps to prevent overfitting. */ + * This mainly helps to prevent over-fitting. */ float feature_matrix[DENOISE_FEATURES * DENOISE_FEATURES]; math_matrix_zero(feature_matrix, num_features); FOR_PIXEL_WINDOW @@ -91,7 +91,7 @@ ccl_device void kernel_filter_construct_transform(const ccl_global float *ccl_re math_matrix_jacobi_eigendecomposition(feature_matrix, transform, num_features, transform_stride); *rank = 0; - /* Prevent overfitting when a small window is used. */ + /* Prevent over-fitting when a small window is used. */ int max_rank = min(num_features, num_pixels / 3); if (pca_threshold < 0.0f) { float threshold_energy = 0.0f; diff --git a/intern/cycles/kernel/filter/filter_transform_sse.h b/intern/cycles/kernel/filter/filter_transform_sse.h index 5a124b5d73b..0304d990f9f 100644 --- a/intern/cycles/kernel/filter/filter_transform_sse.h +++ b/intern/cycles/kernel/filter/filter_transform_sse.h @@ -93,7 +93,7 @@ ccl_device void kernel_filter_construct_transform(const float *ccl_restrict buff math_matrix_jacobi_eigendecomposition(feature_matrix, transform, num_features, 1); *rank = 0; - /* Prevent overfitting when a small window is used. */ + /* Prevent over-fitting when a small window is used. */ int max_rank = min(num_features, num_pixels / 3); if (pca_threshold < 0.0f) { float threshold_energy = 0.0f; diff --git a/intern/cycles/kernel/geom/geom_object.h b/intern/cycles/kernel/geom/geom_object.h index 1907f5d3935..fe73335a335 100644 --- a/intern/cycles/kernel/geom/geom_object.h +++ b/intern/cycles/kernel/geom/geom_object.h @@ -435,7 +435,7 @@ ccl_device_inline float bvh_instance_push( return t; } -/* Transorm ray to exit static object in BVH */ +/* Transform ray to exit static object in BVH. */ ccl_device_inline float bvh_instance_pop( KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *dir, float3 *idir, float t) @@ -497,7 +497,7 @@ ccl_device_inline float bvh_instance_motion_push(KernelGlobals *kg, return t; } -/* Transorm ray to exit motion blurred object in BVH */ +/* Transform ray to exit motion blurred object in BVH. */ ccl_device_inline float bvh_instance_motion_pop(KernelGlobals *kg, int object, diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h index e876e5d8ca6..ddcf94be1de 100644 --- a/intern/cycles/kernel/kernel_bake.h +++ b/intern/cycles/kernel/kernel_bake.h @@ -251,7 +251,7 @@ ccl_device void kernel_bake_evaluate( path_rng_2D(kg, rng_hash, sample, num_samples, PRNG_FILTER_U, &filter_x, &filter_y); } - /* Barycentric UV with subpixel offset. */ + /* Barycentric UV with sub-pixel offset. */ float u = primitive[2]; float v = primitive[3]; diff --git a/intern/cycles/kernel/kernel_film.h b/intern/cycles/kernel/kernel_film.h index 17b69b6198b..a6fd4f1dc7e 100644 --- a/intern/cycles/kernel/kernel_film.h +++ b/intern/cycles/kernel/kernel_film.h @@ -63,12 +63,12 @@ ccl_device float4 film_map(KernelGlobals *kg, float4 rgba_in, float scale) { float4 result; - /* conversion to srgb */ + /* Conversion to SRGB. */ result.x = color_linear_to_srgb(rgba_in.x * scale); result.y = color_linear_to_srgb(rgba_in.y * scale); result.z = color_linear_to_srgb(rgba_in.z * scale); - /* clamp since alpha might be > 1.0 due to russian roulette */ + /* Clamp since alpha might be > 1.0 due to Russian roulette. */ result.w = saturate(rgba_in.w * scale); return result; diff --git a/intern/cycles/kernel/kernel_jitter.h b/intern/cycles/kernel/kernel_jitter.h index b9c48b86a5d..f4e60a807f7 100644 --- a/intern/cycles/kernel/kernel_jitter.h +++ b/intern/cycles/kernel/kernel_jitter.h @@ -21,7 +21,7 @@ CCL_NAMESPACE_BEGIN /* "Correlated Multi-Jittered Sampling" * Andrew Kensler, Pixar Technical Memo 13-01, 2013 */ -/* todo: find good value, suggested 64 gives pattern on cornell box ceiling */ +/* TODO: find good value, suggested 64 gives pattern on cornell box ceiling. */ #define CMJ_RANDOM_OFFSET_LIMIT 4096 ccl_device_inline bool cmj_is_pow2(int i) @@ -179,7 +179,7 @@ ccl_device void cmj_sample_2D(int s, int N, int p, float *fx, float *fy) smodm = cmj_fast_mod_pow2(s, m); } else { - /* Doing s*inmv gives precision issues here. */ + /* Doing `s * inmv` gives precision issues here. */ sdivm = s / m; smodm = s - sdivm * m; } diff --git a/intern/cycles/kernel/kernel_path_branched.h b/intern/cycles/kernel/kernel_path_branched.h index b9569f531e6..9ce7a147369 100644 --- a/intern/cycles/kernel/kernel_path_branched.h +++ b/intern/cycles/kernel/kernel_path_branched.h @@ -155,7 +155,7 @@ ccl_device_forceinline void kernel_branched_path_volume(KernelGlobals *kg, else # endif /* __VOLUME_DECOUPLED__ */ { - /* GPU: no decoupled ray marching, scatter probalistically */ + /* GPU: no decoupled ray marching, scatter probabilistically. */ int num_samples = kernel_data.integrator.volume_samples; float num_samples_inv = 1.0f / num_samples; diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h index a9b17854f25..49e5e25c2e0 100644 --- a/intern/cycles/kernel/kernel_random.h +++ b/intern/cycles/kernel/kernel_random.h @@ -304,7 +304,7 @@ ccl_device_inline bool sample_is_even(int pattern, int sample) #elif defined(__KERNEL_OPENCL__) return popcount(sample & 0xaaaaaaaa) & 1; #else - /* TODO(Stefan): popcnt intrinsic for Windows with fallback for older CPUs. */ + /* TODO(Stefan): pop-count intrinsic for Windows with fallback for older CPUs. */ int i = sample & 0xaaaaaaaa; i = i - ((i >> 1) & 0x55555555); i = (i & 0x33333333) + ((i >> 2) & 0x33333333); diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index f0e65542693..82cc11922e0 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -1641,7 +1641,7 @@ enum RayState { RAY_UPDATE_BUFFER, /* Denotes ray needs to skip most surface shader work. */ RAY_HAS_ONLY_VOLUME, - /* Donotes ray has hit background */ + /* Denotes ray has hit background */ RAY_HIT_BACKGROUND, /* Denotes ray has to be regenerated */ RAY_TO_REGENERATE, @@ -1699,7 +1699,7 @@ typedef struct WorkTile { ccl_global float *buffer; } WorkTile; -/* Precoumputed sample table sizes for PMJ02 sampler. */ +/* Pre-computed sample table sizes for PMJ02 sampler. */ #define NUM_PMJ_SAMPLES 64 * 64 #define NUM_PMJ_PATTERNS 48 diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index 2a4a1dfe325..2b7c21d0bc4 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -1033,7 +1033,7 @@ bool OSLRenderServices::get_background_attribute( return set_attribute_int(f, type, derivatives, val); } else if (name == u_ndc) { - /* NDC coordinates with special exception for otho */ + /* NDC coordinates with special exception for orthographic projection. */ OSLThreadData *tdata = kg->osl_tdata; OSL::ShaderGlobals *globals = &tdata->globals; float3 ndc[3]; diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp index 3d0813c15e3..8606c459375 100644 --- a/intern/cycles/kernel/osl/osl_shader.cpp +++ b/intern/cycles/kernel/osl/osl_shader.cpp @@ -129,7 +129,7 @@ static void shaderdata_to_shaderglobals( /* clear trace data */ tdata->tracedata.init = false; - /* used by renderservices */ + /* Used by render-services. */ sd->osl_globals = kg; sd->osl_path_state = state; } diff --git a/intern/cycles/kernel/shaders/node_image_texture.osl b/intern/cycles/kernel/shaders/node_image_texture.osl index 22d34a1082c..9e2ef84c872 100644 --- a/intern/cycles/kernel/shaders/node_image_texture.osl +++ b/intern/cycles/kernel/shaders/node_image_texture.osl @@ -42,7 +42,7 @@ point map_to_sphere(vector dir) float v, u; if (len > 0.0) { if (dir[0] == 0.0 && dir[1] == 0.0) { - u = 0.0; /* Othwise domain error. */ + u = 0.0; /* Otherwise domain error. */ } else { u = (1.0 - atan2(dir[0], dir[1]) / M_PI) / 2.0; diff --git a/intern/cycles/kernel/split/kernel_branched.h b/intern/cycles/kernel/split/kernel_branched.h index bfcd21baac4..45f5037d321 100644 --- a/intern/cycles/kernel/split/kernel_branched.h +++ b/intern/cycles/kernel/split/kernel_branched.h @@ -41,7 +41,7 @@ ccl_device_inline void kernel_split_branched_path_indirect_loop_init(KernelGloba # undef BRANCHED_STORE - /* set loop counters to intial position */ + /* Set loop counters to initial position. */ branched_state->next_closure = 0; branched_state->next_sample = 0; } diff --git a/intern/cycles/kernel/split/kernel_do_volume.h b/intern/cycles/kernel/split/kernel_do_volume.h index b24699ec39c..1775e870f07 100644 --- a/intern/cycles/kernel/split/kernel_do_volume.h +++ b/intern/cycles/kernel/split/kernel_do_volume.h @@ -35,7 +35,7 @@ ccl_device_noinline bool kernel_split_branched_path_volume_indirect_light_iter(K PathRadiance *L = &kernel_split_state.path_radiance[ray_index]; ShaderData *emission_sd = AS_SHADER_DATA(&kernel_split_state.sd_DL_shadow[ray_index]); - /* GPU: no decoupled ray marching, scatter probalistically */ + /* GPU: no decoupled ray marching, scatter probabilistically. */ int num_samples = kernel_data.integrator.volume_samples; float num_samples_inv = 1.0f / num_samples; diff --git a/intern/cycles/kernel/split/kernel_enqueue_inactive.h b/intern/cycles/kernel/split/kernel_enqueue_inactive.h index 31d2daef616..745313f89f1 100644 --- a/intern/cycles/kernel/split/kernel_enqueue_inactive.h +++ b/intern/cycles/kernel/split/kernel_enqueue_inactive.h @@ -20,7 +20,7 @@ ccl_device void kernel_enqueue_inactive(KernelGlobals *kg, ccl_local_param unsigned int *local_queue_atomics) { #ifdef __BRANCHED_PATH__ - /* Enqeueue RAY_INACTIVE rays into QUEUE_INACTIVE_RAYS queue. */ + /* Enqueue RAY_INACTIVE rays into QUEUE_INACTIVE_RAYS queue. */ if (ccl_local_id(0) == 0 && ccl_local_id(1) == 0) { *local_queue_atomics = 0; } diff --git a/intern/cycles/kernel/split/kernel_shader_setup.h b/intern/cycles/kernel/split/kernel_shader_setup.h index 900cbcb869c..551836d1653 100644 --- a/intern/cycles/kernel/split/kernel_shader_setup.h +++ b/intern/cycles/kernel/split/kernel_shader_setup.h @@ -25,7 +25,7 @@ CCL_NAMESPACE_BEGIN ccl_device void kernel_shader_setup(KernelGlobals *kg, ccl_local_param unsigned int *local_queue_atomics) { - /* Enqeueue RAY_TO_REGENERATE rays into QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS queue. */ + /* Enqueue RAY_TO_REGENERATE rays into QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS queue. */ if (ccl_local_id(0) == 0 && ccl_local_id(1) == 0) { *local_queue_atomics = 0; } diff --git a/intern/cycles/kernel/svm/svm_hsv.h b/intern/cycles/kernel/svm/svm_hsv.h index 1f7bd421869..c299cf58c7f 100644 --- a/intern/cycles/kernel/svm/svm_hsv.h +++ b/intern/cycles/kernel/svm/svm_hsv.h @@ -37,7 +37,7 @@ ccl_device void svm_node_hsv( color = rgb_to_hsv(color); - /* remember: fmod doesn't work for negative numbers here */ + /* Remember: `fmodf` doesn't work for negative numbers here. */ color.x = fmodf(color.x + hue + 0.5f, 1.0f); color.y = saturate(color.y * sat); color.z *= val; @@ -48,7 +48,7 @@ ccl_device void svm_node_hsv( color.y = fac * color.y + (1.0f - fac) * in_color.y; color.z = fac * color.z + (1.0f - fac) * in_color.z; - /* Clamp color to prevent negative values caused by oversaturation. */ + /* Clamp color to prevent negative values caused by over saturation. */ color.x = max(color.x, 0.0f); color.y = max(color.y, 0.0f); color.z = max(color.z, 0.0f); diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h index f57c85fc23e..742addab611 100644 --- a/intern/cycles/kernel/svm/svm_image.h +++ b/intern/cycles/kernel/svm/svm_image.h @@ -38,7 +38,7 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y, return r; } -/* Remap coordnate from 0..1 box to -1..-1 */ +/* Remap coordinate from 0..1 box to -1..-1 */ ccl_device_inline float3 texco_remap_square(float3 co) { return (co - make_float3(0.5f, 0.5f, 0.5f)) * 2.0f; diff --git a/intern/cycles/kernel/svm/svm_noise.h b/intern/cycles/kernel/svm/svm_noise.h index 7db8ffcc6e1..7ad61f23cc1 100644 --- a/intern/cycles/kernel/svm/svm_noise.h +++ b/intern/cycles/kernel/svm/svm_noise.h @@ -615,8 +615,8 @@ ccl_device_noinline float perlin_3d(float x, float y, float z) * * Point Offset from v0 * v0 (0, 0, 0, 0) - * v1 (0, 0, 1, 0) The full avx type is computed by inserting the following - * v2 (0, 1, 0, 0) sse types into both the low and high parts of the avx. + * v1 (0, 0, 1, 0) The full AVX type is computed by inserting the following + * v2 (0, 1, 0, 0) sse types into both the low and high parts of the AVX. * v3 (0, 1, 1, 0) * v4 (1, 0, 0, 0) * v5 (1, 0, 1, 0) (0, 1, 0, 1) = shuffle<0, 2, 0, 2>(shuffle<2, 2, 2, 2>(V, V + 1)) diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h index c228df14985..4a00afc1d7f 100644 --- a/intern/cycles/kernel/svm/svm_types.h +++ b/intern/cycles/kernel/svm/svm_types.h @@ -205,8 +205,8 @@ typedef enum NodeHairInfo { NODE_INFO_CURVE_IS_STRAND, NODE_INFO_CURVE_INTERCEPT, NODE_INFO_CURVE_THICKNESS, - /*fade for minimum hair width transpency*/ - /*NODE_INFO_CURVE_FADE,*/ + /* Fade for minimum hair width transiency. */ + // NODE_INFO_CURVE_FADE, NODE_INFO_CURVE_TANGENT_NORMAL, NODE_INFO_CURVE_RANDOM, } NodeHairInfo; diff --git a/intern/cycles/render/alembic.cpp b/intern/cycles/render/alembic.cpp index a9d43415865..5942e512e60 100644 --- a/intern/cycles/render/alembic.cpp +++ b/intern/cycles/render/alembic.cpp @@ -1346,7 +1346,7 @@ void AlembicProcedural::generate(Scene *scene, Progress &progress) bool need_shader_updates = false; - /* check for changes in shaders (newly requested atttributes) */ + /* Check for changes in shaders (newly requested attributes). */ foreach (Node *object_node, objects) { AlembicObject *object = static_cast<AlembicObject *>(object_node); @@ -1626,7 +1626,7 @@ void AlembicProcedural::read_subd(Scene *scene, mesh->clear_non_sockets(); - /* udpate sockets */ + /* Update sockets. */ Object *object = abc_object->get_object(); cached_data.transforms.copy_to_socket(frame_time, object, object->get_tfm_socket()); @@ -1660,7 +1660,7 @@ void AlembicProcedural::read_subd(Scene *scene, mesh->set_num_subd_faces(mesh->get_subd_shader().size()); - /* udpate attributes */ + /* Update attributes. */ update_attributes(mesh->subd_attributes, cached_data, frame_time); diff --git a/intern/cycles/render/alembic.h b/intern/cycles/render/alembic.h index 77bdac09ba2..6b0d32fb3ab 100644 --- a/intern/cycles/render/alembic.h +++ b/intern/cycles/render/alembic.h @@ -361,7 +361,7 @@ class AlembicProcedural : public Procedural { /* Tag for an update only if something was modified. */ void tag_update(Scene *scene); - /* Returns a pointer to an exisiting or a newly created AlembicObject for the given path. */ + /* Returns a pointer to an existing or a newly created AlembicObject for the given path. */ AlembicObject *get_or_create_object(const ustring &path); private: diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index 045931ffdac..0948b20628f 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -448,7 +448,7 @@ bool RenderBuffers::get_pass_rect( pixels[1] = f.y * scale_exposure; pixels[2] = f.z * scale_exposure; - /* clamp since alpha might be > 1.0 due to russian roulette */ + /* Clamp since alpha might be > 1.0 due to Russian roulette. */ pixels[3] = saturate(f.w * scale); } } diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp index 3beb3d1d4d3..30bf6c4241a 100644 --- a/intern/cycles/render/camera.cpp +++ b/intern/cycles/render/camera.cpp @@ -252,11 +252,11 @@ void Camera::update(Scene *scene) Transform fulltoborder = transform_from_viewplane(viewport_camera_border); Transform bordertofull = transform_inverse(fulltoborder); - /* ndc to raster */ + /* NDC to raster. */ Transform ndctoraster = transform_scale(width, height, 1.0f) * bordertofull; Transform full_ndctoraster = transform_scale(full_width, full_height, 1.0f) * bordertofull; - /* raster to screen */ + /* Raster to screen. */ Transform screentondc = fulltoborder * transform_from_viewplane(viewplane); Transform screentoraster = ndctoraster * screentondc; @@ -264,7 +264,7 @@ void Camera::update(Scene *scene) Transform full_screentoraster = full_ndctoraster * screentondc; Transform full_rastertoscreen = transform_inverse(full_screentoraster); - /* screen to camera */ + /* Screen to camera. */ ProjectionTransform cameratoscreen; if (camera_type == CAMERA_PERSPECTIVE) cameratoscreen = projection_perspective(fov, nearclip, farclip); diff --git a/intern/cycles/render/colorspace.cpp b/intern/cycles/render/colorspace.cpp index 57979d5f225..4c9e86ea278 100644 --- a/intern/cycles/render/colorspace.cpp +++ b/intern/cycles/render/colorspace.cpp @@ -386,7 +386,7 @@ void ColorSpaceManager::free_memory() #endif } -/* Template instanstations so we don't have to inline functions. */ +/* Template instantiations so we don't have to inline functions. */ template void ColorSpaceManager::to_scene_linear(ustring, uchar *, size_t, bool); template void ColorSpaceManager::to_scene_linear(ustring, ushort *, size_t, bool); template void ColorSpaceManager::to_scene_linear(ustring, half *, size_t, bool); diff --git a/intern/cycles/render/denoising.cpp b/intern/cycles/render/denoising.cpp index 76408ca4849..ddbe7484800 100644 --- a/intern/cycles/render/denoising.cpp +++ b/intern/cycles/render/denoising.cpp @@ -847,7 +847,7 @@ bool DenoiseImage::save_output(const string &out_filepath, string &error) out.reset(); - /* Copy temporary file to outputput filepath. */ + /* Copy temporary file to output filepath. */ string rename_error; if (ok && !OIIO::Filesystem::rename(tmp_filepath, out_filepath, rename_error)) { error = "Failed to move denoised image to " + out_filepath + ": " + rename_error; diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index b6fe8a66b87..9ea56b30ffa 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -1453,7 +1453,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro if (shader->need_update_uvs) { device_update_flags |= ATTR_FLOAT2_NEEDS_REALLOC; - /* Attributes might need to be tesselated if added. */ + /* Attributes might need to be tessellated if added. */ if (geom->is_mesh()) { Mesh *mesh = static_cast<Mesh *>(geom); if (mesh->need_tesselation()) { @@ -1465,7 +1465,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro if (shader->need_update_attribute) { device_update_flags |= ATTRS_NEED_REALLOC; - /* Attributes might need to be tesselated if added. */ + /* Attributes might need to be tessellated if added. */ if (geom->is_mesh()) { Mesh *mesh = static_cast<Mesh *>(geom); if (mesh->need_tesselation()) { diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index 4adfebf80ae..5e068e74ce0 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -276,7 +276,7 @@ void ShaderGraph::connect(ShaderOutput *from, ShaderInput *to) emission->set_color(make_float3(1.0f, 1.0f, 1.0f)); emission->set_strength(1.0f); convert = add(emission); - /* Connect float inputs to Strength to save an additional Falue->Color conversion. */ + /* Connect float inputs to Strength to save an additional Value->Color conversion. */ if (from->type() == SocketType::FLOAT) { convert_in = convert->input("Strength"); } diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index a09a680f93f..29a95beaf7e 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -419,7 +419,7 @@ int ImageManager::add_image_slot(ImageLoader *loader, thread_scoped_lock device_lock(images_mutex); - /* Fnd existing image. */ + /* Find existing image. */ for (slot = 0; slot < images.size(); slot++) { img = images[slot]; if (img && ImageLoader::equals(img->loader, loader) && img->params == params) { diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index 638ac376157..1e54a237816 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -979,7 +979,7 @@ void LightManager::device_update(Device *device, VLOG(1) << "Total " << scene->lights.size() << " lights."; - /* Detect which lights are enabled, also determins if we need to update the background. */ + /* Detect which lights are enabled, also determines if we need to update the background. */ test_enabled_lights(scene); device_free(device, dscene, need_update_background); diff --git a/intern/cycles/render/merge.cpp b/intern/cycles/render/merge.cpp index 3ea3952b96c..8a58c827e82 100644 --- a/intern/cycles/render/merge.cpp +++ b/intern/cycles/render/merge.cpp @@ -151,7 +151,7 @@ static bool parse_channels(const ImageSpec &in_spec, string layername, passname, channelname; if (parse_channel_name( pass.channel_name, layername, passname, channelname, multiview_channels)) { - /* Channer part of a render layer. */ + /* Channel part of a render layer. */ pass.op = parse_channel_operation(passname); } else { @@ -163,7 +163,7 @@ static bool parse_channels(const ImageSpec &in_spec, file_layers[layername].passes.push_back(pass); } - /* Loop over all detected RenderLayers, check whether they contain a full set of input channels. + /* Loop over all detected render-layers, check whether they contain a full set of input channels. * Any channels that won't be processed internally are also passed through. */ for (auto &i : file_layers) { const string &name = i.first; @@ -457,7 +457,7 @@ static bool save_output(const string &filepath, out.reset(); - /* Copy temporary file to outputput filepath. */ + /* Copy temporary file to output filepath. */ string rename_error; if (ok && !OIIO::Filesystem::rename(tmp_filepath, filepath, rename_error)) { error = "Failed to move merged image to " + filepath + ": " + rename_error; diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index 4d51b4fccaf..d4603143ef4 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -1612,7 +1612,7 @@ class OSLNode : public ShaderNode { SHADER_NODE_NO_CLONE_CLASS(OSLNode) - /* ideally we could beter detect this, but we can't query this now */ + /* Ideally we could better detect this, but we can't query this now. */ bool has_spatial_varying() { return true; diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index 889636fe0f3..53c67049571 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -380,7 +380,7 @@ const char *OSLShaderManager::shader_load_filepath(string filepath) return hash; } - /* autocompile .OSL to .OSO if needed */ + /* Auto-compile .OSL to .OSO if needed. */ if (oso_modified_time == 0 || (oso_modified_time < modified_time)) { OSLShaderManager::osl_compile(filepath, osopath); modified_time = path_modified_time(osopath); @@ -562,7 +562,7 @@ OSLNode *OSLShaderManager::osl_node(ShaderGraph *graph, } } - /* set bytcode hash or filepath */ + /* Set byte-code hash or file-path. */ if (!bytecode_hash.empty()) { node->bytecode_hash = bytecode_hash; } diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h index 7595817226c..61c753e411c 100644 --- a/intern/cycles/render/scene.h +++ b/intern/cycles/render/scene.h @@ -358,7 +358,7 @@ class Scene : public NodeOwner { DeviceRequestedFeatures get_requested_device_features(); - /* Maximumnumber of closure during session lifetime. */ + /* Maximum number of closure during session lifetime. */ int max_closure_global; /* Get maximum number of closures to be used in kernel. */ diff --git a/intern/cycles/subd/subd_split.cpp b/intern/cycles/subd/subd_split.cpp index 928f5bf2ed7..4d648eb1f77 100644 --- a/intern/cycles/subd/subd_split.cpp +++ b/intern/cycles/subd/subd_split.cpp @@ -549,7 +549,7 @@ void DiagSplit::split_ngon(const Mesh::SubdFace &face, Patch *patches, size_t pa subpatch.edge_v1.indices_decrease_along_edge = true; subpatch.edge_u0.indices_decrease_along_edge = u0_reversed; - /* Perfrom split. */ + /* Perform split. */ { subpatch.edge_u0.T = T(subpatch.patch, subpatch.c00, subpatch.c10); subpatch.edge_u1.T = T(subpatch.patch, subpatch.c01, subpatch.c11); @@ -646,7 +646,7 @@ void DiagSplit::post_split() /* Set start and end indices for edges generated from a split. */ foreach (Edge &edge, edges) { if (edge.start_vert_index < 0) { - /* Fixup offsets. */ + /* Fix up offsets. */ if (edge.top_indices_decrease) { edge.top_offset = edge.top->T - edge.top_offset; } diff --git a/intern/cycles/subd/subd_split.h b/intern/cycles/subd/subd_split.h index 773f4ddf120..7416b2fbbf8 100644 --- a/intern/cycles/subd/subd_split.h +++ b/intern/cycles/subd/subd_split.h @@ -40,7 +40,7 @@ class DiagSplit { SubdParams params; vector<Subpatch> subpatches; - /* deque is used so that element pointers remain vaild when size is changed. */ + /* `deque` is used so that element pointers remain valid when size is changed. */ deque<Edge> edges; float3 to_world(Patch *patch, float2 uv); diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index 8caabf6eac3..ad04340231e 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -349,7 +349,7 @@ ccl_device_inline float fractf(float x) return x - floorf(x); } -/* Adapted from godotengine math_funcs.h. */ +/* Adapted from godot-engine math_funcs.h. */ ccl_device_inline float wrapf(float value, float max, float min) { float range = max - min; @@ -385,7 +385,7 @@ ccl_device_inline float nonzerof(float f, float eps) return f; } -/* Signum function testing for zero. Matches GLSL and OSL functions. */ +/* `signum` function testing for zero. Matches GLSL and OSL functions. */ ccl_device_inline float compatible_signf(float f) { if (f == 0.0f) { @@ -754,7 +754,7 @@ ccl_device_inline float2 map_to_sphere(const float3 co) float u, v; if (l > 0.0f) { if (UNLIKELY(co.x == 0.0f && co.y == 0.0f)) { - u = 0.0f; /* othwise domain error */ + u = 0.0f; /* Otherwise domain error. */ } else { u = (1.0f - atan2f(co.x, co.y) / M_PI_F) / 2.0f; diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h index 07b0878e3d5..107b36ce6cd 100644 --- a/intern/cycles/util/util_math_fast.h +++ b/intern/cycles/util/util_math_fast.h @@ -84,7 +84,7 @@ ccl_device_inline int fast_rint(float x) { /* used by sin/cos/tan range reduction. */ #ifdef __KERNEL_SSE4__ - /* Single roundps instruction on SSE4.1+ (for gcc/clang at least). */ + /* Single `roundps` instruction on SSE4.1+ (for gcc/clang at least). */ return float_to_int(rintf(x)); #else /* emulate rounding by adding/subtracting 0.5. */ @@ -613,7 +613,7 @@ ccl_device_inline float fast_erfcf(float x) ccl_device_inline float fast_ierff(float x) { - /* From: Approximating the erfinv function by Mike Giles. */ + /* From: Approximating the `erfinv` function by Mike Giles. */ /* To avoid trouble at the limit, clamp input to 1-eps. */ float a = fabsf(x); if (a > 0.99999994f) { diff --git a/intern/cycles/util/util_math_matrix.h b/intern/cycles/util/util_math_matrix.h index 1dc661a7aa7..123736f75a6 100644 --- a/intern/cycles/util/util_math_matrix.h +++ b/intern/cycles/util/util_math_matrix.h @@ -161,7 +161,7 @@ ccl_device_inline void math_trimatrix_add_gramian(ccl_global float *A, } } -/* Transpose matrix A inplace. */ +/* Transpose matrix A in place. */ ccl_device_inline void math_matrix_transpose(ccl_global float *A, int n, int stride) { for (int i = 0; i < n; i++) { diff --git a/intern/cycles/util/util_md5.h b/intern/cycles/util/util_md5.h index 4622945f9d2..3102a0f4bad 100644 --- a/intern/cycles/util/util_md5.h +++ b/intern/cycles/util/util_md5.h @@ -49,7 +49,7 @@ class MD5Hash { void process(const uint8_t *data); void finish(uint8_t digest[16]); - uint32_t count[2]; /* message length in bits, lsw first */ + uint32_t count[2]; /* message length in bits, LSW first. */ uint32_t abcd[4]; /* digest buffer */ uint8_t buf[64]; /* accumulate block */ }; diff --git a/intern/cycles/util/util_stack_allocator.h b/intern/cycles/util/util_stack_allocator.h index 36db655e5eb..ef31c0fe5e2 100644 --- a/intern/cycles/util/util_stack_allocator.h +++ b/intern/cycles/util/util_stack_allocator.h @@ -126,7 +126,7 @@ template<int SIZE, typename T> class ccl_try_align(16) StackAllocator return size_t(-1); } - /* Rebind to other ype of allocator. */ + /* Rebind to other type of allocator. */ template<class U> struct rebind { typedef StackAllocator<SIZE, U> other; diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h index f51aa7111e8..6b6f493bd94 100644 --- a/intern/cycles/util/util_string.h +++ b/intern/cycles/util/util_string.h @@ -66,9 +66,9 @@ string string_from_wstring(const wstring &path); string string_to_ansi(const string &str); #endif -/* Make a string from a size in bytes in human readable form */ +/* Make a string from a size in bytes in human readable form. */ string string_human_readable_size(size_t size); -/* Make a string from a unitless quantity in human readable form */ +/* Make a string from a unit-less quantity in human readable form. */ string string_human_readable_number(size_t num); CCL_NAMESPACE_END diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 8bce064ce63..bd7ba6657f0 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -580,7 +580,7 @@ typedef struct { GHOST_TUns32 xPixels; /** Number of lines. */ GHOST_TUns32 yPixels; - /** Numberof bits per pixel. */ + /** Number of bits per pixel. */ GHOST_TUns32 bpp; /** Refresh rate (in Hertz). */ GHOST_TUns32 frequency; diff --git a/intern/ghost/intern/GHOST_Context.h b/intern/ghost/intern/GHOST_Context.h index d07913b28c4..810b78a7d39 100644 --- a/intern/ghost/intern/GHOST_Context.h +++ b/intern/ghost/intern/GHOST_Context.h @@ -127,8 +127,8 @@ class GHOST_Context : public GHOST_IContext { } /** - * Gets the OpenGL framebuffer associated with the OpenGL context - * \return The ID of an OpenGL framebuffer object. + * Gets the OpenGL frame-buffer associated with the OpenGL context + * \return The ID of an OpenGL frame-buffer object. */ virtual unsigned int getDefaultFramebuffer() { diff --git a/intern/ghost/intern/GHOST_ContextCGL.h b/intern/ghost/intern/GHOST_ContextCGL.h index d499ec987b0..8e4376236fa 100644 --- a/intern/ghost/intern/GHOST_ContextCGL.h +++ b/intern/ghost/intern/GHOST_ContextCGL.h @@ -115,10 +115,10 @@ class GHOST_ContextCGL : public GHOST_Context { /** The OpenGL drawing context */ NSOpenGLContext *m_openGLContext; - /** The virtualized default framebuffer */ + /** The virtualized default frame-buffer. */ unsigned int m_defaultFramebuffer; - /** The virtualized default framebuffer's texture */ + /** The virtualized default frame-buffer's texture. */ MTLTexture *m_defaultFramebufferMetalTexture; bool m_coreProfile; diff --git a/intern/ghost/intern/GHOST_ContextD3D.h b/intern/ghost/intern/GHOST_ContextD3D.h index 18b4a5d1286..8b9537ca439 100644 --- a/intern/ghost/intern/GHOST_ContextD3D.h +++ b/intern/ghost/intern/GHOST_ContextD3D.h @@ -97,8 +97,8 @@ class GHOST_ContextD3D : public GHOST_Context { } /** - * Gets the OpenGL framebuffer associated with the OpenGL context - * \return The ID of an OpenGL framebuffer object. + * Gets the OpenGL frame-buffer associated with the OpenGL context + * \return The ID of an OpenGL frame-buffer object. */ unsigned int getDefaultFramebuffer() { diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h index 424f95aa573..13858410c5a 100644 --- a/intern/ghost/intern/GHOST_Debug.h +++ b/intern/ghost/intern/GHOST_Debug.h @@ -26,7 +26,7 @@ #ifdef _MSC_VER # ifdef DEBUG -/* Suppress stl-MSVC debug info warning. */ +/* Suppress STL-MSVC debug info warning. */ # pragma warning(disable : 4786) # endif #endif diff --git a/intern/ghost/intern/GHOST_DropTargetX11.cpp b/intern/ghost/intern/GHOST_DropTargetX11.cpp index 816d9c254ee..82ed9de230d 100644 --- a/intern/ghost/intern/GHOST_DropTargetX11.cpp +++ b/intern/ghost/intern/GHOST_DropTargetX11.cpp @@ -203,7 +203,7 @@ void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dr GHOST_TStringArray *strArray = NULL; int totPaths = 0, curLength = 0; - /* count total number of file pathes in buffer */ + /* Count total number of file paths in buffer. */ for (int i = 0; i <= dropBufferSize; i++) { if (dropBuffer[i] == 0 || dropBuffer[i] == '\n' || dropBuffer[i] == '\r') { if (curLength) { diff --git a/intern/ghost/intern/GHOST_DropTargetX11.h b/intern/ghost/intern/GHOST_DropTargetX11.h index 7d777270317..f538dbbb617 100644 --- a/intern/ghost/intern/GHOST_DropTargetX11.h +++ b/intern/ghost/intern/GHOST_DropTargetX11.h @@ -103,22 +103,22 @@ class GHOST_DropTargetX11 { /* Data type of the dragged object */ GHOST_TDragnDropTypes m_draggedObjectType; - /* is dnd stuff initialzied */ + /* Is drag-and-drop stuff initialized. */ static bool m_xdndInitialized; - /* class holding internal stiff of xdnd library */ + /* Class holding internal stiff of `xdnd` library. */ static DndClass m_dndClass; - /* list of supported types to be dragged into */ + /* List of supported types to be dragged into. */ static Atom *m_dndTypes; - /* list of supported dran'n'drop actions */ + /* List of supported drag-and-drop actions. */ static Atom *m_dndActions; - /* List of supported MIME types to be dragged into */ + /* List of supported MIME types to be dragged into. */ static const char *m_dndMimeTypes[]; - /* counter of references to global XDND structures */ + /* Counter of references to global #XDND structures. */ static int m_refCounter; #ifdef WITH_CXX_GUARDEDALLOC diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h index 63ecfd96cb8..cbef0f0edc4 100644 --- a/intern/ghost/intern/GHOST_ImeWin32.h +++ b/intern/ghost/intern/GHOST_ImeWin32.h @@ -303,10 +303,10 @@ class GHOST_ImeWin32 { */ void EndIME(HWND window_handle); - /* Updatg resultInfo and compInfo */ + /** Update #resultInfo and #compInfo */ void UpdateInfo(HWND window_handle); - /* disable ime when start up */ + /** Disable IME when start up. */ void CheckFirst(HWND window_handle); ImeComposition resultInfo, compInfo; diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp index 193633b5c3e..47e71b0d733 100644 --- a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp @@ -40,7 +40,7 @@ GHOST_SystemPathsWin32::~GHOST_SystemPathsWin32() const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const { - /* 1 utf-16 might translante into 3 utf-8. 2 utf-16 translates into 4 utf-8*/ + /* 1 utf-16 might translate into 3 utf-8. 2 utf-16 translates into 4 utf-8. */ static char knownpath[MAX_PATH * 3 + 128] = {0}; PWSTR knownpath_16 = NULL; diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 718ace9db4a..b71b6b9e170 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -963,7 +963,7 @@ GHOST_EventButton *GHOST_SystemWin32::processButtonEvent(GHOST_TEventType type, processCursorEvent(window); } else { - /* Tablet should be hadling inbetween mouse moves, only move to event position. */ + /* Tablet should be handling in between mouse moves, only move to event position. */ DWORD msgPos = ::GetMessagePos(); int msgPosX = GET_X_LPARAM(msgPos); int msgPosY = GET_Y_LPARAM(msgPos); diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 8e7b966aadf..9152aa22495 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -23,7 +23,7 @@ * \ingroup GHOST */ -#include <X11/XKBlib.h> /* Allow detectable auto-repeate. */ +#include <X11/XKBlib.h> /* Allow detectable auto-repeat. */ #include <X11/Xatom.h> #include <X11/Xutil.h> #include <X11/keysym.h> @@ -185,10 +185,10 @@ GHOST_SystemX11::GHOST_SystemX11() : GHOST_System(), m_xkb_descr(NULL), m_start_ GHOST_ASSERT(false, "Could not instantiate timer!"); } - /* Taking care not to overflow the tv.tv_sec * 1000 */ + /* Taking care not to overflow the `tv.tv_sec * 1000`. */ m_start_time = GHOST_TUns64(tv.tv_sec) * 1000 + tv.tv_usec / 1000; - /* Use detectable auto-repeate, mac and windows also do this. */ + /* Use detectable auto-repeat, mac and windows also do this. */ int use_xkb; int xkb_opcode, xkb_event, xkb_error; int xkb_major = XkbMajorVersion, xkb_minor = XkbMinorVersion; @@ -528,7 +528,7 @@ bool GHOST_SystemX11::openX11_IM() if (!m_display) return false; - /* set locale modifiers such as "@im=ibus" specified by XMODIFIERS */ + /* set locale modifiers such as `@im=ibus` specified by XMODIFIERS. */ XSetLocaleModifiers(""); m_xim = XOpenIM(m_display, NULL, (char *)GHOST_X11_RES_NAME, (char *)GHOST_X11_RES_CLASS); @@ -1146,7 +1146,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe) */ if ((xke->keycode >= 10 && xke->keycode < 20) && ((key_sym = XLookupKeysym(xke, ShiftMask)) >= XK_0) && (key_sym <= XK_9)) { - /* pass (keep shift'ed key_sym) */ + /* Pass (keep shifted `key_sym`). */ } else { /* regular case */ @@ -1161,12 +1161,12 @@ void GHOST_SystemX11::processEvent(XEvent *xe) #endif #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING) - /* getting unicode on key-up events gives XLookupNone status */ + /* Setting unicode on key-up events gives #XLookupNone status. */ XIC xic = window->getX11_XIC(); if (xic && xke->type == KeyPress) { Status status; - /* use utf8 because its not locale depentant, from xorg docs */ + /* Use utf8 because its not locale repentant, from XORG docs. */ if (!(len = Xutf8LookupString( xic, xke, utf8_buf, sizeof(utf8_array) - 5, &key_sym, &status))) { utf8_buf[0] = '\0'; @@ -1269,8 +1269,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe) gbmask = GHOST_kButtonMaskRight; /* It seems events 6 and 7 are for horizontal scrolling. * you can re-order button mapping like this... (swaps 6,7 with 8,9) - * xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7" - */ + * `xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7"` */ else if (xbe.button == 6) gbmask = GHOST_kButtonMaskButton6; else if (xbe.button == 7) @@ -1289,8 +1288,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe) /* change of size, border, layer etc. */ case ConfigureNotify: { - /* XConfigureEvent & xce = xe->xconfigure; */ - + // XConfigureEvent & xce = xe->xconfigure; g_event = new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window); break; } @@ -1934,8 +1932,8 @@ static GHOST_TKey ghost_key_from_keycode(const XkbDescPtr xkb_descr, const KeyCo #define XCLIB_XCOUT_SENTCONVSEL 1 /* sent a request */ #define XCLIB_XCOUT_INCR 2 /* in an incr loop */ #define XCLIB_XCOUT_FALLBACK 3 /* STRING failed, need fallback to UTF8 */ -#define XCLIB_XCOUT_FALLBACK_UTF8 4 /* UTF8 failed, move to compouned */ -#define XCLIB_XCOUT_FALLBACK_COMP 5 /* compouned failed, move to text. */ +#define XCLIB_XCOUT_FALLBACK_UTF8 4 /* UTF8 failed, move to compound. */ +#define XCLIB_XCOUT_FALLBACK_COMP 5 /* compound failed, move to text. */ #define XCLIB_XCOUT_FALLBACK_TEXT 6 /* Retrieves the contents of a selections. */ @@ -2198,30 +2196,30 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const restore_events.push_back(evt); } - /* fallback is needed. set XA_STRING to target and restart the loop. */ + /* Fallback is needed. Set #XA_STRING to target and restart the loop. */ if (context == XCLIB_XCOUT_FALLBACK) { context = XCLIB_XCOUT_NONE; target = m_atom.STRING; continue; } else if (context == XCLIB_XCOUT_FALLBACK_UTF8) { - /* utf8 fail, move to compouned text. */ + /* utf8 fail, move to compound text. */ context = XCLIB_XCOUT_NONE; target = m_atom.COMPOUND_TEXT; continue; } else if (context == XCLIB_XCOUT_FALLBACK_COMP) { - /* compouned text fail, move to text. */ + /* Compound text fail, move to text. */ context = XCLIB_XCOUT_NONE; target = m_atom.TEXT; continue; } else if (context == XCLIB_XCOUT_FALLBACK_TEXT) { - /* text fail, nothing else to try, break. */ + /* Text fail, nothing else to try, break. */ context = XCLIB_XCOUT_NONE; } - /* only continue if xcout() is doing something */ + /* Only continue if #xcout() is doing something. */ if (context == XCLIB_XCOUT_NONE) break; } @@ -2232,9 +2230,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const } if (sel_len) { - /* only print the buffer out, and free it, if it's not - * empty - */ + /* Only print the buffer out, and free it, if it's not empty. */ unsigned char *tmp_data = (unsigned char *)malloc(sel_len + 1); memcpy((char *)tmp_data, (char *)sel_buf, sel_len); tmp_data[sel_len] = '\0'; @@ -2288,28 +2284,28 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const * \{ */ class DialogData { public: - /* Width of the dialog */ + /* Width of the dialog. */ uint width; - /* Heigth of the dialog */ + /* Height of the dialog. */ uint height; - /* Default padding (x direction) between controls and edge of dialog */ + /* Default padding (x direction) between controls and edge of dialog. */ uint padding_x; - /* Default padding (y direction) between controls and edge of dialog */ + /* Default padding (y direction) between controls and edge of dialog. */ uint padding_y; - /* Width of a single button */ + /* Width of a single button. */ uint button_width; - /* Height of a single button */ + /* Height of a single button. */ uint button_height; - /* Inset of a button to its text */ + /* Inset of a button to its text. */ uint button_inset_x; - /* Size of the border of the button */ + /* Size of the border of the button. */ uint button_border_size; /* Height of a line of text */ uint line_height; - /* offset of the text inside the button */ + /* Offset of the text inside the button. */ uint button_text_offset_y; - /* Construct a new DialogData with the default settings */ + /* Construct a new #DialogData with the default settings. */ DialogData() : width(640), height(175), diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index bcebda66ae3..a7e325bc9e1 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -24,7 +24,7 @@ #pragma once -#include <X11/XKBlib.h> /* Allow detectable auto-repeate. */ +#include <X11/XKBlib.h> /* Allow detectable auto-repeat. */ #include <X11/Xlib.h> #include "../GHOST_Types.h" diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index d897fafc003..1f2fed5b823 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -392,7 +392,7 @@ class GHOST_Window : public GHOST_IWindow { /** Stores whether this is a full screen window. */ bool m_fullScreen; - /** Whether to attempt to initialize a context with a stereo framebuffer. */ + /** Whether to attempt to initialize a context with a stereo frame-buffer. */ bool m_wantStereoVisual; /** Full-screen width */ diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 6a084dcca22..18aa19c0863 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -1368,7 +1368,7 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap GHOST_TUns32 fullBitRow, fullMaskRow; int x, y, cols; - cols = sizeX / 8; /* Num of whole bytes per row (width of bm/mask) */ + cols = sizeX / 8; /* Number of whole bytes per row (width of bm/mask). */ if (sizeX % 8) cols++; @@ -1407,7 +1407,7 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap GHOST_TSuccess GHOST_WindowWin32::setProgressBar(float progress) { - /*SetProgressValue sets state to TBPF_NORMAL automaticly*/ + /* #SetProgressValue sets state to #TBPF_NORMAL automatically. */ if (m_Bar && S_OK == m_Bar->SetProgressValue(m_hWnd, 10000 * progress, 10000)) return GHOST_kSuccess; diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index a7e7cdc6602..661d80c02aa 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -573,7 +573,7 @@ class GHOST_WindowWin32 : public GHOST_Window { /** Pointer to system. */ GHOST_SystemWin32 *m_system; - /** Pointer to COM IDropTarget implementor. */ + /** Pointer to COM #IDropTarget implementer. */ GHOST_DropTargetWin32 *m_dropTarget; /** Window handle. */ HWND m_hWnd; @@ -582,14 +582,16 @@ class GHOST_WindowWin32 : public GHOST_Window { /** Flag for if window has captured the mouse. */ bool m_hasMouseCaptured; - /** Flag if an operator grabs the mouse with WM_cursor_grab_enable/ungrab(). - * Multiple grabs must be released with a single ungrab. */ + /** + * Flag if an operator grabs the mouse with #WM_cursor_grab_enable, #WM_cursor_grab_disable + * Multiple grabs must be released with a single un-grab. + */ bool m_hasGrabMouse; /** Count of number of pressed buttons. */ int m_nPressedButtons; /** HCURSOR structure of the custom cursor. */ HCURSOR m_customCursor; - /** Request GL context aith alpha channel. */ + /** Request GL context with alpha channel. */ bool m_wantAlphaBackground; /** ITaskbarList3 structure for progress bar. */ diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 9a38631adb9..86a7246a284 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -1169,7 +1169,7 @@ GHOST_TSuccess GHOST_WindowX11::setOrder(GHOST_TWindowOrder order) XGetWindowAttributes(m_display, m_window, &attr); - /* iconized windows give bad match error */ + /* Minimized windows give bad match error. */ if (attr.map_state == IsViewable) XSetInputFocus(m_display, m_window, RevertToPointerRoot, CurrentTime); XFlush(m_display); diff --git a/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp b/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp index 39b7f0776e1..30a2a238ccd 100644 --- a/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp +++ b/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp @@ -125,7 +125,7 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding { oxr_binding.wgl.hGLRC = ctx_wgl.m_hGLRC; #endif - /* Generate a framebuffer to use for blitting into the texture. */ + /* Generate a frame-buffer to use for blitting into the texture. */ glGenFramebuffers(1, &m_fbo); } diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp index 73b73a8f046..a1fd7fc2781 100644 --- a/intern/ghost/intern/GHOST_XrSession.cpp +++ b/intern/ghost/intern/GHOST_XrSession.cpp @@ -338,7 +338,7 @@ void GHOST_XrSession::endFrameDrawing(std::vector<XrCompositionLayerBaseHeader * void GHOST_XrSession::draw(void *draw_customdata) { std::vector<XrCompositionLayerProjectionView> - projection_layer_views; /* Keep alive until xrEndFrame() call! */ + projection_layer_views; /* Keep alive until #xrEndFrame() call! */ XrCompositionLayerProjection proj_layer; std::vector<XrCompositionLayerBaseHeader *> layers; @@ -354,7 +354,7 @@ void GHOST_XrSession::draw(void *draw_customdata) static void copy_openxr_pose_to_ghost_pose(const XrPosef &oxr_pose, GHOST_XrPose &r_ghost_pose) { - /* Set and convert to Blender coodinate space. */ + /* Set and convert to Blender coordinate space. */ r_ghost_pose.position[0] = oxr_pose.position.x; r_ghost_pose.position[1] = oxr_pose.position.y; r_ghost_pose.position[2] = oxr_pose.position.z; @@ -366,7 +366,7 @@ static void copy_openxr_pose_to_ghost_pose(const XrPosef &oxr_pose, GHOST_XrPose static void ghost_xr_draw_view_info_from_view(const XrView &view, GHOST_XrDrawViewInfo &r_info) { - /* Set and convert to Blender coodinate space. */ + /* Set and convert to Blender coordinate space. */ copy_openxr_pose_to_ghost_pose(view.pose, r_info.eye_pose); r_info.fov.angle_left = view.fov.angleLeft; diff --git a/intern/iksolver/intern/IK_QJacobian.cpp b/intern/iksolver/intern/IK_QJacobian.cpp index 7f77968a5d4..82aaaf7bb9a 100644 --- a/intern/iksolver/intern/IK_QJacobian.cpp +++ b/intern/iksolver/intern/IK_QJacobian.cpp @@ -203,7 +203,7 @@ void IK_QJacobian::InvertSDLS() // singular the least squares inverse tries to minimize |J(dtheta) - dX)| // and doesn't try to minimize dTheta. This results in eratic changes in // angle. The damped least squares minimizes |dtheta| to try and reduce this - // erratic behaviour. + // erratic behavior. // // The selectively damped least squares (SDLS) is used here instead of the // DLS. The SDLS damps individual singular values, instead of using a single @@ -325,7 +325,7 @@ void IK_QJacobian::InvertDLS() // inverse tries to minimize |J(dtheta) - dX)| and doesn't // try to minimize dTheta. This results in eratic changes in angle. // Damped least squares minimizes |dtheta| to try and reduce this - // erratic behaviour. + // erratic behavior. // We don't want to use the damped solution everywhere so we // only increase lamda from zero as we approach a singularity. diff --git a/intern/libmv/libmv/numeric/numeric.h b/intern/libmv/libmv/numeric/numeric.h index 6312b4eb1a6..f5478bee6ab 100644 --- a/intern/libmv/libmv/numeric/numeric.h +++ b/intern/libmv/libmv/numeric/numeric.h @@ -463,7 +463,7 @@ inline bool isnan(double i) { #endif } -/// Ceil function that has the same behaviour for positive +/// Ceil function that has the same behavior for positive /// and negative values template <typename FloatType> FloatType ceil0(const FloatType& value) { diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c index 17cd997f451..b0119f54019 100644 --- a/intern/mikktspace/mikktspace.c +++ b/intern/mikktspace/mikktspace.c @@ -138,7 +138,7 @@ MIKK_INLINE tbool VNotZero(const SVec3 v) // Shift operations in C are only defined for shift values which are // not negative and smaller than sizeof(value) * CHAR_BIT. -// The mask, used with bitwise-and (&), prevents undefined behaviour +// The mask, used with bitwise-and (&), prevents undefined behavior // when the shift count is 0 or >= the width of unsigned int. MIKK_INLINE unsigned int rotl(unsigned int value, unsigned int count) { @@ -1454,12 +1454,12 @@ static void BuildNeighborsFast(STriInfo pTriInfos[], pEdges[f * 3 + i].f = f; // record face number } - // sort over all edges by i0, this is the pricy one. + // sort over all edges by i0, this is the pricey one. QuickSortEdges(pEdges, 0, iNrTrianglesIn * 3 - 1, 0, uSeed); // sort channel 0 which is i0 // sub sort over i1, should be fast. // could replace this with a 64 bit int sort over (i0,i1) - // with i0 as msb in the quicksort call above. + // with i0 as msb in the quick-sort call above. iEntries = iNrTrianglesIn * 3; iCurStartIndex = 0; for (i = 1; i < iEntries; i++) { |