From a9105a7deaccbd98c4e994d8f0f041bef4179bfa Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Fri, 7 Sep 2012 11:06:45 +0000 Subject: Fix for Cycles (CUDA) compilation (again ...). Moved the AttributeStandard enum typedef and the attribute_standard_name mapping function to util_attribute/util_types headers, so they can properly be used by kernel and render files alike. This should avoid any std C includes which are not available in CUDA. Thanks to Sergey for help! --- intern/cycles/kernel/kernel_types.h | 42 ------------------------------------- 1 file changed, 42 deletions(-) (limited to 'intern/cycles/kernel/kernel_types.h') diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 06babe78493..ce21ab994f0 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -19,8 +19,6 @@ #ifndef __KERNEL_TYPES_H__ #define __KERNEL_TYPES_H__ -#include - #include "kernel_math.h" #include "svm/svm_types.h" @@ -354,46 +352,6 @@ typedef enum AttributeElement { ATTR_ELEMENT_NONE } AttributeElement; -typedef enum AttributeStandard { - ATTR_STD_NONE = 0, - ATTR_STD_VERTEX_NORMAL, - ATTR_STD_FACE_NORMAL, - ATTR_STD_UV, - ATTR_STD_GENERATED, - ATTR_STD_POSITION_UNDEFORMED, - ATTR_STD_POSITION_UNDISPLACED, - ATTR_STD_MOTION_PRE, - ATTR_STD_MOTION_POST, - ATTR_STD_PARTICLE, - ATTR_STD_NUM, - - ATTR_STD_NOT_FOUND = ~0 -} AttributeStandard; - -__device std::string attribute_standard_name(AttributeStandard std) -{ - if(std == ATTR_STD_VERTEX_NORMAL) - return std::string("N"); - else if(std == ATTR_STD_FACE_NORMAL) - return std::string("Ng"); - else if(std == ATTR_STD_UV) - return std::string("uv"); - else if(std == ATTR_STD_GENERATED) - return std::string("generated"); - else if(std == ATTR_STD_POSITION_UNDEFORMED) - return std::string("undeformed"); - else if(std == ATTR_STD_POSITION_UNDISPLACED) - return std::string("undisplaced"); - else if(std == ATTR_STD_MOTION_PRE) - return std::string("motion_pre"); - else if(std == ATTR_STD_MOTION_POST) - return std::string("motion_post"); - else if(std == ATTR_STD_PARTICLE) - return std::string("particle"); - - return std::string(); -} - /* Closure data */ #define MAX_CLOSURE 8 -- cgit v1.2.3