Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2022-01-06 05:54:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2022-01-06 05:54:52 +0300
commit499fec6f79a26c9c9d2d61b90bda2e4cec424f81 (patch)
tree828271035f950a504f11a8bdb3454516835d0800 /source/blender/draw
parentaa363ec2ae9382c052f024284dcdb77ac495c177 (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/eevee/eevee_materials.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h4
-rw-r--r--source/blender/draw/engines/eevee/eevee_screen_raytrace.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h8
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c4
-rw-r--r--source/blender/draw/intern/DRW_render.h2
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc20
-rw-r--r--source/blender/draw/intern/draw_manager.c4
-rw-r--r--source/blender/draw/intern/draw_manager.h2
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc2
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc2
11 files changed, 27 insertions, 25 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index a0522ad94d2..a027a29c813 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -353,7 +353,7 @@ void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
- /* Create Material Ghash */
+ /* Create Material #GHash. */
{
stl->g_data->material_hash = BLI_ghash_ptr_new("Eevee_material ghash");
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index f0d518a58b1..34af8b6c58d 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -192,8 +192,8 @@ enum {
/* Material shader cache keys */
enum {
/* HACK: This assumes the struct GPUShader will never be smaller than our variations.
- * This allow us to only keep one ghash and avoid bigger keys comparisons/hashing.
- * We combine the GPUShader pointer with the key. */
+ * This allow us to only keep one #GHash and avoid bigger keys comparisons/hashing.
+ * We combine the #GPUShader pointer with the key. */
KEY_CULL = (1 << 0),
KEY_REFRACT = (1 << 1),
KEY_HAIR = (1 << 2),
diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
index 17cc1a46e23..0d6bd1f8024 100644
--- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
+++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
@@ -128,7 +128,7 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v
int hitbuf_size[3];
GPU_texture_get_mipmap_size(effects->ssr_hit_output, 0, hitbuf_size);
- /** Screen space raytracing overview
+ /** Screen space ray-tracing overview
*
* Following Frostbite stochastic SSR.
*
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 29a9c0211be..bf5dbac9f68 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -108,7 +108,7 @@ BLI_STATIC_ASSERT_ALIGN(gpLight, 16)
/* *********** Draw Data *********** */
typedef struct GPENCIL_MaterialPool {
- /* Linklist. */
+ /* Single linked-list. */
struct GPENCIL_MaterialPool *next;
/* GPU representation of materials. */
gpMaterial mat_data[GP_MATERIAL_BUFFER_LEN];
@@ -148,7 +148,7 @@ typedef struct GPENCIL_ViewLayerData {
/* *********** GPencil *********** */
typedef struct GPENCIL_tVfx {
- /** Linklist */
+ /** Single linked-list. */
struct GPENCIL_tVfx *next;
DRWPass *vfx_ps;
/* Frame-buffer reference since it may not be allocated yet. */
@@ -156,7 +156,7 @@ typedef struct GPENCIL_tVfx {
} GPENCIL_tVfx;
typedef struct GPENCIL_tLayer {
- /** Linklist */
+ /** Single linked-list. */
struct GPENCIL_tLayer *next;
/** Geometry pass (draw all strokes). */
DRWPass *geom_ps;
@@ -172,7 +172,7 @@ typedef struct GPENCIL_tLayer {
} GPENCIL_tLayer;
typedef struct GPENCIL_tObject {
- /** Linklist */
+ /** Single linked-list. */
struct GPENCIL_tObject *next;
struct {
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index d70633eaa85..c24cab009c7 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -198,7 +198,7 @@ DRWShadingGroup *workbench_material_setup_ex(WORKBENCH_PrivateData *wpd,
}
DRWShadingGroup **grp_mat = NULL;
- /* A hashmap stores material shgroups to pack all similar drawcalls together. */
+ /* A hash-map stores material shgroups to pack all similar drawcalls together. */
if (BLI_ghash_ensure_p(prepass->material_hash, ma, (void ***)&grp_mat)) {
return *grp_mat;
}
@@ -277,7 +277,7 @@ DRWShadingGroup *workbench_image_setup_ex(WORKBENCH_PrivateData *wpd,
WORKBENCH_Prepass *prepass = &wpd->prepass[transp][infront][datatype];
DRWShadingGroup **grp_tex = NULL;
- /* A hashmap stores image shgroups to pack all similar drawcalls together. */
+ /* A hash-map stores image shgroups to pack all similar drawcalls together. */
if (BLI_ghash_ensure_p(prepass->material_hash, tex, (void ***)&grp_tex)) {
return *grp_tex;
}
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index 961aed3f284..6c4744cb104 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -351,7 +351,7 @@ typedef enum {
DRW_STATE_BLEND_ADD_FULL = (2 << 11),
/** Standard alpha blending. */
DRW_STATE_BLEND_ALPHA = (3 << 11),
- /** Use that if color is already premult by alpha. */
+ /** Use that if color is already pre-multiply by alpha. */
DRW_STATE_BLEND_ALPHA_PREMUL = (4 << 11),
DRW_STATE_BLEND_BACKGROUND = (5 << 11),
DRW_STATE_BLEND_OIT = (6 << 11),
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index f8d8674f2a7..06b83a379e4 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -1135,9 +1135,11 @@ static uint get_dispatch_size(uint elements)
return divide_ceil_u(elements, SUBDIV_LOCAL_WORK_GROUP_SIZE);
}
-/* Helper to ensure that the UBO is always initalized before dispatching computes and that the same
- * number of elements that need to be processed is used for the UBO and the dispatch size.
- * Use this instead of a raw call to #GPU_compute_dispatch. */
+/**
+ * Helper to ensure that the UBO is always initialized before dispatching computes and that the
+ * same number of elements that need to be processed is used for the UBO and the dispatch size.
+ * Use this instead of a raw call to #GPU_compute_dispatch.
+ */
static void drw_subdiv_compute_dispatch(const DRWSubdivCache *cache,
GPUShader *shader,
const int src_offset,
@@ -1219,8 +1221,8 @@ void draw_subdiv_extract_pos_nor(const DRWSubdivCache *cache,
drw_subdiv_compute_dispatch(cache, shader, 0, 0, cache->num_subdiv_quads);
- /* This generates a vertex buffer, so we need to put a barrier on the vertex attrib array. We
- * also need it for subsequent compute shaders, so a barrier on the shader storage is also
+ /* This generates a vertex buffer, so we need to put a barrier on the vertex attribute array.
+ * We also need it for subsequent compute shaders, so a barrier on the shader storage is also
* needed. */
GPU_memory_barrier(GPU_BARRIER_SHADER_STORAGE | GPU_BARRIER_VERTEX_ATTRIB_ARRAY);
@@ -1389,8 +1391,8 @@ void draw_subdiv_accumulate_normals(const DRWSubdivCache *cache,
drw_subdiv_compute_dispatch(cache, shader, 0, 0, cache->num_subdiv_verts);
- /* This generates a vertex buffer, so we need to put a barrier on the vertex attrib array. We
- * also need it for subsequent compute shaders, so a barrier on the shader storage is also
+ /* This generates a vertex buffer, so we need to put a barrier on the vertex attribute array.
+ * We also need it for subsequent compute shaders, so a barrier on the shader storage is also
* needed. */
GPU_memory_barrier(GPU_BARRIER_SHADER_STORAGE | GPU_BARRIER_VERTEX_ATTRIB_ARRAY);
@@ -1413,8 +1415,8 @@ void draw_subdiv_finalize_normals(const DRWSubdivCache *cache,
drw_subdiv_compute_dispatch(cache, shader, 0, 0, cache->num_subdiv_quads);
- /* This generates a vertex buffer, so we need to put a barrier on the vertex attrib array. We
- * also need it for subsequent compute shaders, so a barrier on the shader storage is also
+ /* This generates a vertex buffer, so we need to put a barrier on the vertex attribute array.
+ * We also need it for subsequent compute shaders, so a barrier on the shader storage is also
* needed. */
GPU_memory_barrier(GPU_BARRIER_SHADER_STORAGE | GPU_BARRIER_VERTEX_ATTRIB_ARRAY);
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 0bf6468f7cc..94950a1ff94 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1796,12 +1796,12 @@ void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph,
DRW_draw_render_loop_ex(depsgraph, engine_type, region, v3d, render_viewport, NULL);
if (draw_background) {
- /* HACK(fclem): In this case we need to make sure the final alpha is 1.
+ /* HACK(@fclem): In this case we need to make sure the final alpha is 1.
* We use the blend mode to ensure that. A better way to fix that would
* be to do that in the color-management shader. */
GPU_offscreen_bind(ofs, false);
GPU_clear_color(0.0f, 0.0f, 0.0f, 1.0f);
- /* Premult Alpha over black background. */
+ /* Pre-multiply alpha over black background. */
GPU_blend(GPU_BLEND_ALPHA_PREMULT);
}
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index a4924711384..d27eb8be9e0 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -570,7 +570,7 @@ typedef struct DRWManager {
struct Object *dupli_origin;
/** Object-data referenced by the current dupli object. */
struct ID *dupli_origin_data;
- /** Ghash: #DupliKey -> void pointer for each enabled engine. */
+ /** Hash-map: #DupliKey -> void pointer for each enabled engine. */
struct GHash *dupli_ghash;
/** TODO(fclem): try to remove usage of this. */
DRWInstanceData *object_instance_data[MAX_INSTANCE_DATA_SIZE];
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc
index 0ea4ef5d5db..49b23ff1efe 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc
@@ -240,7 +240,7 @@ static void extract_edituv_stretch_angle_init_subdiv(const DRWSubdivCache *subdi
GPUVertBuf *pos_nor = cache->final.buff.vbo.pos_nor;
GPUVertBuf *uvs = cache->final.buff.vbo.uv;
- /* UVs are stored contiguouly so we need to compute the offset in the UVs buffer for the active
+ /* UVs are stored contiguously so we need to compute the offset in the UVs buffer for the active
* UV layer. */
CustomData *cd_ldata = (mr->extract_type == MR_EXTRACT_MESH) ? &mr->me->ldata : &mr->bm->ldata;
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc
index 3b40b3115f5..c116fa5ba07 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc
@@ -152,7 +152,7 @@ static void extract_edituv_stretch_area_init_subdiv(const DRWSubdivCache *subdiv
void *UNUSED(data))
{
- /* Initialise final buffer. */
+ /* Initialize final buffer. */
GPUVertBuf *vbo = static_cast<GPUVertBuf *>(buffer);
static GPUVertFormat format = {0};
if (format.attr_len == 0) {