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/opengl
parentb62b923f544fa1df0aecd56f3568dd5185601306 (diff)
Cleanup: correct spelling in comments
Diffstat (limited to 'source/blender/gpu/opengl')
-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
10 files changed, 22 insertions, 22 deletions
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"