forked from bartvdbraak/blender
Cleanup: format
This commit is contained in:
parent
52ded6ab56
commit
86ceb6722f
@ -116,7 +116,9 @@ class MetalDevice : public Device {
|
||||
|
||||
bool use_local_atomic_sort() const;
|
||||
|
||||
string preprocess_source(MetalPipelineType pso_type, const uint kernel_features, string* source = nullptr);
|
||||
string preprocess_source(MetalPipelineType pso_type,
|
||||
const uint kernel_features,
|
||||
string *source = nullptr);
|
||||
|
||||
bool make_source_and_check_if_compile_needed(MetalPipelineType pso_type);
|
||||
|
||||
|
@ -310,7 +310,9 @@ bool MetalDevice::use_local_atomic_sort() const
|
||||
return DebugFlags().metal.use_local_atomic_sort;
|
||||
}
|
||||
|
||||
string MetalDevice::preprocess_source(MetalPipelineType pso_type, const uint kernel_features, string* source)
|
||||
string MetalDevice::preprocess_source(MetalPipelineType pso_type,
|
||||
const uint kernel_features,
|
||||
string *source)
|
||||
{
|
||||
string global_defines;
|
||||
if (use_adaptive_compilation()) {
|
||||
@ -463,7 +465,8 @@ bool MetalDevice::make_source_and_check_if_compile_needed(MetalPipelineType pso_
|
||||
|
||||
# define KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE next_member_is_specialized = false;
|
||||
|
||||
/* Add specialization constants to md5 so that 'get_best_pipeline' is able to return a suitable match. */
|
||||
/* Add specialization constants to md5 so that 'get_best_pipeline' is able to return a suitable
|
||||
* match. */
|
||||
# define KERNEL_STRUCT_MEMBER(parent, _type, name) \
|
||||
if (next_member_is_specialized) { \
|
||||
constant_values += string(#parent "." #name "=") + \
|
||||
|
@ -215,11 +215,8 @@ class GHOST_IWindow {
|
||||
* Needs to be called after each swap events as the framebuffer will change.
|
||||
* \return A boolean success indicator.
|
||||
*/
|
||||
virtual GHOST_TSuccess getVulkanBackbuffer(void *image,
|
||||
void *framebuffer,
|
||||
void *render_pass,
|
||||
void *extent,
|
||||
uint32_t *fb_id) = 0;
|
||||
virtual GHOST_TSuccess getVulkanBackbuffer(
|
||||
void *image, void *framebuffer, void *render_pass, void *extent, uint32_t *fb_id) = 0;
|
||||
|
||||
/**
|
||||
* Invalidates the contents of this window.
|
||||
|
@ -107,14 +107,10 @@ uint GHOST_Window::getDefaultFramebuffer()
|
||||
return (m_context) ? m_context->getDefaultFramebuffer() : 0;
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_Window::getVulkanBackbuffer(void *image,
|
||||
void *framebuffer,
|
||||
void *render_pass,
|
||||
void *extent,
|
||||
uint32_t *fb_id)
|
||||
GHOST_TSuccess GHOST_Window::getVulkanBackbuffer(
|
||||
void *image, void *framebuffer, void *render_pass, void *extent, uint32_t *fb_id)
|
||||
{
|
||||
return m_context->getVulkanBackbuffer(
|
||||
image, framebuffer, render_pass, extent, fb_id);
|
||||
return m_context->getVulkanBackbuffer(image, framebuffer, render_pass, extent, fb_id);
|
||||
}
|
||||
|
||||
GHOST_TSuccess GHOST_Window::activateDrawingContext()
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
|
||||
|
||||
/* Extended file attribute used by OneDrive to mark placeholder files. */
|
||||
static const char *ONEDRIVE_RECALLONOPEN_ATTRIBUTE = "com.microsoft.OneDrive.RecallOnOpen";
|
||||
|
||||
@ -188,7 +187,8 @@ const char *BLI_expand_tilde(const char *path_with_tilde)
|
||||
return path_expanded;
|
||||
}
|
||||
|
||||
char *BLI_current_working_dir(char *dir, const size_t maxncpy) {
|
||||
char *BLI_current_working_dir(char *dir, const size_t maxncpy)
|
||||
{
|
||||
/* Can't just copy to the *dir pointer, as [path getCString gets grumpy.*/
|
||||
static char path_expanded[PATH_MAX];
|
||||
@autoreleasepool {
|
||||
@ -200,7 +200,8 @@ char *BLI_current_working_dir(char *dir, const size_t maxncpy) {
|
||||
}
|
||||
}
|
||||
|
||||
bool BLI_change_working_dir(const char* dir) {
|
||||
bool BLI_change_working_dir(const char *dir)
|
||||
{
|
||||
@autoreleasepool {
|
||||
NSString *path = [[NSString alloc] initWithUTF8String:dir];
|
||||
if ([[NSFileManager defaultManager] changeCurrentDirectoryPath:path] == YES) {
|
||||
|
@ -234,7 +234,6 @@ static void build_poly_connections(blender::AtomicDisjointSet &islands,
|
||||
/* Polys are connected if they share edges. By connecting all edges of a loop (as long as they
|
||||
* are not a seam) we can find connected faces. */
|
||||
threading::parallel_for(polys.index_range(), 1024, [&](const IndexRange range) {
|
||||
|
||||
for (const int poly_index : range) {
|
||||
if (hide_poly[poly_index]) {
|
||||
continue;
|
||||
@ -259,9 +258,7 @@ static void build_poly_connections(blender::AtomicDisjointSet &islands,
|
||||
islands.join(inner_mloop.e, outer_mloop.e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,8 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime)
|
||||
Mesh *mesh = (Mesh *)object_->data;
|
||||
|
||||
is_initial_load_ = true;
|
||||
const USDMeshReadParams params = create_mesh_read_params(motionSampleTime, import_params_.mesh_read_flag);
|
||||
const USDMeshReadParams params = create_mesh_read_params(motionSampleTime,
|
||||
import_params_.mesh_read_flag);
|
||||
|
||||
Mesh *read_mesh = this->read_mesh(mesh, params, nullptr);
|
||||
|
||||
@ -850,7 +851,8 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
|
||||
}
|
||||
}
|
||||
|
||||
read_mesh_sample(&settings, active_mesh, params.motion_sample_time, new_mesh || is_initial_load_);
|
||||
read_mesh_sample(
|
||||
&settings, active_mesh, params.motion_sample_time, new_mesh || is_initial_load_);
|
||||
|
||||
if (new_mesh) {
|
||||
/* Here we assume that the number of materials doesn't change, i.e. that
|
||||
@ -862,7 +864,8 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
|
||||
bke::MutableAttributeAccessor attributes = active_mesh->attributes_for_write();
|
||||
bke::SpanAttributeWriter<int> material_indices =
|
||||
attributes.lookup_or_add_for_write_span<int>("material_index", ATTR_DOMAIN_FACE);
|
||||
assign_facesets_to_material_indices(params.motion_sample_time, material_indices.span, &mat_map);
|
||||
assign_facesets_to_material_indices(
|
||||
params.motion_sample_time, material_indices.span, &mat_map);
|
||||
material_indices.finish();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user