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>2019-04-21 06:44:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-21 07:27:35 +0300
commit93c19a5a2cf58b75aa3072ce79de5e5d571f3d55 (patch)
tree832c780931025206ac043340e9b39af6d804e425 /source/blender/draw
parent9d72efe108cb5819d07e524f311f613d002d3b61 (diff)
Cleanup: comments (mainly long lines)
Comments after code can cause awkward line breaks.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c97
-rw-r--r--source/blender/draw/intern/draw_manager.h17
-rw-r--r--source/blender/draw/intern/draw_manager_exec.c6
3 files changed, 76 insertions, 44 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 9ebd9542ef5..33cb2e87dc7 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -92,38 +92,64 @@ typedef struct EEVEE_LightBake {
struct Main *bmain;
EEVEE_ViewLayerData *sldata;
- LightProbe **probe; /* Current probe being rendered. */
- GPUTexture *rt_color; /* Target cube color texture. */
- GPUTexture *rt_depth; /* Target cube depth texture. */
- GPUFrameBuffer *rt_fb[6]; /* Target cube framebuffers. */
- GPUFrameBuffer *store_fb; /* Storage framebuffer. */
- int rt_res; /* Cube render target resolution. */
+ /** Current probe being rendered. */
+ LightProbe **probe;
+ /** Target cube color texture. */
+ GPUTexture *rt_color;
+ /** Target cube depth texture. */
+ GPUTexture *rt_depth;
+ /** Target cube framebuffers. */
+ GPUFrameBuffer *rt_fb[6];
+ /** Storage framebuffer. */
+ GPUFrameBuffer *store_fb;
+ /** Cube render target resolution. */
+ int rt_res;
/* Shared */
- int layer; /* Target layer to store the data to. */
- float samples_ct, invsamples_ct; /* Sample count for the convolution. */
- float lod_factor; /* Sampling bias during convolution step. */
- float lod_max; /* Max cubemap LOD to sample when convolving. */
- int cube_len, grid_len; /* Number of probes to render + world probe. */
+ /** Target layer to store the data to. */
+ int layer;
+ /** Sample count for the convolution. */
+ float samples_ct, invsamples_ct;
+ /** Sampling bias during convolution step. */
+ float lod_factor;
+ /** Max cubemap LOD to sample when convolving. */
+ float lod_max;
+ /** Number of probes to render + world probe. */
+ int cube_len, grid_len;
/* Irradiance grid */
- EEVEE_LightGrid *grid; /* Current probe being rendered (UBO data). */
- int irr_cube_res; /* Target cubemap at MIP 0. */
- int irr_size[3]; /* Size of the irradiance texture. */
- int total_irr_samples; /* Total for all grids */
- int grid_sample; /* Nth sample of the current grid being rendered. */
- int grid_sample_len; /* Total number of samples for the current grid. */
- int grid_curr; /* Nth grid in the cache being rendered. */
- int bounce_curr, bounce_len; /* The current light bounce being evaluated. */
- float vis_res; /* Resolution of the Visibility shadowmap. */
- GPUTexture *grid_prev; /* Result of previous light bounce. */
- LightProbe **grid_prb; /* Pointer to the id.data of the probe object. */
+ /** Current probe being rendered (UBO data). */
+ EEVEE_LightGrid *grid;
+ /** Target cubemap at MIP 0. */
+ int irr_cube_res;
+ /** Size of the irradiance texture. */
+ int irr_size[3];
+ /** Total for all grids */
+ int total_irr_samples;
+ /** Nth sample of the current grid being rendered. */
+ int grid_sample;
+ /** Total number of samples for the current grid. */
+ int grid_sample_len;
+ /** Nth grid in the cache being rendered. */
+ int grid_curr;
+ /** The current light bounce being evaluated. */
+ int bounce_curr, bounce_len;
+ /** Resolution of the Visibility shadowmap. */
+ float vis_res;
+ /** Result of previous light bounce. */
+ GPUTexture *grid_prev;
+ /** Pointer to the id.data of the probe object. */
+ LightProbe **grid_prb;
/* Reflection probe */
- EEVEE_LightProbe *cube; /* Current probe being rendered (UBO data). */
- int ref_cube_res; /* Target cubemap at MIP 0. */
- int cube_offset; /* Index of the current cube. */
- LightProbe **cube_prb; /* Pointer to the id.data of the probe object. */
+ /** Current probe being rendered (UBO data). */
+ EEVEE_LightProbe *cube;
+ /** Target cubemap at MIP 0. */
+ int ref_cube_res;
+ /** Index of the current cube. */
+ int cube_offset;
+ /** Pointer to the id.data of the probe object. */
+ LightProbe **cube_prb;
/* Dummy Textures */
struct GPUTexture *dummy_color, *dummy_depth;
@@ -133,15 +159,18 @@ typedef struct EEVEE_LightBake {
short *stop, *do_update;
float *progress;
- bool resource_only; /* For only handling the resources. */
+ /** For only handling the resources. */
+ bool resource_only;
bool own_resources;
- bool
- own_light_cache; /* If the lightcache was created for baking, it's first owned by the baker. */
- int delay; /* ms. delay the start of the baking to not slowdown interactions (TODO remove) */
- int frame; /* Scene frame to bake. */
-
- void *gl_context,
- *gpu_context; /* If running in parallel (in a separate thread), use this context. */
+ /** If the lightcache was created for baking, it's first owned by the baker. */
+ bool own_light_cache;
+ /** ms. delay the start of the baking to not slowdown interactions (TODO remove) */
+ int delay;
+ /** Scene frame to bake. */
+ int frame;
+
+ /** If running in parallel (in a separate thread), use this context. */
+ void *gl_context, *gpu_context;
ThreadMutex *mutex;
} EEVEE_LightBake;
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index f9ed5a864df..a70438a2d37 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -253,10 +253,12 @@ struct DRWShadingGroup {
};
};
- DRWState state_extra; /* State changes for this batch only (or'd with the pass's state) */
- DRWState
- state_extra_disable; /* State changes for this batch only (and'd with the pass's state) */
- uint stencil_mask; /* Stencil mask to use for stencil test / write operations */
+ /** State changes for this batch only (or'd with the pass's state) */
+ DRWState state_extra;
+ /** State changes for this batch only (and'd with the pass's state) */
+ DRWState state_extra_disable;
+ /** Stencil mask to use for stencil test / write operations */
+ uint stencil_mask;
DRWShadingGroupType type;
/* Builtin matrices locations */
@@ -395,10 +397,11 @@ typedef struct DRWManager {
/* gl_context serves as the offset for clearing only
* the top portion of the struct so DO NOT MOVE IT! */
- void *gl_context; /* Unique ghost context used by the draw manager. */
+ /** Unique ghost context used by the draw manager. */
+ void *gl_context;
GPUContext *gpu_context;
- TicketMutex
- *gl_context_mutex; /* Mutex to lock the drw manager and avoid concurrent context usage. */
+ /** Mutex to lock the drw manager and avoid concurrent context usage. */
+ TicketMutex *gl_context_mutex;
/** GPU Resource State: Memory storage between drawing. */
struct {
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c
index 15e7c2389b8..c5e3ecd0752 100644
--- a/source/blender/draw/intern/draw_manager_exec.c
+++ b/source/blender/draw/intern/draw_manager_exec.c
@@ -617,9 +617,9 @@ static void draw_clipping_setup_from_view(void)
float F = -1.0f, N; /* square distance of far and near point to origin */
float f, n; /* distance of far and near point to z axis. f is always > 0 but n can be < 0 */
float e, s; /* far and near clipping distance (<0) */
- float
- c; /* slope of center line = distance of far clipping center to z axis / far clipping distance */
- float z; /* projection of sphere center on z axis (<0) */
+ float c; /* slope of center line = distance of far clipping center
+ * to z axis / far clipping distance. */
+ float z; /* projection of sphere center on z axis (<0) */
/* Find farthest corner and center of far clip plane. */
float corner[3] = {1.0f, 1.0f, 1.0f}; /* in clip space */