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-06-26 14:35:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-26 14:50:48 +0300
commitf1e49038543cf75766f4a220f62cdc6cdbc0e27d (patch)
tree0cec2c64739a6a4ca246fe26bed6fe629ea315cb /source/blender/gpu
parentfae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff)
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_viewport.h14
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c4
-rw-r--r--source/blender/gpu/intern/gpu_select_sample_query.cc8
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc2
-rw-r--r--source/blender/gpu/intern/gpu_vertex_format.cc2
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c2
-rw-r--r--source/blender/gpu/opengl/gl_texture.hh2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl4
8 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h
index d6c544764fb..8b2a14a1a96 100644
--- a/source/blender/gpu/GPU_viewport.h
+++ b/source/blender/gpu/GPU_viewport.h
@@ -43,7 +43,7 @@ typedef struct GPUViewport GPUViewport;
struct GPUFrameBuffer;
-/* Contains memory pools information */
+/* Contains memory pools information. */
typedef struct ViewportMemoryPool {
struct BLI_memblock *commands;
struct BLI_memblock *commands_small;
@@ -62,7 +62,7 @@ typedef struct ViewportMemoryPool {
uint ubo_len;
} ViewportMemoryPool;
-/*eAll FramebufferLists are just the same pointers with different names */
+/* All FramebufferLists are just the same pointers with different names. */
typedef struct FramebufferList {
struct GPUFrameBuffer *framebuffers[1];
} FramebufferList;
@@ -76,7 +76,7 @@ typedef struct PassList {
} PassList;
typedef struct StorageList {
- void *storage[1]; /* custom structs from the engine */
+ void *storage[1]; /* Custom structs from the engine. */
} StorageList;
typedef struct ViewportEngineData {
@@ -90,10 +90,10 @@ typedef struct ViewportEngineData {
TextureList *txl_stereo;
StorageList *stl_stereo;
- /* we may want to put this elsewhere */
+ /* We may want to put this elsewhere. */
struct DRWTextStore *text_draw_cache;
- /* Profiling data */
+ /* Profiling data. */
double init_time;
double render_time;
double background_time;
@@ -141,7 +141,7 @@ void GPU_viewport_size_get(const GPUViewport *viewport, int size[2]);
void GPU_viewport_size_set(GPUViewport *viewport, const int size[2]);
void GPU_viewport_active_view_set(GPUViewport *viewport, int view);
-/* Profiling */
+/* Profiling. */
double *GPU_viewport_cache_time_get(GPUViewport *viewport);
void GPU_viewport_tag_update(GPUViewport *viewport);
@@ -149,7 +149,7 @@ bool GPU_viewport_do_update(GPUViewport *viewport);
GPUTexture *GPU_viewport_color_texture(GPUViewport *viewport, int view);
-/* Texture pool */
+/* Texture pool. */
GPUTexture *GPU_viewport_texture_pool_query(
GPUViewport *viewport, void *engine, int width, int height, int format);
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c
index 3f9da50a2eb..7fb704c29dd 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -55,7 +55,7 @@
* SubRectStride
*/
-/* For looping over a sub-region of a rect, could be moved into 'rct.c'*/
+/* For looping over a sub-region of a rect, could be moved into 'rct.c'. */
typedef struct SubRectStride {
uint start; /* start here */
uint span; /* read these */
@@ -230,7 +230,7 @@ typedef struct GPUPickState {
/* cache on initialization */
uint (*buffer)[4];
- /* buffer size (stores number of integers, for actual size multiply by sizeof integer)*/
+ /* Buffer size (stores number of integers, for actual size multiply by sizeof integer). */
uint bufsize;
/* mode of operation */
char mode;
diff --git a/source/blender/gpu/intern/gpu_select_sample_query.cc b/source/blender/gpu/intern/gpu_select_sample_query.cc
index 5d8689c0d6a..fc755568687 100644
--- a/source/blender/gpu/intern/gpu_select_sample_query.cc
+++ b/source/blender/gpu/intern/gpu_select_sample_query.cc
@@ -48,17 +48,17 @@ using namespace blender;
using namespace blender::gpu;
struct GPUSelectQueryState {
- /* Tracks whether a query has been issued so that gpu_load_id can end the previous one */
+ /* Tracks whether a query has been issued so that gpu_load_id can end the previous one. */
bool query_issued;
/* GPU queries abstraction. Contains an array of queries. */
QueryPool *queries;
/* Array holding the id corresponding id to each query. */
Vector<uint> *ids;
- /* cache on initialization */
+ /* Cache on initialization. */
uint (*buffer)[4];
- /* buffer size (stores number of integers, for actual size multiply by sizeof integer)*/
+ /* Buffer size (stores number of integers, for actual size multiply by sizeof integer). */
uint bufsize;
- /* mode of operation */
+ /* Mode of operation. */
char mode;
uint index;
int oldhits;
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc
index 997064e82a2..de5a9f95b65 100644
--- a/source/blender/gpu/intern/gpu_texture.cc
+++ b/source/blender/gpu/intern/gpu_texture.cc
@@ -400,7 +400,7 @@ void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void
}
/* Makes data interpretation aware of the source layout.
- * Skipping pixels correctly when changing rows when doing partial update.*/
+ * Skipping pixels correctly when changing rows when doing partial update. */
void GPU_unpack_row_length_set(uint len)
{
Context::get()->state_manager->texture_unpack_row_length_set(len);
diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc
index d36a6761cfc..78a119bcec8 100644
--- a/source/blender/gpu/intern/gpu_vertex_format.cc
+++ b/source/blender/gpu/intern/gpu_vertex_format.cc
@@ -284,7 +284,7 @@ void GPU_vertformat_safe_attr_name(const char *attr_name, char *r_safe_name, uin
data[i] = attr_name[i];
}
/* We use a hash to identify each data layer based on its name.
- * NOTE: This is still prone to hash collision but the risks are very low.*/
+ * NOTE: This is still prone to hash collision but the risks are very low. */
/* Start hashing after the first 2 chars. */
*(uint *)&data[4] = BLI_ghashutil_strhash_p_murmur(attr_name + 4);
}
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index c118145ebd6..ddf31b6ffa7 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -284,7 +284,7 @@ static void gpu_viewport_engines_data_free(GPUViewport *viewport)
MEM_freeN(data);
- /* Mark as unused*/
+ /* Mark as unused. */
viewport->engine_data[i].handle = NULL;
}
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh
index 9da27056269..dc048ea05c0 100644
--- a/source/blender/gpu/opengl/gl_texture.hh
+++ b/source/blender/gpu/opengl/gl_texture.hh
@@ -44,7 +44,7 @@ class GLTexture : public Texture {
/** All samplers states. */
static GLuint samplers_[GPU_SAMPLER_MAX];
- /** Target to bind the texture to (GL_TEXTURE_1D, GL_TEXTURE_2D, etc...)*/
+ /** Target to bind the texture to (#GL_TEXTURE_1D, #GL_TEXTURE_2D, etc...). */
GLenum target_ = -1;
/** opengl identifier for texture. */
GLuint tex_id_ = 0;
diff --git a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl
index da6e6502e62..b937323f62a 100644
--- a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl
@@ -170,7 +170,7 @@ void main(void)
length_b = finalThickness[2];
}
- /* generate the start endcap (alpha < 0 used as endcap flag)*/
+ /* Generate the start end-cap (alpha < 0 used as end-cap flag). */
float extend = (fill_stroke > 0) ? 2 : 1;
if ((caps_start != GPENCIL_FLATCAP) && is_equal(P0, P2)) {
mTexCoord = vec2(1, 0.5);
@@ -211,7 +211,7 @@ void main(void)
gl_Position = vec4((sp2 - length_b * miter_b) / Viewport, getZdepth(P2), 1.0);
EmitVertex();
- /* generate the end endcap (alpha < 0 used as endcap flag)*/
+ /* Generate the end end-cap (alpha < 0 used as end-cap flag). */
if ((caps_end != GPENCIL_FLATCAP) && is_equal(P1, P3)) {
mTexCoord = vec2(0, 1);
mColor = vec4(finalColor[2].rgb, finalColor[2].a * -1.0);