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>2021-02-05 08:23:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-05 08:23:34 +0300
commit17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch)
tree8a164422f7eb7d3aa9f7473c19c80da535c29a05 /source/blender/gpu
parentb62b923f544fa1df0aecd56f3568dd5185601306 (diff)
Cleanup: correct spelling in comments
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_batch.h2
-rw-r--r--source/blender/gpu/GPU_framebuffer.h6
-rw-r--r--source/blender/gpu/GPU_index_buffer.h2
-rw-r--r--source/blender/gpu/GPU_shader.h2
-rw-r--r--source/blender/gpu/GPU_state.h4
-rw-r--r--source/blender/gpu/GPU_texture.h6
-rw-r--r--source/blender/gpu/GPU_vertex_buffer.h2
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c2
-rw-r--r--source/blender/gpu/intern/gpu_context_private.hh2
-rw-r--r--source/blender/gpu/intern/gpu_drawlist_private.hh2
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.cc2
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_immediate_private.hh8
-rw-r--r--source/blender/gpu/intern/gpu_index_buffer_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_node_graph.c2
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c2
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc2
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.hh4
-rw-r--r--source/blender/gpu/intern/gpu_shader_private.hh2
-rw-r--r--source/blender/gpu/intern/gpu_state_private.hh6
-rw-r--r--source/blender/gpu/intern/gpu_texture_private.hh8
-rw-r--r--source/blender/gpu/intern/gpu_uniform_buffer_private.hh2
-rw-r--r--source/blender/gpu/intern/gpu_vertex_buffer_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_vertex_format.cc6
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c10
-rw-r--r--source/blender/gpu/opengl/gl_backend.cc6
-rw-r--r--source/blender/gpu/opengl/gl_batch.hh4
-rw-r--r--source/blender/gpu/opengl/gl_context.cc4
-rw-r--r--source/blender/gpu/opengl/gl_context.hh4
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc2
-rw-r--r--source/blender/gpu/opengl/gl_framebuffer.hh12
-rw-r--r--source/blender/gpu/opengl/gl_primitive.hh2
-rw-r--r--source/blender/gpu/opengl/gl_shader_interface.cc6
-rw-r--r--source/blender/gpu/opengl/gl_state.hh2
-rw-r--r--source/blender/gpu/opengl/gl_texture.cc2
35 files changed, 70 insertions, 70 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h
index 85981ac8043..be418c15060 100644
--- a/source/blender/gpu/GPU_batch.h
+++ b/source/blender/gpu/GPU_batch.h
@@ -84,7 +84,7 @@ typedef struct GPUBatch {
GPUVertBuf *inst[GPU_BATCH_INST_VBO_MAX_LEN];
/** NULL if element list not needed */
GPUIndexBuf *elem;
- /** Bookeeping. */
+ /** Bookkeeping. */
eGPUBatchFlag flag;
/** Type of geometry to draw. */
GPUPrimType prim_type;
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index c0f91756bf6..8c6592adf6d 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * GPU Framebuffer
+ * GPU Frame-buffer
* - this is a wrapper for an OpenGL framebuffer object (FBO). in practice
* multiple FBO's may be created.
* - actual FBO creation & config is deferred until GPU_framebuffer_bind or
@@ -79,7 +79,7 @@ GPUFrameBuffer *GPU_framebuffer_back_get(void);
} \
} while (0)
-/* Framebuffer setup : You need to call GPU_framebuffer_bind for these
+/* Frame-buffer setup: You need to call #GPU_framebuffer_bind for these
* to be effective. */
void GPU_framebuffer_texture_attach_ex(GPUFrameBuffer *gpu_fb, GPUAttachment attachment, int slot);
@@ -154,7 +154,7 @@ void GPU_framebuffer_texture_layer_attach(
void GPU_framebuffer_texture_cubeface_attach(
GPUFrameBuffer *fb, GPUTexture *tex, int slot, int face, int mip);
-/* Framebuffer operations */
+/* Frame-buffer operations. */
void GPU_framebuffer_viewport_set(GPUFrameBuffer *fb, int x, int y, int w, int h);
void GPU_framebuffer_viewport_get(GPUFrameBuffer *fb, int r_viewport[4]);
diff --git a/source/blender/gpu/GPU_index_buffer.h b/source/blender/gpu/GPU_index_buffer.h
index 0c71dd539a6..76aab3c196b 100644
--- a/source/blender/gpu/GPU_index_buffer.h
+++ b/source/blender/gpu/GPU_index_buffer.h
@@ -70,7 +70,7 @@ void GPU_indexbuf_set_tri_restart(GPUIndexBufBuilder *builder, uint elem);
GPUIndexBuf *GPU_indexbuf_build(GPUIndexBufBuilder *);
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *);
-/* Create a subrange of an existing indexbuffer. */
+/* Create a sub-range of an existing index-buffer. */
GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uint length);
void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem,
GPUIndexBuf *elem_src,
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 55716b584c3..9824c7016dc 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -29,7 +29,7 @@ extern "C" {
struct GPUVertBuf;
-/** Opaque type hidding blender::gpu::Shader */
+/** Opaque type hiding #blender::gpu::Shader */
typedef struct GPUShader GPUShader;
typedef enum eGPUShaderTFBType {
diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h
index f5a1ccbc40b..0687f271670 100644
--- a/source/blender/gpu/GPU_state.h
+++ b/source/blender/gpu/GPU_state.h
@@ -46,7 +46,7 @@ ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_TEXTURE_FETCH)
/**
* Defines the fixed pipeline blending equation.
* SRC is the output color from the shader.
- * DST is the color from the framebuffer.
+ * DST is the color from the frame-buffer.
* The blending equation is :
* (SRC * A) + (DST * B).
* The blend mode will modify the A and B parameters.
@@ -64,7 +64,7 @@ typedef enum eGPUBlend {
* NOTE: Does not modify alpha. */
GPU_BLEND_INVERT,
/** Order independent transparency.
- * NOTE: Cannot be used as is. Needs special setup (framebuffer, shader ...). */
+ * NOTE: Cannot be used as is. Needs special setup (frame-buffer, shader ...). */
GPU_BLEND_OIT,
/** Special blend to add color under and multiply dst color by src alpha. */
GPU_BLEND_BACKGROUND,
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 91119bd05a1..da2d2639440 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -77,12 +77,12 @@ void GPU_samplers_update(void);
*/
/* Wrapper to supported OpenGL/Vulkan texture internal storage
- * If you need a type just uncomment it. Be aware that some formats
- * are not supported by renderbuffers. All of the following formats
+ * If you need a type just un-comment it. Be aware that some formats
+ * are not supported by render-buffers. All of the following formats
* are part of the OpenGL 3.3 core
* specification. */
typedef enum eGPUTextureFormat {
- /* Formats texture & renderbuffer */
+ /* Formats texture & render-buffer. */
GPU_RGBA8UI,
GPU_RGBA8I,
GPU_RGBA8,
diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
index eeaebd3fae5..aae58de533b 100644
--- a/source/blender/gpu/GPU_vertex_buffer.h
+++ b/source/blender/gpu/GPU_vertex_buffer.h
@@ -34,7 +34,7 @@ typedef enum {
GPU_VERTBUF_INVALID = 0,
/** Was init with a vertex format. */
GPU_VERTBUF_INIT = (1 << 0),
- /** Data has been touched and need to be reuploaded. */
+ /** Data has been touched and need to be re-uploaded. */
GPU_VERTBUF_DATA_DIRTY = (1 << 1),
/** The buffer has been created inside GPU memory. */
GPU_VERTBUF_DATA_UPLOADED = (1 << 2),
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 84da95f6fee..a2072e504fd 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -109,7 +109,7 @@ static GPUPass *gpu_pass_cache_resolve_collision(GPUPass *pass,
uint32_t hash)
{
BLI_spin_lock(&pass_cache_spin);
- /* Collision, need to strcmp the whole shader. */
+ /* Collision, need to `strcmp` the whole shader. */
for (; pass && (pass->hash == hash); pass = pass->next) {
if ((defs != NULL) && (!STREQ(pass->defines, defs))) { /* Pass */
}
diff --git a/source/blender/gpu/intern/gpu_context_private.hh b/source/blender/gpu/intern/gpu_context_private.hh
index ffa7a38faa6..82753b44c51 100644
--- a/source/blender/gpu/intern/gpu_context_private.hh
+++ b/source/blender/gpu/intern/gpu_context_private.hh
@@ -93,7 +93,7 @@ class Context {
bool is_active_on_thread(void);
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUContext *wrap(Context *ctx)
{
return reinterpret_cast<GPUContext *>(ctx);
diff --git a/source/blender/gpu/intern/gpu_drawlist_private.hh b/source/blender/gpu/intern/gpu_drawlist_private.hh
index 98603299d62..393307e6ee5 100644
--- a/source/blender/gpu/intern/gpu_drawlist_private.hh
+++ b/source/blender/gpu/intern/gpu_drawlist_private.hh
@@ -42,7 +42,7 @@ class DrawList {
virtual void submit() = 0;
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUDrawList *wrap(DrawList *vert)
{
return reinterpret_cast<GPUDrawList *>(vert);
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index d5d7994a154..2e183f52eea 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -359,7 +359,7 @@ void GPU_framebuffer_viewport_reset(GPUFrameBuffer *gpu_fb)
unwrap(gpu_fb)->viewport_reset();
}
-/* ---------- Framebuffer Operations ----------- */
+/* ---------- Frame-buffer Operations ----------- */
void GPU_framebuffer_clear(GPUFrameBuffer *gpu_fb,
eGPUFrameBufferBits buffers,
diff --git a/source/blender/gpu/intern/gpu_framebuffer_private.hh b/source/blender/gpu/intern/gpu_framebuffer_private.hh
index 7afa56bfe3d..32c13cf13ff 100644
--- a/source/blender/gpu/intern/gpu_framebuffer_private.hh
+++ b/source/blender/gpu/intern/gpu_framebuffer_private.hh
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * GPU Framebuffer
+ * GPU Frame-buffer
* - this is a wrapper for an OpenGL framebuffer object (FBO). in practice
* multiple FBO's may be created.
* - actual FBO creation & config is deferred until GPU_framebuffer_bind or
@@ -210,7 +210,7 @@ class FrameBuffer {
};
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUFrameBuffer *wrap(FrameBuffer *vert)
{
return reinterpret_cast<GPUFrameBuffer *>(vert);
diff --git a/source/blender/gpu/intern/gpu_immediate_private.hh b/source/blender/gpu/intern/gpu_immediate_private.hh
index 9fcbe2bdc0b..98399897ea9 100644
--- a/source/blender/gpu/intern/gpu_immediate_private.hh
+++ b/source/blender/gpu/intern/gpu_immediate_private.hh
@@ -34,7 +34,7 @@ namespace blender::gpu {
class Immediate {
public:
- /** Pointer to the mapped buffer data for the currect vertex. */
+ /** Pointer to the mapped buffer data for the current vertex. */
uchar *vertex_data = NULL;
/** Current vertex index. */
uint vertex_idx = 0;
@@ -49,10 +49,10 @@ class Immediate {
GPUPrimType prim_type = GPU_PRIM_NONE;
GPUVertFormat vertex_format = {};
GPUShader *shader = NULL;
- /** Enforce strict vertex count (disabled when using immBeginAtMost). */
+ /** Enforce strict vertex count (disabled when using #immBeginAtMost). */
bool strict_vertex_len = true;
- /** Batch in construction when using immBeginBatch. */
+ /** Batch in construction when using #immBeginBatch. */
GPUBatch *batch = NULL;
/** Wide Line workaround. */
@@ -61,7 +61,7 @@ class Immediate {
GPUShader *prev_shader = NULL;
/** Builtin shader index. Used to test if the workaround can be done. */
eGPUBuiltinShader builtin_shader_bound = GPU_SHADER_TEXT;
- /** Uniform color: Kept here to update the wideline shader just before immBegin. */
+ /** Uniform color: Kept here to update the wide-line shader just before #immBegin. */
float uniform_color[4];
public:
diff --git a/source/blender/gpu/intern/gpu_index_buffer_private.hh b/source/blender/gpu/intern/gpu_index_buffer_private.hh
index 7054360d07f..2405db8664a 100644
--- a/source/blender/gpu/intern/gpu_index_buffer_private.hh
+++ b/source/blender/gpu/intern/gpu_index_buffer_private.hh
@@ -57,7 +57,7 @@ class IndexBuf {
uint32_t index_len_ = 0;
/** Base index: Added to all indices after fetching. Allows index compression. */
uint32_t index_base_ = 0;
- /** Bookeeping. */
+ /** Bookkeeping. */
bool is_init_ = false;
/** Is this object only a reference to a subrange of another IndexBuf. */
bool is_subrange_ = false;
@@ -96,7 +96,7 @@ class IndexBuf {
inline uint index_range(uint *r_min, uint *r_max);
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUIndexBuf *wrap(IndexBuf *indexbuf)
{
return reinterpret_cast<GPUIndexBuf *>(indexbuf);
diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c
index 08da49c3475..bf91a5bbb4d 100644
--- a/source/blender/gpu/intern/gpu_node_graph.c
+++ b/source/blender/gpu/intern/gpu_node_graph.c
@@ -132,7 +132,7 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const eGPUType
case GPU_NODE_LINK_ATTR:
input->source = GPU_SOURCE_ATTR;
input->attr = link->attr;
- /* Failsafe handling if the same attribute is used with different datatypes for
+ /* Fail-safe handling if the same attribute is used with different data-types for
* some reason (only really makes sense with float/vec2/vec3/vec4 though). This
* can happen if mixing the generic Attribute node with specialized ones. */
CLAMP_MIN(input->attr->gputype, type);
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c
index 66748b4146a..6cda7888712 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -269,7 +269,7 @@ typedef struct GPUPickState {
ListBase bufs;
} cache;
- /* Pickign methods */
+ /* Picking methods. */
union {
/* GPU_SELECT_PICK_ALL */
struct {
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index d47ad5e0100..97673e92bcf 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -106,7 +106,7 @@ void Shader::print_log(Span<const char *> sources, char *log, const char *stage,
error_line = error_char = -1;
if (log_line[0] >= '0' && log_line[0] <= '9') {
error_line = (int)strtol(log_line, &error_line_number_end, 10);
- /* Try to fetch the error caracter (not always available). */
+ /* Try to fetch the error character (not always available). */
if (ELEM(error_line_number_end[0], '(', ':') && error_line_number_end[1] != ' ') {
error_char = (int)strtol(error_line_number_end + 1, &log_line, 10);
}
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh
index 62513ffb8a7..942be84caae 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.hh
+++ b/source/blender/gpu/intern/gpu_shader_interface.hh
@@ -41,7 +41,7 @@ typedef struct ShaderInput {
uint32_t name_offset;
uint32_t name_hash;
int32_t location;
- /** Defined at interface creation or in shader. Only for Samplers, UBOs and Vertex Attribs. */
+ /** Defined at interface creation or in shader. Only for Samplers, UBOs and Vertex Attributes. */
int32_t binding;
} ShaderInput;
@@ -226,7 +226,7 @@ inline const ShaderInput *ShaderInterface::input_lookup(const ShaderInput *const
for (int i = inputs_len - 1; i >= 0; i--) {
if (inputs[i].name_hash == name_hash) {
if ((i > 0) && UNLIKELY(inputs[i - 1].name_hash == name_hash)) {
- /* Hash colision resolve. */
+ /* Hash collision resolve. */
for (; i >= 0 && inputs[i].name_hash == name_hash; i--) {
if (STREQ(name, name_buffer_ + inputs[i].name_offset)) {
return inputs + i; /* not found */
diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh
index 85427372559..d9327bbc0f4 100644
--- a/source/blender/gpu/intern/gpu_shader_private.hh
+++ b/source/blender/gpu/intern/gpu_shader_private.hh
@@ -76,7 +76,7 @@ class Shader {
void print_log(Span<const char *> sources, char *log, const char *stage, const bool error);
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUShader *wrap(Shader *vert)
{
return reinterpret_cast<GPUShader *>(vert);
diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh
index cda1b591bb1..b79350a6506 100644
--- a/source/blender/gpu/intern/gpu_state_private.hh
+++ b/source/blender/gpu/intern/gpu_state_private.hh
@@ -101,16 +101,16 @@ union GPUStateMutable {
/** Positive if using program point size. */
/* TODO(fclem): should be passed as uniform to all shaders. */
float point_size;
- /** Not supported on every platform. Prefer using wideline shader. */
+ /** Not supported on every platform. Prefer using wide-line shader. */
float line_width;
/** Mutable stencil states. */
uint8_t stencil_write_mask;
uint8_t stencil_compare_mask;
uint8_t stencil_reference;
uint8_t _pad0;
- /* IMPORTANT: ensure x64 stuct alignment. */
+ /* IMPORTANT: ensure x64 struct alignment. */
};
- /* Here to allow fast bitwise ops. */
+ /* Here to allow fast bit-wise ops. */
uint64_t data[9];
};
diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh
index 4197d5c55fc..400a36559da 100644
--- a/source/blender/gpu/intern/gpu_texture_private.hh
+++ b/source/blender/gpu/intern/gpu_texture_private.hh
@@ -83,11 +83,11 @@ class Texture {
protected:
/* ---- Texture format (immutable after init). ---- */
- /** Width & Height & Depth. For cubemap arrays, d is number of facelayers. */
+ /** Width & Height & Depth. For cube-map arrays, d is number of face-layers. */
int w_, h_, d_;
/** Internal data format. */
eGPUTextureFormat format_;
- /** Format caracteristics. */
+ /** Format characteristics. */
eGPUTextureFormatFlag format_flag_;
/** Texture type. */
eGPUTextureType type_;
@@ -101,7 +101,7 @@ class Texture {
/** For debugging */
char name_[DEBUG_NAME_LEN];
- /** Framebuffer references to update on deletion. */
+ /** Frame-buffer references to update on deletion. */
GPUAttachmentType fb_attachment_[GPU_TEX_MAX_FBO_ATTACHED];
FrameBuffer *fb_[GPU_TEX_MAX_FBO_ATTACHED];
@@ -245,7 +245,7 @@ class Texture {
virtual bool init_internal(GPUVertBuf *vbo) = 0;
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUTexture *wrap(Texture *vert)
{
return reinterpret_cast<GPUTexture *>(vert);
diff --git a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
index 826bdd9f8d5..e8fc1343eaf 100644
--- a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
+++ b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
@@ -65,7 +65,7 @@ class UniformBuf {
}
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUUniformBuf *wrap(UniformBuf *vert)
{
return reinterpret_cast<GPUUniformBuf *>(vert);
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh
index da8b02c5c66..67a09f6f83c 100644
--- a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh
+++ b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh
@@ -62,7 +62,7 @@ class VertBuf {
void init(const GPUVertFormat *format, GPUUsageType usage);
void clear(void);
- /* Data manament */
+ /* Data management. */
void allocate(uint vert_len);
void resize(uint vert_len);
void upload(void);
@@ -105,7 +105,7 @@ class VertBuf {
virtual void duplicate_data(VertBuf *dst) = 0;
};
-/* Syntacting suggar. */
+/* Syntactic sugar. */
static inline GPUVertBuf *wrap(VertBuf *vert)
{
return reinterpret_cast<GPUVertBuf *>(vert);
diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc
index 625ad604b7c..8498da11507 100644
--- a/source/blender/gpu/intern/gpu_vertex_format.cc
+++ b/source/blender/gpu/intern/gpu_vertex_format.cc
@@ -105,7 +105,7 @@ uint vertex_buffer_size(const GPUVertFormat *format, uint vertex_len)
static uchar copy_attr_name(GPUVertFormat *format, const char *name)
{
- /* strncpy does 110% of what we need; let's do exactly 100% */
+ /* `strncpy` does 110% of what we need; let's do exactly 100% */
uchar name_offset = format->name_offset;
char *name_copy = format->names + name_offset;
uint available = GPU_VERT_ATTR_NAMES_BUF_LEN - name_offset;
@@ -162,7 +162,7 @@ uint GPU_vertformat_attr_add(GPUVertFormat *format,
assert(comp_len != 8 && comp_len != 12 && comp_len != 16);
}
#endif
- format->name_len++; /* multiname support */
+ format->name_len++; /* Multi-name support. */
const uint attr_id = format->attr_len++;
GPUVertAttr *attr = &format->attrs[attr_id];
@@ -186,7 +186,7 @@ void GPU_vertformat_alias_add(GPUVertFormat *format, const char *alias)
assert(format->name_len < GPU_VERT_FORMAT_MAX_NAMES); /* there's room for more */
assert(attr->name_len < GPU_VERT_ATTR_MAX_NAMES);
#endif
- format->name_len++; /* multiname support */
+ format->name_len++; /* Multi-name support. */
attr->names[attr->name_len++] = copy_attr_name(format, alias);
}
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 205ba1d06d6..c118145ebd6 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -86,10 +86,10 @@ struct GPUViewport {
int size[2];
int flag;
- /* Set the active view (for stereoscoptic viewport rendering). */
+ /* Set the active view (for stereoscopic viewport rendering). */
int active_view;
- /* If engine_handles mismatch we free all ViewportEngineData in this viewport. */
+ /* If engine_handles mismatch we free all #ViewportEngineData in this viewport. */
struct {
void *handle;
ViewportEngineData *data;
@@ -589,7 +589,7 @@ void GPU_viewport_colorspace_set(GPUViewport *viewport,
/* Restore. */
view_settings->curve_mapping = tmp_curve_mapping;
viewport->view_settings.curve_mapping = tmp_curve_mapping_vp;
- /* Only copy curvemapping if needed. Avoid uneeded OCIO cache miss. */
+ /* Only copy curve-mapping if needed. Avoid unneeded OCIO cache miss. */
if (tmp_curve_mapping && viewport->view_settings.curve_mapping == NULL) {
BKE_color_managed_view_settings_free(&viewport->view_settings);
viewport->view_settings.curve_mapping = BKE_curvemapping_copy(tmp_curve_mapping);
@@ -820,7 +820,7 @@ void GPU_viewport_draw_to_screen_ex(GPUViewport *viewport,
const float w = (float)GPU_texture_width(color);
const float h = (float)GPU_texture_height(color);
- /* We allow rects with min/max swapped, but we also need coorectly assigned coordinates. */
+ /* We allow rects with min/max swapped, but we also need correctly assigned coordinates. */
rcti sanitized_rect = *rect;
BLI_rcti_sanitize(&sanitized_rect);
@@ -974,7 +974,7 @@ static void gpu_viewport_passes_free(PassList *psl, int psl_len)
memset(psl->passes, 0, sizeof(*psl->passes) * psl_len);
}
-/* Must be executed inside Drawmanager Opengl Context. */
+/* Must be executed inside Draw-manager OpenGL Context. */
void GPU_viewport_free(GPUViewport *viewport)
{
gpu_viewport_engines_data_free(viewport);
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc
index 573ae654af4..a1b7aba1140 100644
--- a/source/blender/gpu/opengl/gl_backend.cc
+++ b/source/blender/gpu/opengl/gl_backend.cc
@@ -367,14 +367,14 @@ static void detect_workarounds()
}
}
- /* Some Intel drivers have issues with using mips as framebuffer targets if
- * GL_TEXTURE_MAX_LEVEL is higher than the target mip.
+ /* Some Intel drivers have issues with using mips as frame-buffer targets if
+ * GL_TEXTURE_MAX_LEVEL is higher than the target MIP.
* Only check at the end after all other workarounds because this uses the drawing code.
* Also after device/driver flags to avoid the check that causes pre GCN Radeon to crash. */
if (GCaps.mip_render_workaround == false) {
GCaps.mip_render_workaround = detect_mip_render_workaround();
}
- /* Disable multidraw if the base instance cannot be read. */
+ /* Disable multi-draw if the base instance cannot be read. */
if (GLContext::shader_draw_parameters_support == false) {
GLContext::multi_draw_indirect_support = false;
}
diff --git a/source/blender/gpu/opengl/gl_batch.hh b/source/blender/gpu/opengl/gl_batch.hh
index 0fadde7a70d..218b9ffe4b7 100644
--- a/source/blender/gpu/opengl/gl_batch.hh
+++ b/source/blender/gpu/opengl/gl_batch.hh
@@ -52,9 +52,9 @@ class GLVaoCache {
GLContext *context_ = NULL;
/** Last interface this batch was drawn with. */
GLShaderInterface *interface_ = NULL;
- /** Cached vao for the last interface. */
+ /** Cached VAO for the last interface. */
GLuint vao_id_ = 0;
- /** Used whend arb_base_instance is not supported. */
+ /** Used when arb_base_instance is not supported. */
GLuint vao_base_instance_ = 0;
int base_instance_ = 0;
diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc
index d766e6f0828..6c9c6e10774 100644
--- a/source/blender/gpu/opengl/gl_context.cc
+++ b/source/blender/gpu/opengl/gl_context.cc
@@ -108,7 +108,7 @@ GLContext::~GLContext()
BLI_assert(orphaned_vertarrays_.is_empty());
/* For now don't allow GPUFrameBuffers to be reuse in another context. */
BLI_assert(framebuffers_.is_empty());
- /* Delete vaos so the batch can be reused in another context. */
+ /* Delete VAO's so the batch can be reused in another context. */
for (GLVaoCache *cache : vao_caches_) {
cache->clear();
}
@@ -312,7 +312,7 @@ void GLContext::memory_statistics_get(int *r_total_mem, int *r_free_mem)
{
/* TODO(merwin): use Apple's platform API to get this info. */
if (GLEW_NVX_gpu_memory_info) {
- /* Teturned value in Kb. */
+ /* Returned value in Kb. */
glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, r_total_mem);
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, r_free_mem);
}
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh
index 66a3fdd3355..b8d979e8f0e 100644
--- a/source/blender/gpu/opengl/gl_context.hh
+++ b/source/blender/gpu/opengl/gl_context.hh
@@ -87,7 +87,7 @@ class GLContext : public Context {
private:
/**
- * GPUBatch & GPUFramebuffer have references to the context they are from, in the case the
+ * #GPUBatch & #GPUFramebuffer have references to the context they are from, in the case the
* context is destroyed, we need to remove any reference to it.
*/
Set<GLVaoCache *> vao_caches_;
@@ -97,7 +97,7 @@ class GLContext : public Context {
/** VertexArrays and framebuffers are not shared across context. */
Vector<GLuint> orphaned_vertarrays_;
Vector<GLuint> orphaned_framebuffers_;
- /** GLBackend onws this data. */
+ /** #GLBackend owns this data. */
GLSharedOrphanLists &shared_orphan_list_;
public:
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 0914c117241..ac42a950945 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -363,7 +363,7 @@ namespace blender::gpu {
void GLContext::debug_group_begin(const char *name, int index)
{
if ((G.debug & G_DEBUG_GPU) && (GLEW_VERSION_4_3 || GLEW_KHR_debug)) {
- /* Add 10 to avoid conlision with other indices from other possible callback layers. */
+ /* Add 10 to avoid collision with other indices from other possible callback layers. */
index += 10;
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, index, -1, name);
}
diff --git a/source/blender/gpu/opengl/gl_framebuffer.hh b/source/blender/gpu/opengl/gl_framebuffer.hh
index 95e67f5973c..7b2c73d7042 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.hh
+++ b/source/blender/gpu/opengl/gl_framebuffer.hh
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * Encapsulation of Framebuffer states (attached textures, viewport, scissors).
+ * Encapsulation of Frame-buffer states (attached textures, viewport, scissors).
*/
#pragma once
@@ -45,22 +45,22 @@ class GLFrameBuffer : public FrameBuffer {
private:
/** OpenGL handle. */
GLuint fbo_id_ = 0;
- /** Context the handle is from. Framebuffers are not shared accros contexts. */
+ /** Context the handle is from. Frame-buffers are not shared across contexts. */
GLContext *context_ = NULL;
/** State Manager of the same contexts. */
GLStateManager *state_manager_ = NULL;
/** Copy of the GL state. Contains ONLY color attachments enums for slot binding. */
GLenum gl_attachments_[GPU_FB_MAX_COLOR_ATTACHMENT];
- /** Internal framebuffers are immutable. */
+ /** Internal frame-buffers are immutable. */
bool immutable_;
- /** True is the framebuffer has its first color target using the GPU_SRGB8_A8 format. */
+ /** True is the frame-buffer has its first color target using the GPU_SRGB8_A8 format. */
bool srgb_;
- /** True is the framebuffer has been bound using the GL_FRAMEBUFFER_SRGB feature. */
+ /** True is the frame-buffer has been bound using the GL_FRAMEBUFFER_SRGB feature. */
bool enabled_srgb_ = false;
public:
/**
- * Create a conventional framebuffer to attach texture to.
+ * Create a conventional frame-buffer to attach texture to.
*/
GLFrameBuffer(const char *name);
diff --git a/source/blender/gpu/opengl/gl_primitive.hh b/source/blender/gpu/opengl/gl_primitive.hh
index 7cd0654bc2c..05a15017c66 100644
--- a/source/blender/gpu/opengl/gl_primitive.hh
+++ b/source/blender/gpu/opengl/gl_primitive.hh
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * Encapsulation of Framebuffer states (attached textures, viewport, scissors).
+ * Encapsulation of Frame-buffer states (attached textures, viewport, scissors).
*/
#pragma once
diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc
index 9533639b133..5870c645bf4 100644
--- a/source/blender/gpu/opengl/gl_shader_interface.cc
+++ b/source/blender/gpu/opengl/gl_shader_interface.cc
@@ -51,7 +51,7 @@ static inline int sampler_binding(int32_t program,
int32_t uniform_location,
int *sampler_len)
{
- /* Identify sampler uniforms and asign sampler units to them. */
+ /* Identify sampler uniforms and assign sampler units to them. */
GLint type;
glGetActiveUniformsiv(program, 1, &uniform_index, GL_UNIFORM_TYPE, &type);
@@ -106,7 +106,7 @@ static inline int image_binding(int32_t program,
int32_t uniform_location,
int *image_len)
{
- /* Identify image uniforms and asign image units to them. */
+ /* Identify image uniforms and assign image units to them. */
GLint type;
glGetActiveUniformsiv(program, 1, &uniform_index, GL_UNIFORM_TYPE, &type);
@@ -133,7 +133,7 @@ static inline int image_binding(int32_t program,
GLShaderInterface::GLShaderInterface(GLuint program)
{
- /* Necessary to make glUniform works. */
+ /* Necessary to make #glUniform works. */
glUseProgram(program);
GLint max_attr_name_len = 0, attr_len = 0;
diff --git a/source/blender/gpu/opengl/gl_state.hh b/source/blender/gpu/opengl/gl_state.hh
index 643e46acc2d..651c3c22afa 100644
--- a/source/blender/gpu/opengl/gl_state.hh
+++ b/source/blender/gpu/opengl/gl_state.hh
@@ -42,7 +42,7 @@ class GLTexture;
*/
class GLStateManager : public StateManager {
public:
- /** Anothter reference to the active framebuffer. */
+ /** Another reference to the active frame-buffer. */
GLFrameBuffer *active_fb = nullptr;
private:
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index 2e8d9dd6e1c..ef38e964c7b 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -32,7 +32,7 @@
#include "gl_backend.hh"
#include "gl_debug.hh"
#include "gl_state.hh"
-#include "gpu_vertex_buffer_private.hh" /* TODO shoud be gl_vertex_buffer.hh */
+#include "gpu_vertex_buffer_private.hh" /* TODO should be `gl_vertex_buffer.hh` */
#include "gl_texture.hh"