[Bf-blender-cvs] [8033259] soc-2016-cycles_denoising: Fix compilation on MSVC with 64-bit bitmasks in the Pass flag

Lukas Stockner noreply at git.blender.org
Wed Jul 6 04:28:47 CEST 2016


Commit: 80332591caa4490198c841af58d0f1b71c4745f6
Author: Lukas Stockner
Date:   Mon Jul 4 15:51:03 2016 +0200
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rB80332591caa4490198c841af58d0f1b71c4745f6

Fix compilation on MSVC with 64-bit bitmasks in the Pass flag

Apparently MSVC doesn't like the (1UL << x) syntax, so now 1 is explicitly cast to a 64-bit integer before shifting.

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

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 e95b45a..073b405 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -268,15 +268,15 @@ typedef enum ScenePassType {
 } ScenePassType;
 
 typedef enum SceneExtendedPassType {
-	SCE_PASS_DENOISE_NORMAL           = (1UL << 32),
-	SCE_PASS_DENOISE_NORMAL_VAR       = (1UL << 33),
-	SCE_PASS_DENOISE_ALBEDO           = (1UL << 34),
-	SCE_PASS_DENOISE_ALBEDO_VAR       = (1UL << 35),
-	SCE_PASS_DENOISE_DEPTH            = (1UL << 36),
-	SCE_PASS_DENOISE_DEPTH_VAR        = (1UL << 37),
-	SCE_PASS_DENOISE_NOISY            = (1UL << 38), /* The original noisy image (only the components that are denoised). */
-	SCE_PASS_DENOISE_NOISY_VAR        = (1UL << 39),
-	SCE_PASS_DENOISE_CLEAN            = (1UL << 40), /* If present, these image components are added to the denoised image. */
+	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;
 
 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */




More information about the Bf-blender-cvs mailing list