Cycles: attempted fixes for OS X preview render problem, and disable
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 14 Sep 2011 22:26:55 +0000 (22:26 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 14 Sep 2011 22:26:55 +0000 (22:26 +0000)
kernel cache there now as well since it seems to give issues there.

intern/cycles/CMakeLists.txt
intern/cycles/device/device.cpp
intern/cycles/device/device_network.h
intern/cycles/device/device_opencl.cpp
intern/cycles/render/session.h
intern/cycles/render/tile.cpp

index 74bac846aa41495903c68c60c6200c07c282c525..0041f11c288475e09faa0aeb0b2bc650640a835a 100644 (file)
@@ -8,7 +8,7 @@ include(cmake/external_libs.cmake)
 # Build Flags
 
 set(GCC_WARNING_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-long-long")
-set(GCC_OPTIM_FLAGS "-ffast-math -fPIC -msse -msse2 -msse3 -mtune=native")
+set(GCC_OPTIM_FLAGS "-ffast-math -msse -msse2 -msse3 -mtune=native")
 
 if(APPLE)
        set(CMAKE_CXX_FLAGS "${GCC_WARNING_FLAGS} ${GCC_OPTIM_FLAGS}")
index ab57d7cfe86cf3fcf8772155fb3db2c2026758e4..6ba50154dace34dafce888d37474b8d7915efcbc 100644 (file)
@@ -108,7 +108,7 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int width, in
 
        /* for multi devices, this assumes the ineffecient method that we allocate
           all pixels on the device even though we only render to a subset */
-       pixels += sizeof(uint8_t)*4*y*w;
+       pixels += 4*y*w;
 
        glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
 
index ebb1e43a7a707cc42c30077c24d0b49aad1970ed..775517586d328ce490a7a5a32907ce2cf17a155c 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef __DEVICE_NETWORK_H__
 #define __DEVICE_NETWORK_H__
 
+#ifdef WITH_NETWORK
+
 #include <boost/archive/text_iarchive.hpp>
 #include <boost/archive/text_oarchive.hpp>
 #include <boost/array.hpp>
@@ -300,5 +302,7 @@ private:
 
 CCL_NAMESPACE_END
 
+#endif
+
 #endif /* __DEVICE_NETWORK_H__ */
 
index a41238ffe0931d57f4424cbf7853ef3b5cd1eeb7..b58dfe7f1689a65468cb12e0a3ad09f8b0f6b58c 100644 (file)
@@ -353,19 +353,23 @@ public:
                string clbin = string_printf("cycles_kernel_%s_%s.clbin", device_md5.c_str(), kernel_md5.c_str());;
                clbin = path_user_get(path_join("cache", clbin));
 
+#ifndef __APPLE__
                if(path_exists(clbin)) {
                        /* if exists already, try use it */
                        if(!load_binary(kernel_path, clbin))
                                return false;
                }
                else {
+#endif
                        /* compile kernel */
                        if(!compile_kernel(kernel_path, kernel_md5))
                                return false;
 
+#ifndef __APPLE__
                        /* save binary for reuse */
                        save_binary(clbin);
                }
+#endif
 
                /* find kernels */
                ckPathTraceKernel = clCreateKernel(cpProgram, "kernel_ocl_path_trace", &ciErr);
index ca775939c094136b981e081d9af3afff7f260d72..4d5cf4340988a874873877834b6374234eb028fe 100644 (file)
@@ -58,7 +58,7 @@ public:
                background = false;
                output_path = "";
 
-               progressive = true;
+               progressive = false;
                passes = INT_MAX;
                tile_size = 64;
                min_size = 64;
index 61f3af7aa101723a47a2ba642576fd8e71b0f9ef..450090c42f83a5ea69c6b8d617288571de8fbecd 100644 (file)
@@ -96,7 +96,7 @@ void TileManager::set_tiles()
 
 bool TileManager::done()
 {
-       return (state.pass+1 >= passes && state.resolution == 1);
+       return (state.pass+1 >= passes);
 }
 
 bool TileManager::next()