[Bf-blender-cvs] [fe552bf236f] master: Cleanup: make format
Brecht Van Lommel
noreply at git.blender.org
Thu Jan 19 22:48:19 CET 2023
Commit: fe552bf236fcbff92f54299e575c5eda74cfb57f
Author: Brecht Van Lommel
Date: Thu Jan 19 22:30:10 2023 +0100
Branches: master
https://developer.blender.org/rBfe552bf236fcbff92f54299e575c5eda74cfb57f
Cleanup: make format
===================================================================
M intern/cycles/device/metal/device_impl.mm
M intern/cycles/device/metal/kernel.mm
M intern/cycles/kernel/data_template.h
M intern/cycles/kernel/osl/types.h
===================================================================
diff --git a/intern/cycles/device/metal/device_impl.mm b/intern/cycles/device/metal/device_impl.mm
index 917945fbdb6..453418386a4 100644
--- a/intern/cycles/device/metal/device_impl.mm
+++ b/intern/cycles/device/metal/device_impl.mm
@@ -335,9 +335,11 @@ void MetalDevice::make_source(MetalPipelineType pso_type, const uint kernel_feat
# define KERNEL_STRUCT_MEMBER(parent, _type, name) \
if (next_member_is_specialized) { \
baked_constants += string(#parent "." #name "=") + \
- to_string(_type(launch_params.data.parent.name)) + "\n"; \
- } else { \
- string_replace(source, "kernel_data_" #parent "_" #name, "kernel_data." #parent ".__unused_" #name); \
+ to_string(_type(launch_params.data.parent.name)) + "\n"; \
+ } \
+ else { \
+ string_replace( \
+ source, "kernel_data_" #parent "_" #name, "kernel_data." #parent ".__unused_" #name); \
next_member_is_specialized = true; \
}
diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm
index febce2840ea..6312c5f88ee 100644
--- a/intern/cycles/device/metal/kernel.mm
+++ b/intern/cycles/device/metal/kernel.mm
@@ -467,7 +467,8 @@ static MTLFunctionConstantValues *GetConstantValues(KernelData const *data = nul
# define KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE next_member_is_specialized = false;
# define KERNEL_STRUCT_MEMBER(parent, _type, name) \
- [constant_values setConstantValue:next_member_is_specialized ? (void*)&data->parent.name : (void*)&zero_data \
+ [constant_values setConstantValue:next_member_is_specialized ? (void *)&data->parent.name : \
+ (void *)&zero_data \
type:MTLDataType_##_type \
atIndex:KernelData_##parent##_##name]; \
next_member_is_specialized = true;
diff --git a/intern/cycles/kernel/data_template.h b/intern/cycles/kernel/data_template.h
index f1589a4d10b..fd25644e56b 100644
--- a/intern/cycles/kernel/data_template.h
+++ b/intern/cycles/kernel/data_template.h
@@ -14,7 +14,6 @@
# define KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE
#endif
-
/* Background. */
KERNEL_STRUCT_BEGIN(KernelBackground, background)
@@ -183,9 +182,12 @@ KERNEL_STRUCT_MEMBER(integrator, float, sample_clamp_indirect)
KERNEL_STRUCT_MEMBER(integrator, int, use_caustics)
/* Sampling pattern. */
KERNEL_STRUCT_MEMBER(integrator, int, sampling_pattern)
-KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE KERNEL_STRUCT_MEMBER(integrator, int, tabulated_sobol_sequence_size)
-KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE KERNEL_STRUCT_MEMBER(integrator, int, sobol_index_mask)
KERNEL_STRUCT_MEMBER(integrator, float, scrambling_distance)
+/* Sobol pattern. */
+KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE
+KERNEL_STRUCT_MEMBER(integrator, int, tabulated_sobol_sequence_size)
+KERNEL_STRUCT_MEMBER_DONT_SPECIALIZE
+KERNEL_STRUCT_MEMBER(integrator, int, sobol_index_mask)
/* Volume render. */
KERNEL_STRUCT_MEMBER(integrator, int, use_volumes)
KERNEL_STRUCT_MEMBER(integrator, int, volume_max_steps)
diff --git a/intern/cycles/kernel/osl/types.h b/intern/cycles/kernel/osl/types.h
index 528f07ad58c..67d0073f48d 100644
--- a/intern/cycles/kernel/osl/types.h
+++ b/intern/cycles/kernel/osl/types.h
@@ -90,9 +90,11 @@ struct ShaderGlobals {
int backfacing;
};
-struct OSLNoiseOptions {};
+struct OSLNoiseOptions {
+};
-struct OSLTextureOptions {};
+struct OSLTextureOptions {
+};
#define OSL_TEXTURE_HANDLE_TYPE_IES ((uintptr_t)0x2 << 30)
#define OSL_TEXTURE_HANDLE_TYPE_SVM ((uintptr_t)0x1 << 30)
More information about the Bf-blender-cvs
mailing list