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/intern
parentaa363ec2ae9382c052f024284dcdb77ac495c177 (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/draw/intern')
-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
6 files changed, 17 insertions, 15 deletions
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) {