the mutex struct seems to be different across systems, use memset rather then an initializer value.

also quiet warning in cycles.
This commit is contained in:
Campbell Barton 2012-06-25 11:19:38 +00:00
parent 23f632a49c
commit 158a70c8a3
2 changed files with 3 additions and 2 deletions

@ -191,7 +191,7 @@ __device int triangle_find_attribute(KernelGlobals *kg, ShaderData *sd, uint id)
attr_map = kernel_tex_fetch(__attributes_map, ++attr_offset);
/* return result */
return (attr_map.y == ATTR_ELEMENT_NONE)? ATTR_STD_NOT_FOUND: attr_map.z;
return (attr_map.y == ATTR_ELEMENT_NONE) ? (int)ATTR_STD_NOT_FOUND : attr_map.z;
}
__device float4 triangle_motion_vector(KernelGlobals *kg, ShaderData *sd)

@ -33,11 +33,12 @@ extern "C" {
#include "COM_WorkScheduler.h"
#include "OCL_opencl.h"
static ThreadMutex compositorMutex = {(0)};
static ThreadMutex compositorMutex;
static char is_compositorMutex_init = FALSE;
void COM_execute(RenderData *rd, bNodeTree *editingtree, int rendering)
{
if (is_compositorMutex_init == FALSE) { /// TODO: move to blender startup phase
memset(&compositorMutex, 0, sizeof(compositorMutex));
BLI_mutex_init(&compositorMutex);
OCL_init();
WorkScheduler::initialize(); ///TODO: call workscheduler.deinitialize somewhere