forked from bartvdbraak/blender
Cleanup: spelling in comments, capitalize tags
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
This commit is contained in:
parent
906b9f55af
commit
427a2c920a
@ -172,7 +172,7 @@ void ShaderCache::load_kernel(DeviceKernel device_kernel,
|
||||
for (auto &pipeline : pipelines[device_kernel]) {
|
||||
if (scene_specialized) {
|
||||
if (pipeline->source_md5 == device->source_md5[PSO_SPECIALISED]) {
|
||||
/* we already requested a pipeline that is specialised for this kernel data */
|
||||
/* we already requested a pipeline that is specialized for this kernel data */
|
||||
metal_printf("Specialized kernel already requested (%s)\n",
|
||||
device_kernel_as_string(device_kernel));
|
||||
return;
|
||||
@ -445,7 +445,7 @@ void MetalKernelPipeline::compile()
|
||||
|
||||
string options;
|
||||
if (use_metalrt && kernel_has_intersection(device_kernel)) {
|
||||
/* incorporate any MetalRT specialisations into the archive name */
|
||||
/* incorporate any MetalRT specializations into the archive name */
|
||||
options += string_printf(".hair_%d.hair_thick_%d.pointcloud_%d",
|
||||
metalrt_hair ? 1 : 0,
|
||||
metalrt_hair_thick ? 1 : 0,
|
||||
|
@ -41,7 +41,7 @@ struct KernelGlobalsCPU;
|
||||
* These are stored in a concurrent hash map, because OSL can compile multiple
|
||||
* shaders in parallel.
|
||||
*
|
||||
* Note: The svm_slots array contains a compressed mapping of tile to svm_slot pairs
|
||||
* NOTE: The svm_slots array contains a compressed mapping of tile to svm_slot pairs
|
||||
* stored as follows: x:tile_a, y:svm_slot_a, z:tile_b, w:svm_slot_b etc. */
|
||||
|
||||
struct OSLTextureHandle : public OIIO::RefCnt {
|
||||
|
@ -967,7 +967,7 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
|
||||
return anyProcessed;
|
||||
}
|
||||
|
||||
// Note: called from NSApplication delegate
|
||||
/* NOTE: called from #NSApplication delegate. */
|
||||
GHOST_TSuccess GHOST_SystemCocoa::handleApplicationBecomeActiveEvent()
|
||||
{
|
||||
for (GHOST_IWindow *iwindow : m_windowManager->getWindows()) {
|
||||
@ -1046,7 +1046,7 @@ void GHOST_SystemCocoa::notifyExternalEventProcessed()
|
||||
m_outsideLoopEventProcessed = true;
|
||||
}
|
||||
|
||||
// Note: called from NSWindow delegate
|
||||
/* NOTE: called from #NSWindow delegate. */
|
||||
GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
|
||||
GHOST_WindowCocoa *window)
|
||||
{
|
||||
@ -1108,7 +1108,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
// Note: called from NSWindow subclass
|
||||
/* NOTE: called from #NSWindow subclass. */
|
||||
GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType,
|
||||
GHOST_TDragnDropTypes draggedObjectType,
|
||||
GHOST_WindowCocoa *window,
|
||||
|
@ -426,8 +426,8 @@ GHOST_WindowCocoa::~GHOST_WindowCocoa()
|
||||
[m_window close];
|
||||
}
|
||||
|
||||
// Check for other blender opened windows and make the frontmost key
|
||||
// Note: for some reason the closed window is still in the list
|
||||
/* Check for other blender opened windows and make the front-most key
|
||||
* NOTE: for some reason the closed window is still in the list. */
|
||||
NSArray *windowsList = [NSApp orderedWindows];
|
||||
for (int a = 0; a < [windowsList count]; a++) {
|
||||
if (m_window != (CocoaWindow *)[windowsList objectAtIndex:a]) {
|
||||
|
@ -322,7 +322,7 @@ void GHOST_WindowWin32::adjustWindowRectForClosestMonitor(LPRECT win_rect,
|
||||
}
|
||||
|
||||
/* Adjust to allow for caption, borders, shadows, scaling, etc. Resulting values can be
|
||||
* correctly outside of monitor bounds. Note: You cannot specify WS_OVERLAPPED when calling. */
|
||||
* correctly outside of monitor bounds. NOTE: You cannot specify #WS_OVERLAPPED when calling. */
|
||||
if (fpAdjustWindowRectExForDpi) {
|
||||
UINT dpiX, dpiY;
|
||||
GetDpiForMonitor(hmonitor, MDT_EFFECTIVE_DPI, &dpiX, &dpiY);
|
||||
|
@ -116,7 +116,7 @@ void IK_QOrientationTask::ComputeJacobian(IK_QJacobian &jacobian)
|
||||
}
|
||||
|
||||
// IK_QCenterOfMassTask
|
||||
// Note: implementation not finished!
|
||||
// NOTE: implementation not finished!
|
||||
|
||||
IK_QCenterOfMassTask::IK_QCenterOfMassTask(bool primary,
|
||||
const IK_QSegment *segment,
|
||||
|
@ -118,7 +118,7 @@ void EuclideanResectionAnsarDaniilidis(const Mat2X& x_camera,
|
||||
* This is the algorithm described in:
|
||||
* "{EP$n$P: An Accurate $O(n)$ Solution to the P$n$P Problem", by V. Lepetit
|
||||
* and F. Moreno-Noguer and P. Fua, IJCV 2009. vol. 81, no. 2
|
||||
* \note: the non-linear optimization is not implemented here.
|
||||
* \note the non-linear optimization is not implemented here.
|
||||
*/
|
||||
bool EuclideanResectionEPnP(const Mat2X& x_camera,
|
||||
const Mat3X& X_world,
|
||||
|
@ -32,7 +32,7 @@ using OpenSubdiv::Osd::CpuVertexBuffer;
|
||||
namespace blender {
|
||||
namespace opensubdiv {
|
||||
|
||||
// Note: Define as a class instead of typedef to make it possible
|
||||
// NOTE: Define as a class instead of typedef to make it possible
|
||||
// to have anonymous class in opensubdiv_evaluator_internal.h
|
||||
class CpuEvalOutput : public VolatileEvalOutput<CpuVertexBuffer,
|
||||
CpuVertexBuffer,
|
||||
|
@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* API Notes:
|
||||
* Currently, this API is optimised for Bullet RigidBodies, and doesn't
|
||||
* Currently, this API is optimized for Bullet RigidBodies, and doesn't
|
||||
* take into account other Physics Engines. Some tweaking may be necessary
|
||||
* to allow other systems to be used, in particular there may be references
|
||||
* to datatypes that aren't used here...
|
||||
|
@ -67,7 +67,7 @@ typedef void (*ConstraintIDFunc)(struct bConstraint *con,
|
||||
* Callers of these functions must check that they actually point to something useful,
|
||||
* as some constraints don't define some of these.
|
||||
*
|
||||
* Warning:
|
||||
* WARNING:
|
||||
* it is not too advisable to reorder order of members of this struct,
|
||||
* as you'll have to edit quite a few #NUM_CONSTRAINT_TYPES of these
|
||||
* structs.
|
||||
|
@ -379,7 +379,7 @@ void BKE_image_ensure_tile_token(char *filename);
|
||||
/**
|
||||
* When provided with an absolute virtual `filepath`, check to see if at least
|
||||
* one concrete file exists.
|
||||
* Note: This function requires directory traversal and may be inefficient in time-critical,
|
||||
* NOTE: This function requires directory traversal and may be inefficient in time-critical,
|
||||
* or iterative, code paths.
|
||||
*/
|
||||
bool BKE_image_tile_filepath_exists(const char *filepath);
|
||||
|
@ -251,7 +251,7 @@ Subdiv *BKE_subdiv_update_from_mesh(Subdiv *subdiv,
|
||||
void BKE_subdiv_free(Subdiv *subdiv);
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Displacemnt API.
|
||||
* Displacement API.
|
||||
*/
|
||||
|
||||
void BKE_subdiv_displacement_attach_from_multires(Subdiv *subdiv,
|
||||
|
@ -2868,7 +2868,7 @@ static void nlastrip_evaluate_meta(const int evaluation_mode,
|
||||
/* Assert currently supported modes. If new mode added, then assertion marks potentially missed
|
||||
* area.
|
||||
*
|
||||
* Note: In the future if support is ever added to metastrips to support nested tracks, then
|
||||
* NOTE: In the future if support is ever added to metastrips to support nested tracks, then
|
||||
* STRIP_EVAL_BLEND and STRIP_EVAL_BLEND_GET_INVERTED_LOWER_SNAPSHOT cases are no longer
|
||||
* equivalent. The output of nlastrips_ctime_get_strip() may return a list of strips. The only
|
||||
* case difference should be the evaluation order.
|
||||
|
@ -96,7 +96,7 @@ bool BKE_copybuffer_read(Main *bmain_dst,
|
||||
ReportList *reports,
|
||||
const uint64_t id_types_mask)
|
||||
{
|
||||
/* Note: No recursive append here (no `BLO_LIBLINK_APPEND_RECURSIVE`), external linked data
|
||||
/* NOTE: No recursive append here (no `BLO_LIBLINK_APPEND_RECURSIVE`), external linked data
|
||||
* should remain linked. */
|
||||
const int flag = 0;
|
||||
const int id_tag_extra = 0;
|
||||
@ -132,7 +132,7 @@ int BKE_copybuffer_paste(bContext *C,
|
||||
View3D *v3d = CTX_wm_view3d(C); /* may be NULL. */
|
||||
const int id_tag_extra = 0;
|
||||
|
||||
/* Note: No recursive append here, external linked data should remain linked. */
|
||||
/* NOTE: No recursive append here, external linked data should remain linked. */
|
||||
BLI_assert((flag & BLO_LIBLINK_APPEND_RECURSIVE) == 0);
|
||||
|
||||
struct LibraryLink_Params liblink_params;
|
||||
|
@ -1127,7 +1127,7 @@ static void cloth_update_springs(ClothModifierData *clmd)
|
||||
spring->lin_stiffness = (v1->bend_stiff + v2->bend_stiff) / 2.0f;
|
||||
}
|
||||
else if (spring->type == CLOTH_SPRING_TYPE_GOAL) {
|
||||
/* Warning: Appending NEW goal springs does not work
|
||||
/* WARNING: Appending NEW goal springs does not work
|
||||
* because implicit solver would need reset! */
|
||||
|
||||
/* Activate / Deactivate existing springs */
|
||||
|
@ -2803,7 +2803,7 @@ void BKE_gpencil_update_layer_transforms(const Depsgraph *depsgraph, Object *ob)
|
||||
|
||||
/* Iterate over frame range. */
|
||||
for (bGPDframe *gpf = gpf_start; gpf != NULL && gpf != gpf_end; gpf = gpf->next) {
|
||||
/* Skip frames without a valid onion skinning id (note: active frame has one). */
|
||||
/* Skip frames without a valid onion skinning id (NOTE: active frame has one). */
|
||||
if (gpf->runtime.onion_id == INT_MAX) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1116,7 +1116,7 @@ static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node)
|
||||
PointerRNA ptr;
|
||||
RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
|
||||
|
||||
/* XXX Warning: context can be nullptr in case nodes are added in do_versions.
|
||||
/* XXX WARNING: context can be nullptr in case nodes are added in do_versions.
|
||||
* Delayed init is not supported for nodes with context-based `initfunc_api` at the moment. */
|
||||
BLI_assert(C != nullptr);
|
||||
ntype->initfunc_api(C, &ptr);
|
||||
@ -1165,7 +1165,7 @@ static void node_set_typeinfo(const struct bContext *C,
|
||||
}
|
||||
}
|
||||
|
||||
/* Warning: default_value must either be null or match the typeinfo at this point.
|
||||
/* WARNING: default_value must either be null or match the typeinfo at this point.
|
||||
* This function is called both for initializing new sockets and after loading files.
|
||||
*/
|
||||
static void node_socket_set_typeinfo(bNodeTree *ntree,
|
||||
|
@ -3628,7 +3628,7 @@ static void psys_cache_edit_paths_iter(void *__restrict iter_data_v,
|
||||
BKE_defvert_weight_to_rgb(ca->col, pind.hkey[1]->weight);
|
||||
}
|
||||
else {
|
||||
/* warning: copied from 'do_particle_interpolation' (without 'mvert' array stepping) */
|
||||
/* WARNING: copied from 'do_particle_interpolation' (without 'mvert' array stepping) */
|
||||
float real_t;
|
||||
if (result.time < 0.0f) {
|
||||
real_t = -result.time;
|
||||
|
@ -141,7 +141,7 @@ struct PBVH {
|
||||
/* Mesh data */
|
||||
const struct Mesh *mesh;
|
||||
|
||||
/* Note: Normals are not const because they can be updated for drawing by sculpt code. */
|
||||
/* NOTE: Normals are not `const` because they can be updated for drawing by sculpt code. */
|
||||
float (*vert_normals)[3];
|
||||
MVert *verts;
|
||||
const MPoly *mpoly;
|
||||
|
@ -184,7 +184,7 @@ class Any {
|
||||
}
|
||||
|
||||
/**
|
||||
* \note: Only needed because the template below does not count as copy assignment operator.
|
||||
* \note Only needed because the template below does not count as copy assignment operator.
|
||||
*/
|
||||
Any &operator=(const Any &other)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ extern "C" {
|
||||
|
||||
typedef unsigned int BLI_bitmap;
|
||||
|
||||
/* warning: the bitmap does not keep track of its own size or check
|
||||
/* WARNING: the bitmap does not keep track of its own size or check
|
||||
* for out-of-bounds access */
|
||||
|
||||
/* internal use */
|
||||
|
@ -463,7 +463,7 @@ template<typename T, typename GetFunc> class VArrayImpl_For_Func final : public
|
||||
};
|
||||
|
||||
/**
|
||||
* \note: This is `final` so that #may_have_ownership can be implemented reliably.
|
||||
* \note This is `final` so that #may_have_ownership can be implemented reliably.
|
||||
*/
|
||||
template<typename StructT,
|
||||
typename ElemT,
|
||||
@ -725,7 +725,7 @@ template<typename T> class VArrayCommon {
|
||||
|
||||
/**
|
||||
* Get the element at a specific index.
|
||||
* \note: This can't return a reference because the value may be computed on the fly. This also
|
||||
* \note This can't return a reference because the value may be computed on the fly. This also
|
||||
* implies that one can not use this method for assignments.
|
||||
*/
|
||||
T operator[](const int64_t index) const
|
||||
|
@ -271,7 +271,7 @@ static void *md5_read_ctx(const struct md5_ctx *ctx, void *resbuf)
|
||||
|
||||
int BLI_hash_md5_stream(FILE *stream, void *resblock)
|
||||
{
|
||||
#define BLOCKSIZE 4096 /* Important: must be a multiple of 64. */
|
||||
#define BLOCKSIZE 4096 /* IMPORTANT: must be a multiple of 64. */
|
||||
struct md5_ctx ctx;
|
||||
md5_uint32 len[2];
|
||||
char buffer[BLOCKSIZE + 72];
|
||||
|
@ -871,7 +871,7 @@ unsigned int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const
|
||||
/* Similar code used elsewhere, but this checks for double ups
|
||||
* which historically this function supports so better not change */
|
||||
|
||||
/* warning: this only gives stable direction with single polygons,
|
||||
/* WARNING: this only gives stable direction with single polygons,
|
||||
* ideally we'd calculate connectivity and each polys normal, see T41047 */
|
||||
const float *v_prev;
|
||||
|
||||
|
@ -1460,7 +1460,7 @@ BMFace *bmesh_kernel_split_face_make_edge(BMesh *bm,
|
||||
}
|
||||
else {
|
||||
/* this code is not significant until holes actually work */
|
||||
// printf("warning: call to split face euler without holes argument; holes will be tossed.\n");
|
||||
// printf("WARNING: call to split face euler without holes argument; holes will be tossed.\n");
|
||||
for (lst = f->loops.last; lst != f->loops.first; lst = lst2) {
|
||||
lst2 = lst->prev;
|
||||
BLI_mempool_free(bm->looplistpool, lst);
|
||||
|
@ -597,7 +597,7 @@ bool BM_face_validate(BMFace *face, FILE *err)
|
||||
bool ret = true;
|
||||
|
||||
if (face->len == 2) {
|
||||
fprintf(err, "warning: found two-edged face. face ptr: %p\n", face);
|
||||
fprintf(err, "WARNING: found two-edged face. face ptr: %p\n", face);
|
||||
fflush(err);
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ void BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_tangent[3])
|
||||
/* In case of degenerate faces. */
|
||||
zero_v3(r_tangent);
|
||||
|
||||
/* warning: O(n^2) loop here, take care! */
|
||||
/* WARNING: O(n^2) loop here, take care! */
|
||||
float dist_max_sq = 0.0f;
|
||||
do {
|
||||
BMLoop *l_iter_other = l_iter->next;
|
||||
@ -447,7 +447,7 @@ void BM_face_calc_tangent_vert_diagonal(const BMFace *f, float r_tangent[3])
|
||||
/* In case of degenerate faces. */
|
||||
zero_v3(r_tangent);
|
||||
|
||||
/* warning: O(n^2) loop here, take care! */
|
||||
/* WARNING: O(n^2) loop here, take care! */
|
||||
float dist_max_sq = 0.0f;
|
||||
do {
|
||||
BMLoop *l_iter_other = l_iter->next;
|
||||
|
@ -5354,7 +5354,7 @@ static BMEdge *snap_edge_for_center_vmesh_vert(int i,
|
||||
* so the arguments bndv_rep_faces is an array of size n_bndv give the freps for each i,
|
||||
* and center_frep is the frep for the center.
|
||||
*
|
||||
* Note: this function is for edge bevels only, at the moment.
|
||||
* NOTE: this function is for edge bevels only, at the moment.
|
||||
*/
|
||||
static void snap_edges_for_vmesh_vert(int i,
|
||||
int j,
|
||||
|
@ -1118,7 +1118,7 @@ static void eevee_lightbake_render_grid_sample(void *ved, void *user_data)
|
||||
SWAP(GPUTexture *, lbake->grid_prev, lcache->grid_tx.tex);
|
||||
|
||||
/* TODO: do this once for the whole bake when we have independent DRWManagers.
|
||||
* Warning: Some of the things above require this. */
|
||||
* WARNING: Some of the things above require this. */
|
||||
eevee_lightbake_cache_create(vedata, lbake);
|
||||
|
||||
/* Compute sample position */
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
flat in int slice;
|
||||
|
||||
/* Warning: these are not attributes, these are global vars. */
|
||||
/* WARNING: these are not attributes, these are global vars. */
|
||||
vec3 worldPosition = vec3(0.0);
|
||||
vec3 objectPosition = vec3(0.0);
|
||||
vec3 viewPosition = vec3(0.0);
|
||||
@ -80,8 +80,8 @@ void main()
|
||||
volumeOrco = OrcoTexCoFactors[0].xyz + objectPosition * OrcoTexCoFactors[1].xyz;
|
||||
|
||||
if (any(lessThan(volumeOrco, vec3(0.0))) || any(greaterThan(volumeOrco, vec3(1.0)))) {
|
||||
/* Note: Discard is not an explicit return in Metal prior to versions 2.3.
|
||||
* adding return after discard ensures consistent behaviour and avoids GPU
|
||||
/* NOTE: Discard is not an explicit return in Metal prior to versions 2.3.
|
||||
* adding return after discard ensures consistent behavior and avoids GPU
|
||||
* side-effects where control flow continues with undefined values. */
|
||||
discard;
|
||||
return;
|
||||
|
@ -70,7 +70,7 @@ void main()
|
||||
vec3 Tr = exp(-s_extinction * s_len);
|
||||
|
||||
/* integrate along the current step segment */
|
||||
/* Note: Original calculation carries precision issues when compiling for AMD GPUs
|
||||
/* NOTE: Original calculation carries precision issues when compiling for AMD GPUs
|
||||
* and running Metal. This version of the equation retains precision well for all
|
||||
* macOS HW configurations. */
|
||||
Lscat = (Lscat * (1.0f - Tr)) / max(vec3(1e-8), s_extinction);
|
||||
|
@ -66,7 +66,7 @@ GPU_SHADER_INTERFACE_INFO(eevee_surf_iface, "interp")
|
||||
|
||||
GPU_SHADER_CREATE_INFO(eevee_surf_deferred)
|
||||
.vertex_out(eevee_surf_iface)
|
||||
/* Note: This removes the possibility of using gl_FragDepth. */
|
||||
/* NOTE: This removes the possibility of using gl_FragDepth. */
|
||||
// .early_fragment_test(true)
|
||||
/* Direct output. */
|
||||
.fragment_out(0, Type::VEC4, "out_radiance", DualBlend::SRC_0)
|
||||
|
@ -290,7 +290,7 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd,
|
||||
/* Masking: Go through mask list and extract valid masks in a bitmap. */
|
||||
if (is_masked) {
|
||||
bool valid_mask = false;
|
||||
/* Warning: only GP_MAX_MASKBITS amount of bits.
|
||||
/* WARNING: only #GP_MAX_MASKBITS amount of bits.
|
||||
* TODO(fclem): Find a better system without any limitation. */
|
||||
tgp_layer->mask_bits = BLI_memblock_alloc(pd->gp_maskbit_pool);
|
||||
tgp_layer->mask_invert_bits = BLI_memblock_alloc(pd->gp_maskbit_pool);
|
||||
|
@ -347,7 +347,7 @@ void main()
|
||||
line_end = vec2(0.0, 0.5);
|
||||
break;
|
||||
default:
|
||||
/* Ensure values are assigned to, avoids undefined behaviour for
|
||||
/* Ensure values are assigned to, avoids undefined behavior for
|
||||
* divergent control-flow. This can occur if discard is called
|
||||
* as discard is not treated as a return in Metal 2.2. So
|
||||
* side-effects can still cause problems. */
|
||||
|
@ -91,7 +91,7 @@ GPU_SHADER_CREATE_INFO(workbench_material)
|
||||
* \{ */
|
||||
|
||||
GPU_SHADER_CREATE_INFO(workbench_transparent_accum)
|
||||
/* Note: Blending will be skipped on objectId because output is a
|
||||
/* NOTE: Blending will be skipped on objectId because output is a
|
||||
* non-normalized integer buffer. */
|
||||
.fragment_out(0, Type::VEC4, "transparentAccum")
|
||||
.fragment_out(1, Type::VEC4, "revealageAccum")
|
||||
|
@ -218,13 +218,13 @@ void main()
|
||||
/* Manual depth test. TODO: remove. */
|
||||
float depth = texelFetch(depthBuffer, ivec2(gl_FragCoord.xy), 0).r;
|
||||
if (gl_FragCoord.z >= depth) {
|
||||
/* Note: In the Metal API, prior to Metal 2.3, Discard is not an explicit return and can
|
||||
* produce undefined behaviour. This is especially prominent with derivatives if control-flow
|
||||
/* NOTE: In the Metal API, prior to Metal 2.3, Discard is not an explicit return and can
|
||||
* produce undefined behavior. This is especially prominent with derivatives if control-flow
|
||||
* divergence is present.
|
||||
*
|
||||
* Adding a return call eliminates undefined behaviour and a later out-of-bounds read causing
|
||||
* Adding a return call eliminates undefined behavior and a later out-of-bounds read causing
|
||||
* a crash on AMD platforms.
|
||||
* This behaviour can also affect OpenGL on certain devices. */
|
||||
* This behavior can also affect OpenGL on certain devices. */
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ static uint mesh_cd_calc_gpu_layers_vcol_used(const Mesh *me_query,
|
||||
layer_i;
|
||||
}
|
||||
|
||||
/* Note: this is not the same as the layer_i below. */
|
||||
/* NOTE: this is not the same as the layer_i below. */
|
||||
if (layer_i != -1) {
|
||||
layer = (domain == ATTR_DOMAIN_POINT ? cd_vdata : cd_ldata)->layers + layer_i;
|
||||
}
|
||||
@ -544,7 +544,7 @@ static uint mesh_cd_calc_gpu_layers_vcol_used(const Mesh *me_query,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Note: this is the logical index into the color attribute list,
|
||||
/* NOTE: this is the logical index into the color attribute list,
|
||||
* not the customdata index. */
|
||||
int vcol_i = BKE_id_attribute_to_index(
|
||||
(ID *)me_query, layer, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL);
|
||||
@ -701,7 +701,7 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object,
|
||||
break;
|
||||
}
|
||||
|
||||
/* Note: attr->type will always be CD_PROP_COLOR even for
|
||||
/* NOTE: attr->type will always be CD_PROP_COLOR even for
|
||||
* CD_PROP_BYTE_COLOR layers, see node_shader_gpu_vertex_color in
|
||||
* node_shader_vertex_color.cc.
|
||||
*/
|
||||
|
@ -343,7 +343,7 @@ void DRW_hair_update(void)
|
||||
int max_read_px_len = min_ii(width * height, pr_call->vert_len);
|
||||
|
||||
DRW_draw_pass_subset(g_tf_pass, pr_call->shgrp, pr_call->shgrp);
|
||||
/* Readback result to main memory. */
|
||||
/* Read back result to main memory. */
|
||||
GPU_framebuffer_read_color(fb, 0, 0, width, height, 4, 0, GPU_DATA_FLOAT, data);
|
||||
/* Upload back to VBO. */
|
||||
GPU_vertbuf_use(pr_call->vbo);
|
||||
|
@ -501,7 +501,7 @@ static DRWData *drw_viewport_data_ensure(GPUViewport *viewport)
|
||||
* - size can be NULL to get it from viewport.
|
||||
* - if viewport and size are NULL, size is set to (1, 1).
|
||||
*
|
||||
* Important: drw_manager_init can be called multiple times before drw_manager_exit.
|
||||
* IMPORTANT: #drw_manager_init can be called multiple times before #drw_manager_exit.
|
||||
*/
|
||||
static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int size[2])
|
||||
{
|
||||
|
@ -212,8 +212,8 @@ void hair_get_pos_tan_binor_time(bool is_persp,
|
||||
wpos += wbinor * thick_time * scale;
|
||||
}
|
||||
else {
|
||||
/* Note: Ensures 'hairThickTime' is initialised -
|
||||
* avoids undefined behaviour on certain macOS configurations. */
|
||||
/* NOTE: Ensures 'hairThickTime' is initialized -
|
||||
* avoids undefined behavior on certain macOS configurations. */
|
||||
thick_time = 0.0;
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void wm_gizmo_vec_draw(
|
||||
immEnd();
|
||||
}
|
||||
else if (primitive_type == GPU_PRIM_TRI_FAN) {
|
||||
/* Note(Metal): Tri-fan alternative for Metal. Triangle List is more efficient for small
|
||||
/* NOTE(Metal): Tri-fan alternative for Metal. Triangle List is more efficient for small
|
||||
* primitive counts. */
|
||||
int tri_count = vert_count - 2;
|
||||
immBegin(GPU_PRIM_TRIS, tri_count * 3);
|
||||
|
@ -74,7 +74,7 @@ static void button2d_geom_draw_backdrop(const wmGizmo *gz,
|
||||
GPU_viewport_size_get_f(viewport);
|
||||
|
||||
GPUVertFormat *format = immVertexFormat();
|
||||
/* Note(Metal): Prefer 3D coordinate for 2D rendering when using 3D shader. */
|
||||
/* NOTE(Metal): Prefer 3D coordinate for 2D rendering when using 3D shader. */
|
||||
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
/* TODO: other draw styles. */
|
||||
|
@ -96,7 +96,7 @@ static void dial_geom_draw(const float color[4],
|
||||
ED_GIZMO_DIAL_DRAW_FLAG_FILL)));
|
||||
|
||||
GPUVertFormat *format = immVertexFormat();
|
||||
/* Note(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */
|
||||
/* NOTE(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */
|
||||
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
if (clip_plane) {
|
||||
|
@ -98,7 +98,7 @@ static void move_geom_draw(const wmGizmo *gz,
|
||||
ED_GIZMO_MOVE_DRAW_FLAG_FILL)));
|
||||
|
||||
GPUVertFormat *format = immVertexFormat();
|
||||
/* Note(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */
|
||||
/* NOTE(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */
|
||||
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
immBindBuiltinProgram(filled ? GPU_SHADER_3D_UNIFORM_COLOR :
|
||||
|
@ -549,7 +549,7 @@ typedef enum eAnimChannels_SetFlag {
|
||||
/* types of settings for AnimChannels */
|
||||
typedef enum eAnimChannel_Settings {
|
||||
ACHANNEL_SETTING_SELECT = 0,
|
||||
/** warning: for drawing UI's, need to check if this is off (maybe inverse this later) */
|
||||
/** WARNING: for drawing UI's, need to check if this is off (maybe inverse this later). */
|
||||
ACHANNEL_SETTING_PROTECT = 1,
|
||||
ACHANNEL_SETTING_MUTE = 2,
|
||||
ACHANNEL_SETTING_EXPAND = 3,
|
||||
|
@ -666,7 +666,7 @@ bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_re
|
||||
bool ED_region_panel_category_gutter_isect_xy(const ARegion *region, const int event_xy[2]);
|
||||
|
||||
/**
|
||||
* \note: This may return true for multiple overlapping regions.
|
||||
* \note This may return true for multiple overlapping regions.
|
||||
* If it matters, check overlapped regions first (#ARegion.overlap).
|
||||
*/
|
||||
bool ED_region_contains_xy(const struct ARegion *region, const int event_xy[2]);
|
||||
|
@ -198,7 +198,7 @@ typedef struct KnifeObjectInfo {
|
||||
* Optionally allocate triangle indices, these are needed for non-interactive knife
|
||||
* projection as multiple cuts are made without the BVH being updated.
|
||||
* Using these indices the it's possible to access `cagecos` even if the face has been cut
|
||||
* and the loops in `em->looptris` no longer refer to the original triangles, see:
|
||||
* and the loops in `em->looptris` no longer refer to the original triangles, see: T97153.
|
||||
*/
|
||||
const int (*tri_indices)[3];
|
||||
|
||||
|
@ -1888,7 +1888,7 @@ void OBJECT_OT_collection_external_asset_drop(wmOperatorType *ot)
|
||||
|
||||
ED_object_add_generic_props(ot, false);
|
||||
|
||||
/* Important: Instancing option. Intentionally remembered across executions (no #PROP_SKIP_SAVE).
|
||||
/* IMPORTANT: Instancing option. Intentionally remembered across executions (no #PROP_SKIP_SAVE).
|
||||
*/
|
||||
RNA_def_boolean(ot->srna,
|
||||
"use_instance",
|
||||
|
@ -1315,7 +1315,7 @@ void ED_screen_full_restore(bContext *C, ScrArea *area)
|
||||
else {
|
||||
ED_screen_state_toggle(C, win, area, state);
|
||||
}
|
||||
/* warning: 'area' may be freed */
|
||||
/* WARNING: 'area' may be freed */
|
||||
}
|
||||
/* otherwise just tile the area again */
|
||||
else {
|
||||
|
@ -200,7 +200,7 @@ static float text_size_get(const SeqChannelDrawContext *context)
|
||||
return UI_fontstyle_height_max(&style->widget) * 1.5f * context->scale;
|
||||
}
|
||||
|
||||
/* Todo: decide what gets priority - label or buttons */
|
||||
/* TODO: decide what gets priority - label or buttons. */
|
||||
static rctf label_rect_init(const SeqChannelDrawContext *context,
|
||||
const int channel_index,
|
||||
const float used_width)
|
||||
@ -286,7 +286,7 @@ static void draw_channel_labels(const SeqChannelDrawContext *context,
|
||||
}
|
||||
}
|
||||
|
||||
/* Todo: different text/buttons alignment */
|
||||
/* TODO: different text/buttons alignment. */
|
||||
static void draw_channel_header(const SeqChannelDrawContext *context,
|
||||
uiBlock *block,
|
||||
const int channel_index)
|
||||
|
@ -2596,7 +2596,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* Paste animation.
|
||||
* Note: Only fcurves are copied. Drivers and NLA action strips are not copied.
|
||||
* NOTE: Only fcurves are copied. Drivers and NLA action strips are not copied.
|
||||
* First backup original curves from scene and move curves from clipboard into scene. This way,
|
||||
* when pasted strips are renamed, pasted fcurves are renamed with them. Finally restore original
|
||||
* curves from backup.
|
||||
|
@ -499,9 +499,9 @@ void BlenderStrokeRenderer::test_strip_visibility(Strip::vertex_container &strip
|
||||
StrokeVertexRep *svRep[3];
|
||||
bool visible;
|
||||
|
||||
// iterate over all vertices and count visible faces and strip segments
|
||||
// (note: a strip segment is a series of visible faces, while two strip
|
||||
// segments are separated by one or more invisible faces)
|
||||
/* Iterate over all vertices and count visible faces and strip segments
|
||||
* (NOTE: a strip segment is a series of visible faces, while two strip
|
||||
* segments are separated by one or more invisible faces). */
|
||||
v[0] = strip_vertices.begin();
|
||||
v[1] = v[0] + 1;
|
||||
v[2] = v[0] + 2;
|
||||
|
@ -372,7 +372,7 @@ class FieldEvaluator : NonMovable, NonCopyable {
|
||||
/**
|
||||
* \param field: Field to add to the evaluator.
|
||||
* \param dst: Mutable span that the evaluated result for this field is be written into.
|
||||
* \note: When the output may only be used as a single value, the version of this function with
|
||||
* \note When the output may only be used as a single value, the version of this function with
|
||||
* a virtual array result array should be used.
|
||||
*/
|
||||
int add_with_destination(GField field, GMutableSpan dst);
|
||||
@ -380,7 +380,7 @@ class FieldEvaluator : NonMovable, NonCopyable {
|
||||
/**
|
||||
* \param field: Field to add to the evaluator.
|
||||
* \param dst: Mutable span that the evaluated result for this field is be written into.
|
||||
* \note: When the output may only be used as a single value, the version of this function with
|
||||
* \note When the output may only be used as a single value, the version of this function with
|
||||
* a virtual array result array should be used.
|
||||
*/
|
||||
template<typename T> int add_with_destination(Field<T> field, MutableSpan<T> dst)
|
||||
|
@ -487,7 +487,7 @@ typedef struct LineartBoundingArea {
|
||||
* r_aligned: True when 1) a and b is exactly on the same straight line and 2) a and b share a
|
||||
* common end-point.
|
||||
*
|
||||
* Important: if r_aligned is true, r_ratio will be either 0 or 1 depending on which point from
|
||||
* IMPORTANT: if r_aligned is true, r_ratio will be either 0 or 1 depending on which point from
|
||||
* segment a is shared with segment b. If it's a1 then r_ratio is 0, else then r_ratio is 1. This
|
||||
* extra information is needed for line art occlusion stage to work correctly in such cases.
|
||||
*/
|
||||
|
@ -35,7 +35,8 @@ typedef enum eGPUBarrier {
|
||||
|
||||
ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_ELEMENT_ARRAY)
|
||||
|
||||
/* Note: For Metal and Vulkan only. TODO(Metal): Update barrier calls to use stage flags. */
|
||||
/* NOTE: For Metal and Vulkan only.
|
||||
* TODO(Metal): Update barrier calls to use stage flags. */
|
||||
typedef enum eGPUStageBarrierBits {
|
||||
GPU_BARRIER_STAGE_VERTEX = (1 << 0),
|
||||
GPU_BARRIER_STAGE_FRAGMENT = (1 << 1),
|
||||
|
@ -626,7 +626,7 @@ eGPUMaterialFlag GPU_material_flag(const GPUMaterial *mat)
|
||||
return mat->flag;
|
||||
}
|
||||
|
||||
/* Note: Consumes the flags. */
|
||||
/* NOTE: Consumes the flags. */
|
||||
bool GPU_material_recalc_flag_get(GPUMaterial *mat)
|
||||
{
|
||||
bool updated = (mat->flag & GPU_MATFLAG_UPDATED) != 0;
|
||||
|
@ -57,12 +57,12 @@ typedef struct MTLContextDepthStencilState {
|
||||
MTLStencilOperation stencil_op_back_depth_fail;
|
||||
MTLStencilOperation stencil_op_back_depthstencil_pass;
|
||||
|
||||
/* Framebuffer State -- We need to mark this, incase stencil state remains unchanged,
|
||||
/* Frame-buffer State -- We need to mark this, in case stencil state remains unchanged,
|
||||
* but attachment state has changed. */
|
||||
bool has_depth_target;
|
||||
bool has_stencil_target;
|
||||
|
||||
/* TODO(Metal): Consider optimising this function using memcmp.
|
||||
/* TODO(Metal): Consider optimizing this function using memcmp.
|
||||
* Un-used, but differing, stencil state leads to over-generation
|
||||
* of state objects when doing trivial compare. */
|
||||
inline bool operator==(const MTLContextDepthStencilState &other) const
|
||||
@ -297,7 +297,7 @@ typedef struct MTLContextGlobalShaderPipelineState {
|
||||
|
||||
/* Whether the pipeline state has been modified since application.
|
||||
* `dirty_flags` is a bitmask of the types of state which have been updated.
|
||||
* This is in order to optimise calls and only re-apply state as needed.
|
||||
* This is in order to optimize calls and only re-apply state as needed.
|
||||
* Some state parameters are dynamically applied on the RenderCommandEncoder,
|
||||
* others may be encapsulated in GPU-resident state objects such as
|
||||
* MTLDepthStencilState or MTLRenderPipelineState. */
|
||||
@ -374,7 +374,7 @@ typedef struct MTLTemporaryBufferRange {
|
||||
} MTLTemporaryBufferRange;
|
||||
|
||||
/** MTLContext -- Core render loop and state management. **/
|
||||
/* Note(Metal): Partial MTLContext stub to provide wrapper functionality
|
||||
/* NOTE(Metal): Partial MTLContext stub to provide wrapper functionality
|
||||
* for work-in-progress MTL* classes. */
|
||||
|
||||
class MTLContext : public Context {
|
||||
|
@ -49,7 +49,7 @@ MTLContext::MTLContext(void *ghost_window)
|
||||
/* Init debug. */
|
||||
debug::mtl_debug_init();
|
||||
|
||||
/* Initialise Metal modules. */
|
||||
/* Initialize Metal modules. */
|
||||
this->state_manager = new MTLStateManager(this);
|
||||
|
||||
/* TODO(Metal): Implement. */
|
||||
@ -121,7 +121,7 @@ bool MTLContext::is_render_pass_active()
|
||||
/* Metal Context Pipeline State. */
|
||||
void MTLContext::pipeline_state_init()
|
||||
{
|
||||
/*** Initialise state only once. ***/
|
||||
/*** Initialize state only once. ***/
|
||||
if (!this->pipeline_state.initialised) {
|
||||
this->pipeline_state.initialised = true;
|
||||
this->pipeline_state.active_shader = NULL;
|
||||
@ -277,7 +277,7 @@ id<MTLSamplerState> MTLContext::get_sampler_from_state(MTLSamplerState sampler_s
|
||||
|
||||
id<MTLSamplerState> MTLContext::generate_sampler_from_state(MTLSamplerState sampler_state)
|
||||
{
|
||||
/* Check if samper already exists for given state. */
|
||||
/* Check if sampler already exists for given state. */
|
||||
id<MTLSamplerState> st = this->sampler_state_cache_[(unsigned int)sampler_state];
|
||||
if (st != nil) {
|
||||
return st;
|
||||
|
@ -24,7 +24,7 @@ void MTLStateManager::mtl_state_init(void)
|
||||
|
||||
MTLStateManager::MTLStateManager(MTLContext *ctx) : StateManager()
|
||||
{
|
||||
/* Initialise State. */
|
||||
/* Initialize State. */
|
||||
this->context_ = ctx;
|
||||
mtl_state_init();
|
||||
|
||||
@ -92,10 +92,10 @@ void MTLStateManager::set_state(const GPUState &state)
|
||||
|
||||
/* TODO remove (Following GLState). */
|
||||
if (changed.polygon_smooth) {
|
||||
/* Note: Unsupported in Metal. */
|
||||
/* NOTE: Unsupported in Metal. */
|
||||
}
|
||||
if (changed.line_smooth) {
|
||||
/* Note: Unsupported in Metal. */
|
||||
/* NOTE: Unsupported in Metal. */
|
||||
}
|
||||
|
||||
current_ = state;
|
||||
@ -341,7 +341,7 @@ void MTLStateManager::set_clip_distances(const int new_dist_len, const int old_d
|
||||
|
||||
void MTLStateManager::set_logic_op(const bool enable)
|
||||
{
|
||||
/* Note(Metal): Logic Operations not directly supported. */
|
||||
/* NOTE(Metal): Logic Operations not directly supported. */
|
||||
}
|
||||
|
||||
void MTLStateManager::set_facing(const bool invert)
|
||||
@ -376,9 +376,9 @@ void MTLStateManager::set_backface_culling(const eGPUFaceCullTest test)
|
||||
|
||||
void MTLStateManager::set_provoking_vert(const eGPUProvokingVertex vert)
|
||||
{
|
||||
/* Note(Metal): Provoking vertex is not a feature in the Metal API.
|
||||
/* NOTE(Metal): Provoking vertex is not a feature in the Metal API.
|
||||
* Shaders are handled on a case-by-case basis using a modified vertex shader.
|
||||
* For example, wireframe rendering and edit-mesh shaders utilise an SSBO-based
|
||||
* For example, wireframe rendering and edit-mesh shaders utilize an SSBO-based
|
||||
* vertex fetching mechanism which considers the inverse convention for flat
|
||||
* shading, to ensure consistent results with OpenGL. */
|
||||
}
|
||||
@ -439,7 +439,7 @@ void MTLStateManager::set_blend(const eGPUBlend value)
|
||||
break;
|
||||
}
|
||||
case GPU_BLEND_ADDITIVE: {
|
||||
/* Do not let alpha accumulate but premult the source RGB by it. */
|
||||
/* Do not let alpha accumulate but pre-multiply the source RGB by it. */
|
||||
src_rgb = MTLBlendFactorSourceAlpha;
|
||||
dst_rgb = MTLBlendFactorOne;
|
||||
src_alpha = MTLBlendFactorZero;
|
||||
@ -530,14 +530,14 @@ void MTLStateManager::set_blend(const eGPUBlend value)
|
||||
/** \name Memory barrier
|
||||
* \{ */
|
||||
|
||||
/* Note(Metal): Granular option for specifying before/after stages for a barrier
|
||||
/* NOTE(Metal): Granular option for specifying before/after stages for a barrier
|
||||
* Would be a useful feature. */
|
||||
/*void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits,
|
||||
eGPUStageBarrierBits before_stages,
|
||||
eGPUStageBarrierBits after_stages) */
|
||||
void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits)
|
||||
{
|
||||
/* Note(Metal): The Metal API implictly tracks dependencies between resources.
|
||||
/* NOTE(Metal): The Metal API implicitly tracks dependencies between resources.
|
||||
* Memory barriers and execution barriers (Fences/Events) can be used to coordinate
|
||||
* this explicitly, however, in most cases, the driver will be able to
|
||||
* resolve these dependencies automatically.
|
||||
@ -551,7 +551,7 @@ void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits)
|
||||
|
||||
/* Apple Silicon does not support memory barriers.
|
||||
* We do not currently need these due to implicit API guarantees.
|
||||
* Note(Metal): MTLFence/MTLEvent may be required to synchronize work if
|
||||
* NOTE(Metal): MTLFence/MTLEvent may be required to synchronize work if
|
||||
* untracked resources are ever used. */
|
||||
if ([ctx->device hasUnifiedMemory]) {
|
||||
return;
|
||||
@ -562,7 +562,7 @@ void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits)
|
||||
id<MTLRenderCommandEncoder> rec = nil; // ctx->get_active_render_command_encoder();
|
||||
BLI_assert(rec);
|
||||
|
||||
/* Only supporting Metal on 10.15 onwards anyway - Check required for warnings. */
|
||||
/* Only supporting Metal on 10.15 onward anyway - Check required for warnings. */
|
||||
if (@available(macOS 10.14, *)) {
|
||||
MTLBarrierScope scope = 0;
|
||||
if (barrier_bits & GPU_BARRIER_SHADER_IMAGE_ACCESS ||
|
||||
|
@ -1163,7 +1163,7 @@ void gpu::MTLTexture::mip_range_set(int min, int max)
|
||||
{
|
||||
BLI_assert(min <= max && min >= 0 && max <= mipmaps_);
|
||||
|
||||
/* Note:
|
||||
/* NOTE:
|
||||
* - mip_min_ and mip_max_ are used to Clamp LODs during sampling.
|
||||
* - Given functions like Framebuffer::recursive_downsample modifies the mip range
|
||||
* between each layer, we do not want to be re-baking the texture.
|
||||
|
@ -47,7 +47,7 @@ typedef struct DDSData {
|
||||
* Also; add new variables to the end to save pain!
|
||||
*/
|
||||
|
||||
/* Warning: Keep explicit value assignments here,
|
||||
/* WARNING: Keep explicit value assignments here,
|
||||
* this file is included in areas where not all format defines are set
|
||||
* (e.g. intern/dds only get WITH_DDS, even if TIFF, HDR etc are also defined).
|
||||
* See T46524. */
|
||||
|
@ -45,7 +45,7 @@ unsigned int mem_read(Stream &mem, unsigned long long &i)
|
||||
mem.set_failed(msg_error_seek);
|
||||
return 0;
|
||||
}
|
||||
memcpy(&i, mem.mem + mem.pos, 8); /* @@ todo: make sure little endian */
|
||||
memcpy(&i, mem.mem + mem.pos, 8); /* TODO: make sure little endian. */
|
||||
mem.pos += 8;
|
||||
return 8;
|
||||
}
|
||||
@ -56,7 +56,7 @@ unsigned int mem_read(Stream &mem, unsigned int &i)
|
||||
mem.set_failed(msg_error_read);
|
||||
return 0;
|
||||
}
|
||||
memcpy(&i, mem.mem + mem.pos, 4); /* @@ todo: make sure little endian */
|
||||
memcpy(&i, mem.mem + mem.pos, 4); /* TODO: make sure little endian. */
|
||||
mem.pos += 4;
|
||||
return 4;
|
||||
}
|
||||
@ -67,7 +67,7 @@ unsigned int mem_read(Stream &mem, unsigned short &i)
|
||||
mem.set_failed(msg_error_read);
|
||||
return 0;
|
||||
}
|
||||
memcpy(&i, mem.mem + mem.pos, 2); /* @@ todo: make sure little endian */
|
||||
memcpy(&i, mem.mem + mem.pos, 2); /* TODO: make sure little endian. */
|
||||
mem.pos += 2;
|
||||
return 2;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
|
||||
COLLADAFW::Transformation::TransformationType tm_type);
|
||||
/**
|
||||
* Internal, better make it private
|
||||
* warning: evaluates only rotation and only assigns matrix transforms now
|
||||
* WARNING: evaluates only rotation and only assigns matrix transforms now
|
||||
* prerequisites: animlist_map, curve_map.
|
||||
*/
|
||||
void evaluate_transform_at_frame(float mat[4][4], COLLADAFW::Node *node, float fra);
|
||||
|
@ -142,7 +142,7 @@ class MeshImporter : public MeshImporterBase {
|
||||
/**
|
||||
* Return the number of faces by summing up
|
||||
* the face-counts of the parts.
|
||||
* hint: This is done because `mesh->getFacesCount()` does
|
||||
* HINT: This is done because `mesh->getFacesCount()` does
|
||||
* count loose edges as extra faces, which is not what we want here.
|
||||
*/
|
||||
void allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me);
|
||||
@ -150,7 +150,7 @@ class MeshImporter : public MeshImporterBase {
|
||||
/* TODO: import uv set names */
|
||||
/**
|
||||
* Read all faces from TRIANGLES, TRIANGLE_FANS, POLYLIST, POLYGON
|
||||
* Important: This function MUST be called before read_lines()
|
||||
* IMPORTANT: This function MUST be called before read_lines()
|
||||
* Otherwise we will lose all edges from faces (see read_lines() above)
|
||||
*
|
||||
* TODO: import uv set names.
|
||||
@ -158,7 +158,7 @@ class MeshImporter : public MeshImporterBase {
|
||||
void read_polys(COLLADAFW::Mesh *mesh, Mesh *me);
|
||||
/**
|
||||
* Read all loose edges.
|
||||
* Important: This function assumes that all edges from existing
|
||||
* IMPORTANT: This function assumes that all edges from existing
|
||||
* faces have already been generated and added to me->medge
|
||||
* So this function MUST be called after read_faces() (see below)
|
||||
*/
|
||||
|
@ -385,7 +385,7 @@ void OBJWriter::write_edges_indices(FormatHandler<eFileType::OBJ> &fh,
|
||||
const IndexOffsets &offsets,
|
||||
const OBJMesh &obj_mesh_data) const
|
||||
{
|
||||
/* Note: ensure_mesh_edges should be called before. */
|
||||
/* NOTE: ensure_mesh_edges should be called before. */
|
||||
const int tot_edges = obj_mesh_data.tot_edges();
|
||||
for (int edge_index = 0; edge_index < tot_edges; edge_index++) {
|
||||
const std::optional<std::array<int, 2>> vertex_indices =
|
||||
|
@ -236,7 +236,7 @@ constexpr FormattingSyntax syntax_elem_to_formatting(const eMTLSyntaxElement key
|
||||
case eMTLSyntaxElement::Ke: {
|
||||
return {"Ke {:.6f} {:.6f} {:.6f}\n", 3, is_type_float<T...>};
|
||||
}
|
||||
/* Note: first texture map related argument, if present, will have its own leading space. */
|
||||
/* NOTE: first texture map related argument, if present, will have its own leading space. */
|
||||
case eMTLSyntaxElement::map_Kd: {
|
||||
return {"map_Kd{} {}\n", 2, is_type_string_related<T...>};
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
namespace blender::io::obj {
|
||||
|
||||
/* Note: the OBJ parser implementation is planned to get fairly large changes "soon",
|
||||
/* NOTE: the OBJ parser implementation is planned to get fairly large changes "soon",
|
||||
* so don't read too much into current implementation... */
|
||||
class OBJParser {
|
||||
private:
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "obj_import_string_utils.hh"
|
||||
|
||||
/* Note: we could use C++17 <charconv> from_chars to parse
|
||||
/* NOTE: we could use C++17 <charconv> from_chars to parse
|
||||
* floats, but even if some compilers claim full support,
|
||||
* their standard libraries are not quite there yet.
|
||||
* LLVM/libc++ only has a float parser since LLVM 14,
|
||||
|
@ -333,7 +333,7 @@ TEST_F(obj_importer_test, import_invalid_syntax)
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
{"OBObjectWithAReallyLongNameToCheckHowImportHandlesNamesThatAreLon",
|
||||
OB_MESH,
|
||||
10, /* Note: right now parses some invalid obj syntax as valid vertices. */
|
||||
10, /* NOTE: right now parses some invalid obj syntax as valid vertices. */
|
||||
3,
|
||||
1,
|
||||
3,
|
||||
|
@ -173,7 +173,7 @@ typedef struct SpaceProperties {
|
||||
|
||||
/* button defines (deprecated) */
|
||||
#ifdef DNA_DEPRECATED_ALLOW
|
||||
/* warning: the values of these defines are used in SpaceProperties.tabs[8] */
|
||||
/* WARNING: the values of these defines are used in SpaceProperties.tabs[8] */
|
||||
/* SpaceProperties.mainb new */
|
||||
# define CONTEXT_SCENE 0
|
||||
# define CONTEXT_OBJECT 1
|
||||
|
@ -120,7 +120,7 @@ static Array<int> calculate_spline_point_offsets(GeoNodeExecParams ¶ms,
|
||||
}
|
||||
|
||||
/**
|
||||
* \note: Relies on the fact that all attributes on point clouds are stored contiguously.
|
||||
* \note Relies on the fact that all attributes on point clouds are stored contiguously.
|
||||
*/
|
||||
static GMutableSpan ensure_point_attribute(PointCloudComponent &points,
|
||||
const AttributeIDRef &attribute_id,
|
||||
|
@ -109,7 +109,7 @@ static MutableSpan<MLoop> mesh_loops(Mesh &mesh)
|
||||
}
|
||||
|
||||
/**
|
||||
* \note: Some areas in this file rely on the new sections of attributes from #CustomData_realloc
|
||||
* \note Some areas in this file rely on the new sections of attributes from #CustomData_realloc
|
||||
* to be zeroed.
|
||||
*/
|
||||
static void expand_mesh(Mesh &mesh,
|
||||
|
@ -74,7 +74,7 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat,
|
||||
const char *gpu_node_name = use_cubic ? "node_tex_tile_cubic" : "node_tex_tile_linear";
|
||||
GPUNodeLink *gpu_image = GPU_image_tiled(mat, ima, iuser, sampler_state);
|
||||
GPUNodeLink *gpu_image_tile_mapping = GPU_image_tiled_mapping(mat, ima, iuser);
|
||||
/* UDIM tiles needs a samper2DArray and sampler1DArray for tile mapping. */
|
||||
/* UDIM tiles needs a `sampler2DArray` and `sampler1DArray` for tile mapping. */
|
||||
GPU_stack_link(mat, node, gpu_node_name, in, out, gpu_image, gpu_image_tile_mapping);
|
||||
}
|
||||
else {
|
||||
|
@ -8886,7 +8886,7 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Warning: gets parent classes srna, only for the register function. */
|
||||
/* WARNING: gets parent classes srna, only for the register function. */
|
||||
srna = pyrna_struct_as_srna(py_class, true, "register_class(...):");
|
||||
if (srna == NULL) {
|
||||
return NULL;
|
||||
|
@ -1215,7 +1215,7 @@ static int imagewraposa_aniso(Tex *tex,
|
||||
AFD.intpol = intpol;
|
||||
AFD.extflag = extflag;
|
||||
|
||||
/* brecht: added stupid clamping here, large dx/dy can give very large
|
||||
/* NOTE(@brecht): added stupid clamping here, large dx/dy can give very large
|
||||
* filter sizes which take ages to render, it may be better to do this
|
||||
* more intelligently later in the code .. probably it's not noticeable */
|
||||
if (AFD.dxt[0] * AFD.dxt[0] + AFD.dxt[1] * AFD.dxt[1] > 2.0f * 2.0f) {
|
||||
|
@ -1208,9 +1208,8 @@ static int multitex(Tex *tex,
|
||||
case TEX_MUSGRAVE:
|
||||
/* newnoise: musgrave types */
|
||||
|
||||
/* ton: added this, for Blender convention reason.
|
||||
* artificer: added the use of tmpvec to avoid scaling texvec
|
||||
*/
|
||||
/* NOTE(@ton): added this, for Blender convention reason.
|
||||
* NOTE(@artificer): added the use of tmpvec to avoid scaling texvec. */
|
||||
copy_v3_v3(tmpvec, texvec);
|
||||
mul_v3_fl(tmpvec, 1.0f / tex->noisesize);
|
||||
|
||||
@ -1230,18 +1229,16 @@ static int multitex(Tex *tex,
|
||||
break;
|
||||
/* newnoise: voronoi type */
|
||||
case TEX_VORONOI:
|
||||
/* ton: added this, for Blender convention reason.
|
||||
* artificer: added the use of tmpvec to avoid scaling texvec
|
||||
*/
|
||||
/* NOTE(@ton): added this, for Blender convention reason.
|
||||
* NOTE(@artificer): added the use of tmpvec to avoid scaling texvec. */
|
||||
copy_v3_v3(tmpvec, texvec);
|
||||
mul_v3_fl(tmpvec, 1.0f / tex->noisesize);
|
||||
|
||||
retval = voronoiTex(tex, tmpvec, texres);
|
||||
break;
|
||||
case TEX_DISTNOISE:
|
||||
/* ton: added this, for Blender convention reason.
|
||||
* artificer: added the use of tmpvec to avoid scaling texvec
|
||||
*/
|
||||
/* NOTE(@ton): added this, for Blender convention reason.
|
||||
* NOTE(@artificer): added the use of tmpvec to avoid scaling texvec. */
|
||||
copy_v3_v3(tmpvec, texvec);
|
||||
mul_v3_fl(tmpvec, 1.0f / tex->noisesize);
|
||||
|
||||
|
@ -1196,7 +1196,7 @@ struct ID *WM_drag_get_local_ID_from_event(const struct wmEvent *event, short id
|
||||
bool WM_drag_is_ID_type(const struct wmDrag *drag, int idcode);
|
||||
|
||||
/**
|
||||
* \note: Does not store \a asset in any way, so it's fine to pass a temporary.
|
||||
* \note Does not store \a asset in any way, so it's fine to pass a temporary.
|
||||
*/
|
||||
wmDragAsset *WM_drag_create_asset_data(const struct AssetHandle *asset,
|
||||
struct AssetMetaData *metadata,
|
||||
@ -1228,7 +1228,7 @@ void WM_drag_free_imported_drag_ID(struct Main *bmain,
|
||||
struct wmDragAssetCatalog *WM_drag_get_asset_catalog_data(const struct wmDrag *drag);
|
||||
|
||||
/**
|
||||
* \note: Does not store \a asset in any way, so it's fine to pass a temporary.
|
||||
* \note Does not store \a asset in any way, so it's fine to pass a temporary.
|
||||
*/
|
||||
void WM_drag_add_asset_list_item(wmDrag *drag,
|
||||
const struct bContext *C,
|
||||
|
@ -5908,7 +5908,7 @@ bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, uiLayout *la
|
||||
bool show_text = true;
|
||||
|
||||
{
|
||||
/* Warning: O(n^2). */
|
||||
/* WARNING: O(n^2). */
|
||||
wmKeyMapItem *kmi = NULL;
|
||||
for (kmi = keymap->items.first; kmi; kmi = kmi->next) {
|
||||
if (kmi->propvalue == items[i].value) {
|
||||
|
Loading…
Reference in New Issue
Block a user