Cleanup: spelling in comments

This commit is contained in:
2022-01-18 14:27:29 +11:00
parent 20df402adc
commit db496a0b7d
12 changed files with 29 additions and 35 deletions

View File

@@ -227,7 +227,7 @@ TEST(lib_remap, delete_when_remap_to_self_not_allowed)
/** \} */
/* -------------------------------------------------------------------- */
/** \name Userref counting
/** \name User Reference Counting
* \{ */
TEST(lib_remap, users_are_decreased_when_not_skipping_never_null)

View File

@@ -54,7 +54,7 @@ TEST(any, AssignMap)
Any<> c = std::move(a);
/* Test valid state after self assignment. Clang emits `-Wself-assign-overloaded` with `c=c;`.
* And pragma suppression creates warnings on other compilers. */
* And `pragma` suppression creates warnings on other compilers. */
c = static_cast<decltype(a) &>(c);
EXPECT_TRUE(c);
EXPECT_EQ((c.get<Map<int, int>>().lookup(4)), 2);

View File

@@ -856,10 +856,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
if (!ts->uv_selectmode || ts->vgroup_weight == 0.0f) {
ts->selectmode = SCE_SELECT_VERTEX;
/* autokeying - setting should be taken from the user-prefs
* but the userprefs version may not have correct flags set
* (i.e. will result in blank box when enabled)
*/
/* The auto-keying setting should be taken from the user-preferences
* but the user-preferences version may not have correct flags set
* (i.e. will result in blank box when enabled). */
ts->autokey_mode = U.autokey_mode;
if (ts->autokey_mode == 0) {
ts->autokey_mode = 2; /* 'add/replace' but not on */

View File

@@ -569,8 +569,8 @@ void blo_do_versions_userdef(UserDef *userdef)
}
if (!USER_VERSION_ATLEAST(257, 0)) {
/* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs,
* so that it doesn't linger around from old configs like a ghost */
/* Clear #AUTOKEY_FLAG_ONLYKEYINGSET flag from user-preferences,
* so that it doesn't linger around from old configurations like a ghost. */
userdef->autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
}

View File

@@ -89,9 +89,9 @@ void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state,
static const float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
const float draw_width = img_w * scaleX * xzoom;
const float draw_height = img_h * scaleY * yzoom;
/* Downscaling with regular bilinear interpolation (i.e. #GL_LINEAR) doesn't give good filtering
* results. Mipmaps can be used to get better results (i.e. #GL_LINEAR_MIPMAP_LINEAR), so always
* use mipmaps when filtering. */
/* Down-scaling with regular bi-linear interpolation (i.e. #GL_LINEAR) doesn't give good
* filtering results. Mipmaps can be used to get better results (i.e. #GL_LINEAR_MIPMAP_LINEAR),
* so always use mipmaps when filtering. */
const bool use_mipmap = use_filter && ((draw_width < img_w) || (draw_height < img_h));
GPUTexture *tex = GPU_texture_create_2d("immDrawPixels", img_w, img_h, 1, gpu_format, NULL);

View File

@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
* Descriptior type used to define shader structure, resources and interfaces.
* Descriptor type used to define shader structure, resources and interfaces.
*/
#include "BLI_map.hh"
@@ -165,7 +165,7 @@ bool gpu_shader_create_info_compile_all()
return true;
}
/* Runtime create infos are not registered in the dictionnary and cannot be searched. */
/* Runtime create infos are not registered in the dictionary and cannot be searched. */
const GPUShaderCreateInfo *gpu_shader_create_info_get(const char *info_name)
{
ShaderCreateInfo *info = g_create_infos->lookup(info_name);

View File

@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
* Descriptior type used to define shader structure, resources and interfaces.
* Descriptor type used to define shader structure, resources and interfaces.
*
* Some rule of thumb:
* - Do not include anything else than this file in each info file.
@@ -214,9 +214,9 @@ struct StageInterfaceInfo {
struct ShaderCreateInfo {
/** Shader name for debugging. */
StringRefNull name_;
/** True if the shader is static and can be precompiled at compile time. */
/** True if the shader is static and can be pre-compiled at compile time. */
bool do_static_compilation_ = false;
/** If true, all additionaly linked create info will be merged into this one. */
/** If true, all additionally linked create info will be merged into this one. */
bool finalized_ = false;
/**
* Maximum length of all the resource names including each null terminator.
@@ -297,7 +297,7 @@ struct ShaderCreateInfo {
};
/**
* Resources are grouped by frequency of change.
* Pass resources are meants to be valid for the whole pass.
* Pass resources are meant to be valid for the whole pass.
* Batch resources can be changed in a more granular manner (per object/material).
* Mis-usage will only produce suboptimal performance.
*/

View File

@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
* Descriptior type used to define shader structure, resources and interfaces.
* Descriptor type used to define shader structure, resources and interfaces.
*
* Some rule of thumb:
* - Do not include anything else than this file in each descriptor file.

View File

@@ -140,7 +140,7 @@ struct GPUSource {
};
}
/* Returns the final string with all inlcudes done. */
/* Returns the final string with all includes done. */
void build(std::string &str, shader::BuiltinBits &out_builtins)
{
for (auto *dep : dependencies) {

View File

@@ -24,16 +24,16 @@
* We use the same vector and matrix types as Blender C++. Some math functions are defined to use
* the float version to match the GLSL syntax.
* This file can be used for C & C++ code and the syntax used should follow the same rules.
* Some preprocessing is done by the GPU backend to make it GLSL compatible.
* Some preprocessing is done by the GPU back-end to make it GLSL compatible.
*
* IMPORTANT:
* - Don't add trailing comma at the end of the enum. Our custom pre-processor will noy trim it
* - Don't add trailing comma at the end of the enum. Our custom pre-processor will now trim it
* for GLSL.
* - Always use `u` suffix for enum values. GLSL do not support implicit cast.
* - Define all values. This is in order to simplify custom pre-processor code.
* - Always use uint32_t as underlying type.
* - Use float suffix by default for float literals to avoid double promotion in C++.
* - Pack one float or int after a vec3/ivec3 to fullfil alligment rules.
* - Pack one float or int after a vec3/ivec3 to fulfill alignment rules.
*
* NOTE: Due to alignment restriction and buggy drivers, do not try to use mat3 inside structs.
* NOTE: (UBO only) Do not use arrays of float. They are padded to arrays of vec4 and are not worth
@@ -81,7 +81,6 @@
# ifdef __cplusplus
# include "BLI_float4x4.hh"
# include "BLI_float4x4.hh"
# else
typedef float float2[2];
typedef float float3[3];

View File

@@ -1014,7 +1014,7 @@ static void rna_FKeyframe_points_add(ID *id, FCurve *fcu, Main *bmain, int tot)
fcu->totvert += tot;
while (tot--) {
/* defaults, no userprefs gives predictable results for API */
/* Defaults, ignoring user-preference gives predictable results for API. */
bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
bezt->ipo = BEZT_IPO_BEZ;
bezt->h1 = bezt->h2 = HD_AUTO_ANIM;

View File

@@ -121,8 +121,7 @@ class TextureMarginMap {
void rasterize_tri(float *v1, float *v2, float *v3, uint32_t value, char *mask)
{
/* NOTE: This is not thread safe, because the value to be written by the rasterizer is
* a class member. If this is ever made multithreaded each therad needs to get it's own.
*/
* a class member. If this is ever made multi-threaded each thread needs to get it's own. */
value_to_store_ = value;
mask_ = mask;
zspan_scanconvert(
@@ -323,8 +322,7 @@ class TextureMarginMap {
/* Find which edge of the src_poly is closest to x,y. Look up it's adjacent UV-edge and polygon.
* Then return the location of the equivalent pixel in the other polygon.
* Returns true if a new pixel location was found, false if it wasn't, which can happen if the
* margin pixel is on a corner, or the UV-edge doesnt have an adjacent polygon.
*/
* margin pixel is on a corner, or the UV-edge doesn't have an adjacent polygon. */
bool lookup_pixel(
float x, float y, int src_poly, float *r_destx, float *r_desty, int *r_other_poly)
{
@@ -386,7 +384,7 @@ class TextureMarginMap {
return false;
}
/* Get the 'other' edge. I.E. the UV edge from the neighbour polygon. */
/* Get the 'other' edge. I.E. the UV edge from the neighbor polygon. */
int other_edge = loop_adjacency_map_[found_edge];
if (other_edge < 0) {
@@ -407,7 +405,7 @@ class TextureMarginMap {
float2 other_edgepoint1 = uv_to_xy(mloopuv_[other_edge]);
float2 other_edgepoint2 = uv_to_xy(mloopuv_[other_edge2]);
/* Calculate the vector from the oder edges last point to it's first point. */
/* Calculate the vector from the order edges last point to it's first point. */
float2 other_ab = other_edgepoint1 - other_edgepoint2;
float2 other_reflect_point = other_edgepoint2 + (found_t * other_ab);
float2 perpendicular_other_ab;
@@ -486,9 +484,8 @@ static void generate_margin(ImBuf *ibuf,
TextureMarginMap map(ibuf->x, ibuf->y, mpoly, mloop, mloopuv, totpoly, totloop, totedge);
bool draw_new_mask = false;
/* Now the map contains 3 sorts of values: 0xFFFFFFFF for empty pixels, 0x80000000 + polyindex
* for margin pixels, just polyindex for poly pixels.
*/
/* Now the map contains 3 sorts of values: 0xFFFFFFFF for empty pixels, `0x80000000 + polyindex`
* for margin pixels, just `polyindex` for poly pixels. */
if (mask) {
mask = (char *)MEM_dupallocN(mask);
}
@@ -525,8 +522,7 @@ static void generate_margin(ImBuf *ibuf,
map.grow_dijkstra(margin);
/* Looking further than 3 polygons away leads to so much cumulative rounding
* that it isn't worth it. So hardcode it to 3.
*/
* that it isn't worth it. So hard-code it to 3. */
map.lookup_pixels(ibuf, mask, 3);
/* Use the extend filter to fill in the missing pixels at the corners, not strictly correct, but