Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2023-02-02 13:59:21 +11:00
parent 31a6400279
commit 96ea0dd458
10 changed files with 29 additions and 29 deletions

View File

@@ -26,33 +26,33 @@ typedef NodeOperation SocketReader;
class OpenCLDevice : public Device {
private:
/**
* \brief opencl context
* \brief OPENCL context
*/
cl_context context_;
/**
* \brief opencl device
* \brief OPENCL device
*/
cl_device_id device_;
/**
* \brief opencl program
* \brief OPENCL program
*/
cl_program program_;
/**
* \brief opencl command queue
* \brief OPENCL command queue
*/
cl_command_queue queue_;
/**
* \brief opencl vendor ID
* \brief OPENCL vendor ID
*/
cl_int vendor_id_;
public:
/**
* \brief constructor with opencl device
* \brief constructor with OPENCL device
* \param context:
* \param device:
* \param program:

View File

@@ -230,7 +230,7 @@ static void compositor_engine_draw(void *data)
if (GPU_backend_get_type() == GPU_BACKEND_METAL) {
/* NOTE(Metal): Isolate Compositor compute work in individual command buffer to improve
* workload scheduling. When expensive compositor nodes are in the graph, these can stall out
* the GPU for extended periods of time and suboptimally schedule work for execution. */
* the GPU for extended periods of time and sub-optimally schedule work for execution. */
GPU_flush();
}
else {
@@ -241,11 +241,11 @@ static void compositor_engine_draw(void *data)
}
#endif
/* Exceute Compositor render commands. */
/* Execute Compositor render commands. */
compositor_data->instance_data->draw();
#if defined(__APPLE__)
/* NOTE(Metal): Following previous flush to break commmand stream, with compositor command
/* NOTE(Metal): Following previous flush to break command stream, with compositor command
* buffers potentially being heavy, we avoid issuing subsequent commands until compositor work
* has completed. If subsequent work is prematurely queued up, the subsequent command buffers
* will be blocked behind compositor work and may trigger a command buffer time-out error. As a

View File

@@ -644,12 +644,12 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob)
DRW_buffer_add_entry(cb->light_sun, color, &instdata);
}
else if (la->type == LA_SPOT) {
/* Previous implementation was using the clipend distance as cone size.
/* Previous implementation was using the clip-end distance as cone size.
* We cannot do this anymore so we use a fixed size of 10. (see T72871) */
const float3 scale_vec = {10.0f, 10.0f, 10.0f};
rescale_m4(instdata.mat, scale_vec);
/* For cycles and eevee the spot attenuation is
* y = (1/sqrt(1 + x^2) - a)/((1 - a) b)
/* For cycles and EEVEE the spot attenuation is:
* `y = (1/sqrt(1 + x^2) - a)/((1 - a) b)`
* x being the tangent of the angle between the light direction and the generatrix of the cone.
* We solve the case where spot attenuation y = 1 and y = 0
* root for y = 1 is sqrt(1/c^2 - 1)

View File

@@ -1303,8 +1303,8 @@ static bool sculpt_face_set_edit_is_operation_valid(SculptSession *ss,
if (mode == SCULPT_FACE_SET_EDIT_DELETE_GEOMETRY) {
if (BKE_pbvh_type(ss->pbvh) == PBVH_GRIDS) {
/* Modification of base mesh geometry requires special remapping of multires displacement,
* which does not happen here.
/* Modification of base mesh geometry requires special remapping of multi-resolution
* displacement, which does not happen here.
* Disable delete operation. It can be supported in the future by doing similar displacement
* data remapping as what happens in the mesh edit mode. */
return false;
@@ -1318,9 +1318,9 @@ static bool sculpt_face_set_edit_is_operation_valid(SculptSession *ss,
if (ELEM(mode, SCULPT_FACE_SET_EDIT_FAIR_POSITIONS, SCULPT_FACE_SET_EDIT_FAIR_TANGENCY)) {
if (BKE_pbvh_type(ss->pbvh) == PBVH_GRIDS) {
/* TODO: Multires topology representation using grids and duplicates can't be used directly
* by the fair algorithm. Multires topology needs to be exposed in a different way or
* converted to a mesh for this operation. */
/* TODO: Multi-resolution topology representation using grids and duplicates can't be used
* directly by the fair algorithm. Multi-resolution topology needs to be exposed in a
* different way or converted to a mesh for this operation. */
return false;
}
}

View File

@@ -1202,7 +1202,7 @@ bool MTLContext::ensure_uniform_buffer_bindings(
BLI_assert(buffer_index >= 0 && buffer_index < MTL_MAX_BUFFER_BINDINGS);
/* For compute, we must always re-bind the push constant block as other compute
* operations may have assigned reources over the top, outside of the compiled
* operations may have assigned resources over the top, outside of the compiled
* compute shader path. */
/* Bind push constant data. */
BLI_assert(this->pipeline_state.active_shader->get_push_constant_data() != nullptr);

View File

@@ -309,7 +309,7 @@ class MTLSafeFreeList {
* Performs a lockless list insert. */
void insert_buffer(gpu::MTLBuffer *buffer);
/* Whether we need ot start a new safe free list, or can carry on using the existing one. */
/* Whether we need to start a new safe free list, or can carry on using the existing one. */
bool should_flush();
/* Increments command buffer reference count. */

View File

@@ -225,7 +225,7 @@ static void extract_and_replace_clipping_distances(std::string &vertex_source,
continue;
}
/* Extract ID betwen zero and 9. */
/* Extract ID between zero and 9. */
if ((*c >= '0') && (*c <= '9')) {
char clip_distance_id = ((*c) - '0');
auto found = std::find(
@@ -314,9 +314,9 @@ static void replace_matrix_constructors(std::string &str)
/* Replace matrix constructors with GLSL-compatible constructors for Metal.
* Base matrix constructors e.g. mat3x3 do not have as many overload variants as GLSL.
* To add compatibility, we declare custom constuctors e.g. MAT3x3 in mtl_shader_defines.msl.
* To add compatibility, we declare custom constructors e.g. MAT3x3 in `mtl_shader_defines.msl`.
* If the GLSL syntax matches, we map mat3x3(..) -> MAT3x3(..) and implement a custom
* constructor. This supports both mat3(..) and mat3x3(..) style sytax.*/
* constructor. This supports both mat3(..) and mat3x3(..) style syntax. */
char *current_str_begin = &*str.begin();
char *current_str_end = &*str.end();
@@ -335,7 +335,7 @@ static void replace_matrix_constructors(std::string &str)
continue;
}
/* Possible multiple dimensional matrix constructor. Verify if next char is a dim*/
/* Possible multiple dimensional matrix constructor. Verify if next char is a dim. */
c++;
if (*c == 'x') {
c++;
@@ -601,7 +601,7 @@ void extract_shared_memory_blocks(MSLGeneratorInterface &msl_iface,
new_shared_block.type_name = std::string(buf);
/* Read var-name.
* Varname can either come right before the final semi-colon, or
* `varname` can either come right before the final semi-colon, or
* with following array syntax.
* spaces may exist before closing symbol. */
c = c_next_space + 1;
@@ -3017,7 +3017,7 @@ std::string MSLGeneratorInterface::generate_msl_fragment_output_population()
std::string MSLGeneratorInterface::generate_msl_texture_vars(ShaderStage shader_stage)
{
/* NOTE: Shader stage must be a singualr stage index. Compound stage is not valid for this
/* NOTE: Shader stage must be a singular stage index. Compound stage is not valid for this
* function. */
BLI_assert(shader_stage == ShaderStage::VERTEX || shader_stage == ShaderStage::FRAGMENT ||
shader_stage == ShaderStage::COMPUTE);

View File

@@ -54,7 +54,7 @@ typedef struct bScreen {
/** General flags. */
short flag;
/** Winid from WM, starts with 1. */
/** Window-ID from WM, starts with 1. */
short winid;
/** User-setting for which editors get redrawn during animation playback. */
short redraws_flag;

View File

@@ -186,7 +186,7 @@ typedef struct WorkSpaceDataRelation {
/** The value for this parent-data/workspace relation. */
void *value;
/** Reference to the actual parent window, wmWindow->winid. Used in read/write code. */
/** Reference to the actual parent window, #wmWindow.winid. Used in read/write code. */
int parentid;
char _pad_0[4];
} WorkSpaceDataRelation;

View File

@@ -613,7 +613,7 @@ static void wm_keymap_diff(
BLI_addtail(&diff_km->diff_items, kmdi);
}
/* sync expanded flag back to original so we don't lose it on repatch */
/* Sync expanded flag back to original so we don't lose it on re-patch. */
if (to_kmi) {
wmKeyMapItem *orig_kmi = WM_keymap_item_find_id(orig_km, kmi->id);
@@ -1130,7 +1130,7 @@ const char *WM_key_event_string(const short type, const bool compact)
}
it = &rna_enum_event_type_items[i];
/* We first try enum items' description (abused as shortname here),
/* We first try enum items' description (abused as short-name here),
* and fall back to usual name if empty. */
if (compact && it->description[0]) {
/* XXX No context for enum descriptions... In practice shall not be an issue though. */