Better fix for #36935 and 36316:

* 32 bit GCC builds now have the SSE BVH optimizations turned off, but still
  compile with SSE flags for better performance.

* White color when rendering on Windows seems to have been unrelated to SSE,
  rather it was a graphics driver not supporting half float textures, added a
  check for that now.
This commit is contained in:
Brecht Van Lommel 2013-10-05 19:56:34 +00:00
parent c7882ec3bb
commit e9d03296c7
5 changed files with 9 additions and 8 deletions

@ -34,6 +34,7 @@
#include "util_debug.h"
#include "util_foreach.h"
#include "util_opengl.h"
CCL_NAMESPACE_BEGIN
@ -494,7 +495,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
params.shadingsystem = SessionParams::OSL;
/* color managagement */
params.display_buffer_linear = b_engine.support_display_space_shader(b_scene);
params.display_buffer_linear = GLEW_ARB_half_float_pixel && b_engine.support_display_space_shader(b_scene);
return params;
}

@ -20,7 +20,10 @@
#ifdef WITH_OPTIMIZED_KERNEL
/* SSE optimization disabled for now on 32 bit, see bug #36316 */
#if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
#define __KERNEL_SSE2__
#endif
#include "kernel.h"
#include "kernel_compat_cpu.h"

@ -20,9 +20,12 @@
#ifdef WITH_OPTIMIZED_KERNEL
/* SSE optimization disabled for now on 32 bit, see bug #36316 */
#if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
#define __KERNEL_SSE2__
#define __KERNEL_SSE3__
#define __KERNEL_SSSE3__
#endif
#include "kernel.h"
#include "kernel_compat_cpu.h"

@ -20,12 +20,7 @@
/* OpenGL header includes, used everywhere we use OpenGL, to deal with
* platform differences in one central place. */
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/glew.h>
#endif
#endif /* __UTIL_OPENGL_H__ */

@ -116,8 +116,7 @@ int system_cpu_bits()
return (sizeof(void*)*8);
}
/* SSE optimization disabled for now on 32 bit, see bug #36316 and #36935 */
#if defined(__x86_64__) || defined(_M_X64) // ((defined(i386) || defined(_M_IX86))
#if defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(_M_IX86)
struct CPUCapabilities {
bool x64;