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>2020-09-19 07:32:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-19 07:34:32 +0300
commit17a2820da8ad8ea23d336129f32e060e5746b047 (patch)
tree21f965c6f2d15a53fc67cd6dcad1a3a2a09df833 /source/blender/gpu
parenta78130c6101517c09eed14215087ab3dfe36bc5c (diff)
Cleanup: consistent TODO/FIXME formatting for names
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_batch.h4
-rw-r--r--source/blender/gpu/intern/gpu_batch.cc2
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c4
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.cc6
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc2
-rw-r--r--source/blender/gpu/intern/gpu_query.cc2
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc2
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.cc2
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.hh2
-rw-r--r--source/blender/gpu/intern/gpu_state.cc2
-rw-r--r--source/blender/gpu/intern/gpu_state_private.hh6
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc2
-rw-r--r--source/blender/gpu/intern/gpu_texture_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c2
-rw-r--r--source/blender/gpu/opengl/gl_batch.cc6
-rw-r--r--source/blender/gpu/opengl/gl_framebuffer.cc2
-rw-r--r--source/blender/gpu/opengl/gl_query.hh4
-rw-r--r--source/blender/gpu/opengl/gl_shader.cc2
-rw-r--r--source/blender/gpu/opengl/gl_texture.cc6
-rw-r--r--source/blender/gpu/opengl/gl_texture.hh4
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl2
21 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h
index 23a004c3ef6..6fc2f646831 100644
--- a/source/blender/gpu/GPU_batch.h
+++ b/source/blender/gpu/GPU_batch.h
@@ -75,7 +75,7 @@ extern "C" {
/**
* IMPORTANT: Do not allocate manually as the real struct is bigger (i.e: GLBatch). This is only
* the common and "public" part of the struct. Use the provided allocator.
- * TODO(fclem) Make the content of this struct hidden and expose getters/setters.
+ * TODO(fclem): Make the content of this struct hidden and expose getters/setters.
**/
typedef struct GPUBatch {
/** verts[0] is required, others can be NULL */
@@ -128,7 +128,7 @@ void GPU_batch_program_set_builtin_with_config(GPUBatch *batch,
eGPUShaderConfig sh_cfg);
/* Will only work after setting the batch program. */
-/* TODO(fclem) Theses needs to be replaced by GPU_shader_uniform_* with explicit shader. */
+/* TODO(fclem): Theses needs to be replaced by GPU_shader_uniform_* with explicit shader. */
#define GPU_batch_uniform_1i(batch, name, x) GPU_shader_uniform_1i((batch)->shader, name, x);
#define GPU_batch_uniform_1b(batch, name, x) GPU_shader_uniform_1b((batch)->shader, name, x);
#define GPU_batch_uniform_1f(batch, name, x) GPU_shader_uniform_1f((batch)->shader, name, x);
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc
index 1f873570f4a..511ddd210af 100644
--- a/source/blender/gpu/intern/gpu_batch.cc
+++ b/source/blender/gpu/intern/gpu_batch.cc
@@ -216,7 +216,7 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *batch, GPUVertBuf *verts, bool own_vbo)
/* -------------------------------------------------------------------- */
/** \name Uniform setters
*
- * TODO(fclem) port this to GPUShader.
+ * TODO(fclem): port this to GPUShader.
* \{ */
void GPU_batch_set_shader(GPUBatch *batch, GPUShader *shader)
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index f10fd8cd137..2d76e793fc0 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -421,7 +421,7 @@ static void codegen_call_functions(DynStr *ds, GPUNodeGraph *graph, GPUOutput *f
ds, input->link->output->type, input->type, "tmp", input->link->output->id);
}
else if (input->source == GPU_SOURCE_BUILTIN) {
- /* TODO(fclem) get rid of that. */
+ /* TODO(fclem): get rid of that. */
if (input->builtin == GPU_INVERSE_VIEW_MATRIX) {
BLI_dynstr_append(ds, "viewinv");
}
@@ -527,7 +527,7 @@ static char *code_generate_fragment(GPUMaterial *material,
if (builtins & GPU_BARYCENTRIC_TEXCO) {
BLI_dynstr_append(ds, " vec2 barytexco = barycentric_resolve(barycentricTexCo);\n");
}
- /* TODO(fclem) get rid of that. */
+ /* TODO(fclem): get rid of that. */
if (builtins & GPU_VIEW_MATRIX) {
BLI_dynstr_append(ds, " #define viewmat ViewMatrix\n");
}
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index 88779dead28..8d9a1301be0 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -112,7 +112,7 @@ void FrameBuffer::attachment_set(GPUAttachmentType type, const GPUAttachment &ne
return; /* Exact same texture already bound here. */
}
/* Unbind previous and bind new. */
- /* TODO(fclem) cleanup the casts. */
+ /* TODO(fclem): cleanup the casts. */
if (attachment.tex) {
reinterpret_cast<Texture *>(attachment.tex)->detach_from(this);
}
@@ -411,7 +411,7 @@ void GPU_framebuffer_read_color(GPUFrameBuffer *gpu_fb,
unwrap(gpu_fb)->read(GPU_COLOR_BIT, format, rect, channels, slot, data);
}
-/* TODO(fclem) rename to read_color. */
+/* TODO(fclem): rename to read_color. */
void GPU_frontbuffer_read_pixels(
int x, int y, int w, int h, int channels, eGPUDataFormat format, void *data)
{
@@ -420,7 +420,7 @@ void GPU_frontbuffer_read_pixels(
}
/* read_slot and write_slot are only used for color buffers. */
-/* TODO(fclem) port as texture operation. */
+/* TODO(fclem): port as texture operation. */
void GPU_framebuffer_blit(GPUFrameBuffer *gpufb_read,
int read_slot,
GPUFrameBuffer *gpufb_write,
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index 38d206ec3ad..44c6cac02ca 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -170,7 +170,7 @@ static void wide_line_workaround_start(GPUPrimType prim_type)
immUnbindProgram();
- /* TODO(fclem) Don't use geometry shader and use quad instancing with double load. */
+ /* TODO(fclem): Don't use geometry shader and use quad instancing with double load. */
// GPU_vertformat_multiload_enable(imm->vertex_format, 2);
immBindBuiltinProgram(polyline_sh);
diff --git a/source/blender/gpu/intern/gpu_query.cc b/source/blender/gpu/intern/gpu_query.cc
index ad9b6d21420..610215fbe91 100644
--- a/source/blender/gpu/intern/gpu_query.cc
+++ b/source/blender/gpu/intern/gpu_query.cc
@@ -25,4 +25,4 @@
using namespace blender::gpu;
-/* TODO(fclem) Make the associated C-API to use inside DRW profiler. */
+/* TODO(fclem): Make the associated C-API to use inside DRW profiler. */
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index 1bd076f96f8..05c81c2efeb 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -487,7 +487,7 @@ void GPU_shader_unbind(void)
/* -------------------------------------------------------------------- */
/** \name Transform feedback
*
- * TODO(fclem) Should be replaced by compute shaders.
+ * TODO(fclem): Should be replaced by compute shaders.
* \{ */
bool GPU_shader_transform_feedback_enable(GPUShader *shader, GPUVertBuf *vertbuf)
diff --git a/source/blender/gpu/intern/gpu_shader_interface.cc b/source/blender/gpu/intern/gpu_shader_interface.cc
index dc59dca9f78..4a7c7bc15a3 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.cc
+++ b/source/blender/gpu/intern/gpu_shader_interface.cc
@@ -34,7 +34,7 @@ namespace blender::gpu {
ShaderInterface::ShaderInterface(void)
{
- /* TODO(fclem) add unique ID for debugging. */
+ /* TODO(fclem): add unique ID for debugging. */
}
ShaderInterface::~ShaderInterface(void)
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh
index fce6fda5f14..622f1ebb782 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.hh
+++ b/source/blender/gpu/intern/gpu_shader_interface.hh
@@ -50,7 +50,7 @@ typedef struct ShaderInput {
* Base class which is then specialized for each implementation (GL, VK, ...).
**/
class ShaderInterface {
- /* TODO(fclem) should be protected. */
+ /* TODO(fclem): should be protected. */
public:
/** Flat array. In this order: Attributes, Ubos, Uniforms. */
ShaderInput *inputs_ = NULL;
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc
index 9621aeeda7c..44ad9cc9a84 100644
--- a/source/blender/gpu/intern/gpu_state.cc
+++ b/source/blender/gpu/intern/gpu_state.cc
@@ -292,7 +292,7 @@ bool GPU_depth_mask_get(void)
bool GPU_mipmap_enabled(void)
{
- /* TODO(fclem) this used to be a userdef option. */
+ /* TODO(fclem): this used to be a userdef option. */
return true;
}
diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh
index 149a1ece186..d93556a1058 100644
--- a/source/blender/gpu/intern/gpu_state_private.hh
+++ b/source/blender/gpu/intern/gpu_state_private.hh
@@ -56,9 +56,9 @@ union GPUState {
uint32_t invert_facing : 1;
uint32_t shadow_bias : 1;
/** Number of clip distances enabled. */
- /* TODO(fclem) This should be a shader property. */
+ /* TODO(fclem): This should be a shader property. */
uint32_t clip_distances : 3;
- /* TODO(fclem) remove, old opengl features. */
+ /* TODO(fclem): remove, old opengl features. */
uint32_t polygon_smooth : 1;
uint32_t line_smooth : 1;
};
@@ -99,7 +99,7 @@ union GPUStateMutable {
/** TODO remove */
float depth_range[2];
/** Positive if using program point size. */
- /* TODO(fclem) should be passed as uniform to all shaders. */
+ /* TODO(fclem): should be passed as uniform to all shaders. */
float point_size;
/** Not supported on every platform. Prefer using wideline shader. */
float line_width;
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc
index f7f29c7cece..99d286c3abd 100644
--- a/source/blender/gpu/intern/gpu_texture.cc
+++ b/source/blender/gpu/intern/gpu_texture.cc
@@ -186,7 +186,7 @@ using namespace blender::gpu;
uint GPU_texture_memory_usage_get(void)
{
- /* TODO(fclem) Do that inside the new Texture class. */
+ /* TODO(fclem): Do that inside the new Texture class. */
return 0;
}
diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh
index 04156632c5e..d4efebbaf95 100644
--- a/source/blender/gpu/intern/gpu_texture_private.hh
+++ b/source/blender/gpu/intern/gpu_texture_private.hh
@@ -93,7 +93,7 @@ class Texture {
eGPUTextureType type_;
/** Number of mipmaps this texture has (Max miplvl). */
- /* TODO(fclem) Should become immutable and the need for mipmaps should be specified upfront. */
+ /* TODO(fclem): Should become immutable and the need for mipmaps should be specified upfront. */
int mipmaps_ = -1;
/** For error checking */
int mip_min_ = 0, mip_max_ = 0;
@@ -130,7 +130,7 @@ class Texture {
virtual void update_sub(
int mip, int offset[3], int extent[3], eGPUDataFormat format, const void *data) = 0;
- /* TODO(fclem) Legacy. Should be removed at some point. */
+ /* TODO(fclem): Legacy. Should be removed at some point. */
virtual uint gl_bindcode_get(void) const = 0;
int width_get(void) const
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 4a2ab30d74f..9063c8bdbce 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -112,7 +112,7 @@ struct GPUViewport {
ColorManagedDisplaySettings display_settings;
CurveMapping *orig_curve_mapping;
float dither;
- /* TODO(fclem) the uvimage display use the viewport but do not set any view transform for the
+ /* TODO(fclem): the uvimage display use the viewport but do not set any view transform for the
* moment. The end goal would be to let the GPUViewport do the color management. */
bool do_color_management;
struct GPUViewportBatch batch;
diff --git a/source/blender/gpu/opengl/gl_batch.cc b/source/blender/gpu/opengl/gl_batch.cc
index ca627775e1f..6f36f128d18 100644
--- a/source/blender/gpu/opengl/gl_batch.cc
+++ b/source/blender/gpu/opengl/gl_batch.cc
@@ -46,8 +46,8 @@ using namespace blender::gpu;
/* -------------------------------------------------------------------- */
/** \name Vao cache
*
- * Each GLBatch has a small cache of VAO objects that are used to avoid VAO reconfiguration.
- * TODO(fclem) Could be revisited to avoid so much cross references.
+ * Each #GLBatch has a small cache of VAO objects that are used to avoid VAO reconfiguration.
+ * TODO(fclem): Could be revisited to avoid so much cross references.
* \{ */
GLVaoCache::GLVaoCache(void)
@@ -166,7 +166,7 @@ void GLVaoCache::clear(void)
glDeleteVertexArrays(1, &vao_base_instance_);
}
else {
- /* TODO(fclem) Slow way. Could avoid multiple mutex lock here */
+ /* TODO(fclem): Slow way. Could avoid multiple mutex lock here */
for (int i = 0; i < count; i++) {
context_->vao_free(vaos[i]);
}
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index 1578c5fa619..6b9d97530f9 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -405,7 +405,7 @@ void GLFrameBuffer::clear_multi(const float (*clear_cols)[4])
{
/* WATCH: This can easily access clear_cols out of bounds it clear_cols is not big enough for
* all attachments.
- * TODO(fclem) fix this insecurity? */
+ * TODO(fclem): fix this insecurity? */
int type = GPU_FB_COLOR_ATTACHMENT0;
for (int i = 0; type < GPU_FB_MAX_ATTACHMENT; i++, type++) {
if (attachments_[type].tex != NULL) {
diff --git a/source/blender/gpu/opengl/gl_query.hh b/source/blender/gpu/opengl/gl_query.hh
index fc54c0ee1dd..b4f971f45ee 100644
--- a/source/blender/gpu/opengl/gl_query.hh
+++ b/source/blender/gpu/opengl/gl_query.hh
@@ -59,11 +59,11 @@ class GLQueryPool : public QueryPool {
static inline GLenum to_gl(GPUQueryType type)
{
if (type == GPU_QUERY_OCCLUSION) {
- /* TODO(fclem) try with GL_ANY_SAMPLES_PASSED​. */
+ /* TODO(fclem): try with GL_ANY_SAMPLES_PASSED​. */
return GL_SAMPLES_PASSED;
}
BLI_assert(0);
return GL_SAMPLES_PASSED;
}
-} // namespace blender::gpu \ No newline at end of file
+} // namespace blender::gpu
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc
index 47bb8ed1bd7..9af9bf96503 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -219,7 +219,7 @@ void GLShader::unbind(void)
/* -------------------------------------------------------------------- */
/** \name Transform feedback
*
- * TODO(fclem) Should be replaced by compute shaders.
+ * TODO(fclem): Should be replaced by compute shaders.
* \{ */
/* Should be called before linking. */
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index ef4b2d1d4d3..111af76f958 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -446,7 +446,7 @@ struct GPUFrameBuffer *GLTexture::framebuffer_get(void)
return framebuffer_;
}
BLI_assert(!(type_ & (GPU_TEXTURE_ARRAY | GPU_TEXTURE_CUBE | GPU_TEXTURE_1D | GPU_TEXTURE_3D)));
- /* TODO(fclem) cleanup this. Don't use GPU object but blender::gpu ones. */
+ /* TODO(fclem): cleanup this. Don't use GPU object but blender::gpu ones. */
GPUTexture *gputex = reinterpret_cast<GPUTexture *>(static_cast<Texture *>(this));
framebuffer_ = GPU_framebuffer_create(name_);
GPU_framebuffer_texture_attach(framebuffer_, gputex, 0, 0);
@@ -550,7 +550,7 @@ void GLTexture::samplers_free(void)
* \{ */
/* NOTE: This only checks if this mipmap is valid / supported.
- * TODO(fclem) make the check cover the whole mipmap chain. */
+ * TODO(fclem): make the check cover the whole mipmap chain. */
bool GLTexture::proxy_check(int mip)
{
/* Manual validation first, since some implementation have issues with proxy creation. */
@@ -678,7 +678,7 @@ void GLTexture::check_feedback_loop(void)
}
}
-/* TODO(fclem) Legacy. Should be removed at some point. */
+/* TODO(fclem): Legacy. Should be removed at some point. */
uint GLTexture::gl_bindcode_get(void) const
{
return tex_id_;
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh
index 13e546eb879..02e9bee3475 100644
--- a/source/blender/gpu/opengl/gl_texture.hh
+++ b/source/blender/gpu/opengl/gl_texture.hh
@@ -59,7 +59,7 @@ class GLTexture : public Texture {
/** Legacy workaround for texture copy. Created when using framebuffer_get(). */
struct GPUFrameBuffer *framebuffer_ = NULL;
/** True if this texture is bound to at least one texture unit. */
- /* TODO(fclem) How do we ensure thread safety here? */
+ /* TODO(fclem): How do we ensure thread safety here? */
bool is_bound_ = false;
public:
@@ -78,7 +78,7 @@ class GLTexture : public Texture {
void check_feedback_loop(void);
- /* TODO(fclem) Legacy. Should be removed at some point. */
+ /* TODO(fclem): Legacy. Should be removed at some point. */
uint gl_bindcode_get(void) const override;
static void samplers_init(void);
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl
index b6b955dcdb4..4b5ed172081 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl
@@ -7,7 +7,7 @@ void node_vector_displacement_tangent(vec4 vector,
mat4 viewmat,
out vec3 result)
{
- /* TODO(fclem) this is broken. revisit latter. */
+ /* TODO(fclem): this is broken. revisit latter. */
vec3 N_object = normalize(((vec4(normal, 0.0) * viewmat) * obmat).xyz);
vec3 T_object = normalize(((vec4(tangent.xyz, 0.0) * viewmat) * obmat).xyz);
vec3 B_object = tangent.w * normalize(cross(N_object, T_object));