Fix cycles OpenCL compile error on AMD, and fix assert in debug builds.

This commit is contained in:
Brecht Van Lommel
2013-10-02 14:41:04 +00:00
parent 8e70db78f4
commit cbb783f1d6
4 changed files with 14 additions and 7 deletions

View File

@@ -892,8 +892,16 @@ public:
void tex_free(device_memory& mem)
{
if(mem.data_pointer)
if(mem.device_pointer) {
foreach(const MemMap::value_type& value, mem_map) {
if(value.second == mem.device_pointer) {
mem_map.erase(value.first);
break;
}
}
mem_free(mem);
}
}
size_t global_size_round_up(int group_size, int global_size)