Cleanup: clang-format
This commit is contained in:
parent
2cc4747443
commit
1a705fa139
|
@ -458,7 +458,8 @@ MetalDevice::MetalMem *MetalDevice::generic_alloc(device_memory &mem)
|
|||
id<MTLBuffer> metal_buffer = nil;
|
||||
MTLResourceOptions options = default_storage_mode;
|
||||
|
||||
/* Workaround for "bake" unit tests which fail if RenderBuffers is allocated with MTLResourceStorageModeShared. */
|
||||
/* Workaround for "bake" unit tests which fail if RenderBuffers is allocated with
|
||||
* MTLResourceStorageModeShared. */
|
||||
if (strstr(mem.name, "RenderBuffers")) {
|
||||
options = MTLResourceStorageModeManaged;
|
||||
}
|
||||
|
@ -769,9 +770,11 @@ void MetalDevice::tex_alloc(device_texture &mem)
|
|||
/* Check that dimensions fit within maximum allowable size.
|
||||
See https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
|
||||
*/
|
||||
if (mem.data_width > 16384 ||
|
||||
mem.data_height > 16384) {
|
||||
set_error(string_printf("Texture exceeds maximum allowed size of 16384 x 16384 (requested: %zu x %zu)", mem.data_width, mem.data_height));
|
||||
if (mem.data_width > 16384 || mem.data_height > 16384) {
|
||||
set_error(string_printf(
|
||||
"Texture exceeds maximum allowed size of 16384 x 16384 (requested: %zu x %zu)",
|
||||
mem.data_width,
|
||||
mem.data_height));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,8 +167,11 @@ static void update_cache_node_create_ex(GPencilUpdateCache *root_cache,
|
|||
}
|
||||
|
||||
GPencilUpdateCache *gps_cache = update_cache_alloc(gps_index, node_flag, (bGPDstroke *)data);
|
||||
BLI_dlrbTree_add(
|
||||
gpf_node->cache->children, cache_node_compare, cache_node_alloc, cache_node_update, gps_cache);
|
||||
BLI_dlrbTree_add(gpf_node->cache->children,
|
||||
cache_node_compare,
|
||||
cache_node_alloc,
|
||||
cache_node_update,
|
||||
gps_cache);
|
||||
|
||||
BLI_dlrbTree_linkedlist_sync(gpf_node->cache->children);
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ void BLI_dlrbTree_free(DLRBT_Tree *tree, DLRBT_NFree_FP free_cb)
|
|||
if (tree->first) {
|
||||
/* free list */
|
||||
if (free_cb) {
|
||||
LISTBASE_FOREACH_MUTABLE(DLRBT_Node *, node, tree) {
|
||||
LISTBASE_FOREACH_MUTABLE (DLRBT_Node *, node, tree) {
|
||||
free_cb(node);
|
||||
}
|
||||
BLI_listbase_clear((ListBase *)tree);
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#include "DNA_ID.h"
|
||||
|
||||
#include "intern/eval/deg_eval_runtime_backup_animation.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_gpencil.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_movieclip.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_object.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_scene.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_sound.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_volume.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_gpencil.h"
|
||||
|
||||
namespace blender {
|
||||
namespace deg {
|
||||
|
|
|
@ -38,7 +38,7 @@ class GPencilBackup {
|
|||
void init_from_gpencil(bGPdata *gpd);
|
||||
void restore_to_gpencil(bGPdata *gpd);
|
||||
|
||||
const Depsgraph* depsgraph;
|
||||
const Depsgraph *depsgraph;
|
||||
};
|
||||
|
||||
} // namespace deg
|
||||
|
|
|
@ -326,7 +326,8 @@ typedef struct bGPDstroke {
|
|||
/** Curve used to edit the stroke using Bezier handlers. */
|
||||
struct bGPDcurve *editcurve;
|
||||
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_stroke_copy_settings as well! */
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_stroke_copy_settings as
|
||||
* well! */
|
||||
|
||||
bGPDstroke_Runtime runtime;
|
||||
void *_pad5;
|
||||
|
@ -412,7 +413,8 @@ typedef struct bGPDframe {
|
|||
/** Keyframe type (eBezTriple_KeyframeType). */
|
||||
short key_type;
|
||||
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_frame_copy_settings as well! */
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_frame_copy_settings as
|
||||
* well! */
|
||||
|
||||
bGPDframe_Runtime runtime;
|
||||
} bGPDframe;
|
||||
|
@ -537,7 +539,8 @@ typedef struct bGPDlayer {
|
|||
float layer_mat[4][4], layer_invmat[4][4];
|
||||
char _pad3[4];
|
||||
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_layer_copy_settings as well! */
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_layer_copy_settings as
|
||||
* well! */
|
||||
|
||||
bGPDlayer_Runtime runtime;
|
||||
} bGPDlayer;
|
||||
|
@ -735,7 +738,8 @@ typedef struct bGPdata {
|
|||
|
||||
bGPgrid grid;
|
||||
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_data_copy_settings as well! */
|
||||
/* NOTE: When adding new members, make sure to add them to BKE_gpencil_data_copy_settings as
|
||||
* well! */
|
||||
|
||||
bGPdata_Runtime runtime;
|
||||
} bGPdata;
|
||||
|
|
|
@ -180,12 +180,12 @@ static const EnumPropertyItem rna_enum_gpencil_caps_modes_items[] = {
|
|||
|
||||
static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
||||
{
|
||||
#if 0
|
||||
# if 0
|
||||
/* In case a property on a layer changed, tag it with a light update. */
|
||||
if (ptr->type == &RNA_GPencilLayer) {
|
||||
BKE_gpencil_tag_light_update((bGPdata *)(ptr->owner_id), (bGPDlayer *)(ptr->data), NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);
|
||||
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue