[Bf-blender-cvs] [7921413] soc-2016-cycles_denoising: Cycles: Once again fix MSVC building

Lukas Stockner noreply at git.blender.org
Fri Jul 8 04:31:38 CEST 2016


Commit: 7921413fde872b699c10d446abced765e1b7bfa4
Author: Lukas Stockner
Date:   Fri Jul 8 03:39:37 2016 +0200
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rB7921413fde872b699c10d446abced765e1b7bfa4

Cycles: Once again fix MSVC building

Apparently, MSVC doesn't like enum values being larger than 32 bit.
So, for now the enum entries are just #define'd instead.

===================================================================

M	source/blender/makesdna/DNA_scene_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 1910388..ce7560c 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -267,17 +267,16 @@ typedef enum ScenePassType {
 	SCE_PASS_DEBUG                    = (1 << 31),  /* This is a virtual pass. */
 } ScenePassType;
 
-typedef enum SceneExtendedPassType {
-	SCE_PASS_DENOISE_NORMAL           = (((uint64_t) 1) << 32),
-	SCE_PASS_DENOISE_NORMAL_VAR       = (((uint64_t) 1) << 33),
-	SCE_PASS_DENOISE_ALBEDO           = (((uint64_t) 1) << 34),
-	SCE_PASS_DENOISE_ALBEDO_VAR       = (((uint64_t) 1) << 35),
-	SCE_PASS_DENOISE_DEPTH            = (((uint64_t) 1) << 36),
-	SCE_PASS_DENOISE_DEPTH_VAR        = (((uint64_t) 1) << 37),
-	SCE_PASS_DENOISE_NOISY            = (((uint64_t) 1) << 38), /* The original noisy image (only the components that are denoised). */
-	SCE_PASS_DENOISE_NOISY_VAR        = (((uint64_t) 1) << 39),
-	SCE_PASS_DENOISE_CLEAN            = (((uint64_t) 1) << 40), /* If present, these image components are added to the denoised image. */
-} SceneExtendedPassType;
+/* MSVC doesn't like 64-bit enum values. */
+#define SCE_PASS_DENOISE_NORMAL           (((uint64_t) 1) << 32)
+#define SCE_PASS_DENOISE_NORMAL_VAR       (((uint64_t) 1) << 33)
+#define SCE_PASS_DENOISE_ALBEDO           (((uint64_t) 1) << 34)
+#define SCE_PASS_DENOISE_ALBEDO_VAR       (((uint64_t) 1) << 35)
+#define SCE_PASS_DENOISE_DEPTH            (((uint64_t) 1) << 36)
+#define SCE_PASS_DENOISE_DEPTH_VAR        (((uint64_t) 1) << 37)
+#define SCE_PASS_DENOISE_NOISY            (((uint64_t) 1) << 38) /* The original noisy image (only the components that are denoised). */
+#define SCE_PASS_DENOISE_NOISY_VAR        (((uint64_t) 1) << 39)
+#define SCE_PASS_DENOISE_CLEAN            (((uint64_t) 1) << 40) /* If present, these image components are added to the denoised image. */
 
 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */




More information about the Bf-blender-cvs mailing list