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:
Diffstat (limited to 'source/blender/gpu/intern')
-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
18 files changed, 36 insertions, 36 deletions
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);