From 17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 5 Feb 2021 16:23:34 +1100 Subject: Cleanup: correct spelling in comments --- intern/cycles/app/cycles_cubin_cc.cpp | 2 +- intern/cycles/blender/blender_particles.cpp | 2 +- intern/cycles/blender/blender_session.h | 2 +- intern/cycles/blender/blender_sync.cpp | 2 +- intern/cycles/bvh/bvh_build.cpp | 4 ++-- intern/cycles/device/cuda/device_cuda_impl.cpp | 2 +- intern/cycles/device/device_multi.cpp | 2 +- intern/cycles/device/device_network.h | 2 +- intern/cycles/device/opencl/device_opencl.h | 6 +++--- intern/cycles/device/opencl/device_opencl_impl.cpp | 2 +- intern/cycles/kernel/bvh/bvh_types.h | 2 +- intern/cycles/kernel/closure/bsdf_microfacet.h | 2 +- intern/cycles/kernel/filter/filter_transform_gpu.h | 4 ++-- intern/cycles/kernel/filter/filter_transform_sse.h | 2 +- intern/cycles/kernel/geom/geom_object.h | 4 ++-- intern/cycles/kernel/kernel_bake.h | 2 +- intern/cycles/kernel/kernel_film.h | 4 ++-- intern/cycles/kernel/kernel_jitter.h | 4 ++-- intern/cycles/kernel/kernel_path_branched.h | 2 +- intern/cycles/kernel/kernel_random.h | 2 +- intern/cycles/kernel/kernel_types.h | 4 ++-- intern/cycles/kernel/osl/osl_services.cpp | 2 +- intern/cycles/kernel/osl/osl_shader.cpp | 2 +- intern/cycles/kernel/shaders/node_image_texture.osl | 2 +- intern/cycles/kernel/split/kernel_branched.h | 2 +- intern/cycles/kernel/split/kernel_do_volume.h | 2 +- intern/cycles/kernel/split/kernel_enqueue_inactive.h | 2 +- intern/cycles/kernel/split/kernel_shader_setup.h | 2 +- intern/cycles/kernel/svm/svm_hsv.h | 4 ++-- intern/cycles/kernel/svm/svm_image.h | 2 +- intern/cycles/kernel/svm/svm_noise.h | 4 ++-- intern/cycles/kernel/svm/svm_types.h | 4 ++-- intern/cycles/render/alembic.cpp | 6 +++--- intern/cycles/render/alembic.h | 2 +- intern/cycles/render/buffers.cpp | 2 +- intern/cycles/render/camera.cpp | 6 +++--- intern/cycles/render/colorspace.cpp | 2 +- intern/cycles/render/denoising.cpp | 2 +- intern/cycles/render/geometry.cpp | 4 ++-- intern/cycles/render/graph.cpp | 2 +- intern/cycles/render/image.cpp | 2 +- intern/cycles/render/light.cpp | 2 +- intern/cycles/render/merge.cpp | 6 +++--- intern/cycles/render/nodes.h | 2 +- intern/cycles/render/osl.cpp | 4 ++-- intern/cycles/render/scene.h | 2 +- intern/cycles/subd/subd_split.cpp | 4 ++-- intern/cycles/subd/subd_split.h | 2 +- intern/cycles/util/util_math.h | 6 +++--- intern/cycles/util/util_math_fast.h | 4 ++-- intern/cycles/util/util_math_matrix.h | 2 +- intern/cycles/util/util_md5.h | 2 +- intern/cycles/util/util_stack_allocator.h | 2 +- intern/cycles/util/util_string.h | 4 ++-- 54 files changed, 78 insertions(+), 78 deletions(-) (limited to 'intern/cycles') 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 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 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 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(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(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(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 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 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 class ccl_try_align(16) StackAllocator return size_t(-1); } - /* Rebind to other ype of allocator. */ + /* Rebind to other type of allocator. */ template struct rebind { typedef StackAllocator 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 -- cgit v1.2.3