[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36466] branches/cycles: Cycles: first batch of windows build fixes, not quite there yet.
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue May 3 20:29:11 CEST 2011
Revision: 36466
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36466
Author: blendix
Date: 2011-05-03 18:29:11 +0000 (Tue, 03 May 2011)
Log Message:
-----------
Cycles: first batch of windows build fixes, not quite there yet.
Modified Paths:
--------------
branches/cycles/intern/cycles/blender/CMakeLists.txt
branches/cycles/intern/cycles/blender/blender_camera.cpp
branches/cycles/intern/cycles/blender/blender_util.h
branches/cycles/intern/cycles/bvh/bvh.cpp
branches/cycles/intern/cycles/bvh/bvh.h
branches/cycles/intern/cycles/bvh/bvh_build.cpp
branches/cycles/intern/cycles/cmake/external_libs.cmake
branches/cycles/intern/cycles/cmake/platforms.cmake
branches/cycles/intern/cycles/device/CMakeLists.txt
branches/cycles/intern/cycles/device/device_cuda.cpp
branches/cycles/intern/cycles/kernel/kernel_film.h
branches/cycles/intern/cycles/kernel/svm/svm_noise.h
branches/cycles/intern/cycles/kernel/svm/svm_texture.h
branches/cycles/intern/cycles/render/CMakeLists.txt
branches/cycles/intern/cycles/render/buffers.h
branches/cycles/intern/cycles/render/nodes.cpp
branches/cycles/intern/cycles/render/object.h
branches/cycles/intern/cycles/render/shader.h
branches/cycles/intern/cycles/render/svm.h
branches/cycles/intern/cycles/subd/subd_build.cpp
branches/cycles/intern/cycles/subd/subd_split.cpp
branches/cycles/intern/cycles/util/util_map.h
branches/cycles/intern/cycles/util/util_math.h
branches/cycles/intern/cycles/util/util_set.h
branches/cycles/intern/cycles/util/util_types.h
branches/cycles/intern/guardedalloc/MEM_guardedalloc.h
branches/cycles/source/blender/makesrna/RNA_types.h
branches/cycles/source/blender/makesrna/intern/makesrna.c
Modified: branches/cycles/intern/cycles/blender/CMakeLists.txt
===================================================================
--- branches/cycles/intern/cycles/blender/CMakeLists.txt 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/blender/CMakeLists.txt 2011-05-03 18:29:11 UTC (rev 36466)
@@ -29,7 +29,8 @@
../util
../subd
${BLENDER_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS})
+ ${PYTHON_INCLUDE_DIRS}
+ ${GLEW_INCLUDE_PATH})
SET(LIBRARIES
cycles_render
@@ -41,7 +42,6 @@
${Boost_LIBRARIES}
${OPENGL_LIBRARIES}
${OPENIMAGEIO_LIBRARY}
- ${PYTHON_LIBRARIES}
${GLUT_LIBRARIES}
${GLEW_LIBRARIES}
${BLENDER_LIBRARIES})
@@ -58,10 +58,21 @@
LIST(APPEND LIBRARIES ${OPENCL_LIBRARIES})
ENDIF()
+LINK_DIRECTORIES(${PYTHON_LIBPATH})
SET(CMAKE_MODULE_LINKER_FLAGS ${PYTHON_MODULE_FLAGS})
ADD_LIBRARY(cycles_blender MODULE ${sources} ${headers})
ADD_DEPENDENCIES(cycles_blender bf_rna)
+
+IF(WIN32)
+ TARGET_LINK_LIBRARIES(cycles_blender ${PYTHON_LINKFLAGS})
+ TARGET_LINK_LIBRARIES(cycles_blender debug ${PYTHON_LIBRARY}_d)
+ TARGET_LINK_LIBRARIES(cycles_blender optimized ${PYTHON_LIBRARY})
+
+ SET_TARGET_PROPERTIES(cycles_blender PROPERTIES PREFIX "lib")
+ SET_TARGET_PROPERTIES(cycles_blender PROPERTIES SUFFIX ".pyd")
+ENDIF()
+
TARGET_LINK_LIBRARIES(cycles_blender ${LIBRARIES})
INSTALL(FILES ${addonfiles} DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
@@ -71,3 +82,13 @@
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES INSTALL_RPATH $ORIGIN/lib)
ENDIF()
+# Install DLL's
+
+IF(WIN32)
+ FILE(GLOB OIIO_DLLS "${CYCLES_OIIO}/bin/*.dll")
+ FILE(GLOB BOOST_DLLS "${CYCLES_BOOST}/lib/*.dll")
+ INSTALL(FILES ${OIIO_DLLS} ${BOOST_DLLS}
+ DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
+ENDIF()
+
+
Modified: branches/cycles/intern/cycles/blender/blender_camera.cpp
===================================================================
--- branches/cycles/intern/cycles/blender/blender_camera.cpp 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/blender/blender_camera.cpp 2011-05-03 18:29:11 UTC (rev 36466)
@@ -218,7 +218,7 @@
blender_camera_from_object(&bcam, b_ob);
/* magic zoom formula */
- bcam.zoom = b_rv3d.view_camera_zoom();
+ bcam.zoom = (float)b_rv3d.view_camera_zoom();
bcam.zoom = (1.41421f + bcam.zoom/50.0f);
bcam.zoom *= bcam.zoom;
bcam.zoom = 2.0f/bcam.zoom;
Modified: branches/cycles/intern/cycles/blender/blender_util.h
===================================================================
--- branches/cycles/intern/cycles/blender/blender_util.h 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/blender/blender_util.h 2011-05-03 18:29:11 UTC (rev 36466)
@@ -77,7 +77,7 @@
static inline bool object_is_modified(BL::Object self, BL::Scene scene, bool preview)
{
- return rna_Object_is_modified(self.ptr.data, scene.ptr.data, (preview)? (1<<0): (1<<1));
+ return rna_Object_is_modified(self.ptr.data, scene.ptr.data, (preview)? (1<<0): (1<<1))? true: false;
}
/* Utilities */
@@ -139,7 +139,7 @@
static inline bool get_boolean(PointerRNA& ptr, const char *name)
{
- return RNA_boolean_get(&ptr, name);
+ return RNA_boolean_get(&ptr, name)? true: false;
}
static inline float get_float(PointerRNA& ptr, const char *name)
Modified: branches/cycles/intern/cycles/bvh/bvh.cpp
===================================================================
--- branches/cycles/intern/cycles/bvh/bvh.cpp 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/bvh/bvh.cpp 2011-05-03 18:29:11 UTC (rev 36466)
@@ -467,7 +467,7 @@
assert(!params.top_level);
BoundBox bbox;
- refit_node(0, pack.is_leaf[0], bbox);
+ refit_node(0, (pack.is_leaf[0])? true: false, bbox);
}
void RegularBVH::refit_node(int idx, bool leaf, BoundBox& bbox)
Modified: branches/cycles/intern/cycles/bvh/bvh.h
===================================================================
--- branches/cycles/intern/cycles/bvh/bvh.h 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/bvh/bvh.h 2011-05-03 18:29:11 UTC (rev 36466)
@@ -26,7 +26,7 @@
CCL_NAMESPACE_BEGIN
class BVHNode;
-class BVHStackEntry;
+struct BVHStackEntry;
class BVHParams;
class BoundBox;
class CacheData;
Modified: branches/cycles/intern/cycles/bvh/bvh_build.cpp
===================================================================
--- branches/cycles/intern/cycles/bvh/bvh_build.cpp 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/bvh/bvh_build.cpp 2011-05-03 18:29:11 UTC (rev 36466)
@@ -359,8 +359,8 @@
const Reference& ref = references[refIdx];
float3 firstBinf = (ref.bounds.min - origin) * invBinSize;
float3 lastBinf = (ref.bounds.max - origin) * invBinSize;
- int3 firstBin = make_int3(firstBinf.x, firstBinf.y, firstBinf.z);
- int3 lastBin = make_int3(lastBinf.x, lastBinf.y, lastBinf.z);
+ int3 firstBin = make_int3((int)firstBinf.x, (int)firstBinf.y, (int)firstBinf.z);
+ int3 lastBin = make_int3((int)lastBinf.x, (int)lastBinf.y, (int)lastBinf.z);
firstBin = clamp(firstBin, 0, BVHParams::NUM_SPATIAL_BINS - 1);
lastBin = clamp(lastBin, firstBin, BVHParams::NUM_SPATIAL_BINS - 1);
Modified: branches/cycles/intern/cycles/cmake/external_libs.cmake
===================================================================
--- branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-05-03 18:29:11 UTC (rev 36466)
@@ -8,9 +8,6 @@
"1.41" "1.41.0" "1.40" "1.40.0"
"1.39" "1.39.0" "1.38" "1.38.0"
"1.37" "1.37.0" "1.34.1" "1_34_1")
-IF(LINKSTATIC)
- SET(Boost_USE_STATIC_LIBS ON)
-ENDIF()
SET(Boost_USE_MULTITHREADED ON)
@@ -25,6 +22,8 @@
INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}")
LINK_DIRECTORIES("${Boost_LIBRARY_DIRS}")
+ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
+
IF(WITH_CYCLES_NETWORK)
ADD_DEFINITIONS(-DWITH_NETWORK)
ENDIF()
@@ -126,8 +125,10 @@
${CMAKE_SOURCE_DIR}/source/blender/blenloader
${CMAKE_BINARY_DIR}/source/blender/makesrna/intern)
IF(WIN32)
- SET(BLENDER_LIBRARIES ${CMAKE_BINARY_DIR}/bin/Release/blender.lib)
+ SET(BLENDER_LIBRARIES ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/blender.lib)
ENDIF()
+
+ ADD_DEFINITIONS(-DBLENDER_PLUGIN)
ENDIF()
###########################################################################
Modified: branches/cycles/intern/cycles/cmake/platforms.cmake
===================================================================
--- branches/cycles/intern/cycles/cmake/platforms.cmake 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/cmake/platforms.cmake 2011-05-03 18:29:11 UTC (rev 36466)
@@ -11,7 +11,7 @@
ENDIF(APPLE)
IF(WIN32)
- SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS /EHsc /fp:fast")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /EHsc /fp:fast")
SET(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
SET(PYTHON_MODULE_FLAGS "-DLL")
ENDIF(WIN32)
Modified: branches/cycles/intern/cycles/device/CMakeLists.txt
===================================================================
--- branches/cycles/intern/cycles/device/CMakeLists.txt 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/device/CMakeLists.txt 2011-05-03 18:29:11 UTC (rev 36466)
@@ -7,7 +7,7 @@
../util
../render
${OPENGL_INCLUDE_DIR}
- ${GLEW_INCLUDE_DIR})
+ ${GLEW_INCLUDE_PATH})
SET(sources
device.cpp
Modified: branches/cycles/intern/cycles/device/device_cuda.cpp
===================================================================
--- branches/cycles/intern/cycles/device/device_cuda.cpp 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/device/device_cuda.cpp 2011-05-03 18:29:11 UTC (rev 36466)
@@ -356,7 +356,8 @@
cuda_assert(cuParamSetv(cuPathTrace, offset, &d_rng_state, sizeof(d_rng_state)))
offset += sizeof(d_rng_state);
- offset = cuda_align_up(offset, __alignof(task.pass));
+ int pass = task.pass;
+ offset = cuda_align_up(offset, __alignof(pass));
cuda_assert(cuParamSeti(cuPathTrace, offset, task.pass))
offset += sizeof(task.pass);
@@ -413,7 +414,8 @@
cuda_assert(cuParamSetv(cuFilmConvert, offset, &d_buffer, sizeof(d_buffer)))
offset += sizeof(d_buffer);
- offset = cuda_align_up(offset, __alignof(task.pass));
+ int pass = task.pass;
+ offset = cuda_align_up(offset, __alignof(pass));
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.pass))
offset += sizeof(task.pass);
@@ -475,7 +477,8 @@
cuda_assert(cuParamSetv(cuDisplace, offset, &d_offset, sizeof(d_offset)))
offset += sizeof(d_offset);
- offset = cuda_align_up(offset, __alignof(task.displace_x));
+ int displace_x = task.displace_x;
+ offset = cuda_align_up(offset, __alignof(displace_x));
cuda_assert(cuParamSeti(cuDisplace, offset, task.displace_x))
offset += sizeof(task.displace_x);
@@ -621,18 +624,18 @@
glColor3f(1.0f, 1.0f, 1.0f);
glPushMatrix();
- glTranslatef(0, y, 0.0f);
+ glTranslatef(0.0f, (float)y, 0.0f);
glBegin(GL_QUADS);
- glTexCoord2f(0, 0);
- glVertex2f(0, 0);
+ glTexCoord2f(0.0f, 0.0f);
+ glVertex2f(0.0f, 0.0f);
glTexCoord2f((float)w/(float)width, 0);
- glVertex2f(width, 0);
+ glVertex2f((float)width, 0.0f);
glTexCoord2f((float)w/(float)width, (float)h/(float)height);
- glVertex2f(width, height);
- glTexCoord2f(0, (float)h/(float)height);
- glVertex2f(0, height);
+ glVertex2f((float)width, (float)height);
+ glTexCoord2f(0.0f, (float)h/(float)height);
+ glVertex2f(0.0f, (float)height);
glEnd();
Modified: branches/cycles/intern/cycles/kernel/kernel_film.h
===================================================================
--- branches/cycles/intern/cycles/kernel/kernel_film.h 2011-05-03 15:30:16 UTC (rev 36465)
+++ branches/cycles/intern/cycles/kernel/kernel_film.h 2011-05-03 18:29:11 UTC (rev 36466)
@@ -44,9 +44,9 @@
uchar4 result;
/* simple float to byte conversion */
- result.x = clamp(color.x*255.0f, 0.0f, 255.0f);
- result.y = clamp(color.y*255.0f, 0.0f, 255.0f);
- result.z = clamp(color.z*255.0f, 0.0f, 255.0f);
+ result.x = (uchar)clamp(color.x*255.0f, 0.0f, 255.0f);
+ result.y = (uchar)clamp(color.y*255.0f, 0.0f, 255.0f);
+ result.z = (uchar)clamp(color.z*255.0f, 0.0f, 255.0f);
result.w = 255;
return result;
Modified: branches/cycles/intern/cycles/kernel/svm/svm_noise.h
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list