diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-04 10:54:50 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-04 10:54:50 +0300 |
commit | eaf8608ba5e949f0bc81a57bc54822d4283a312a (patch) | |
tree | d9919e7ece856389778a8d14532688615f760235 /intern/cycles | |
parent | cd6daea7d32d306a427e97427cb135d1589cc309 (diff) | |
parent | 4674e02562637f36a9900bff5f5f4acc9aff482d (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/opencl/opencl_util.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/render/mesh_subdivision.cpp | 20 |
2 files changed, 13 insertions, 9 deletions
diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp index a776f48b5e9..78ed401bff5 100644 --- a/intern/cycles/device/opencl/opencl_util.cpp +++ b/intern/cycles/device/opencl/opencl_util.cpp @@ -633,7 +633,7 @@ bool OpenCLInfo::device_supported(const string& platform_name, } const char *blacklist[] = { /* GCN 1 */ - "Tahiti", "Pitcairn", "Capeverde", "Oland", + "Tahiti", "Pitcairn", "Capeverde", "Oland", "Hainan", NULL }; for(int i = 0; blacklist[i] != NULL; i++) { diff --git a/intern/cycles/render/mesh_subdivision.cpp b/intern/cycles/render/mesh_subdivision.cpp index 585ed77b026..ea71f71b655 100644 --- a/intern/cycles/render/mesh_subdivision.cpp +++ b/intern/cycles/render/mesh_subdivision.cpp @@ -204,7 +204,9 @@ public: src = dest; } - patch_table->ComputeLocalPointValues(&verts[0], &verts[num_refiner_verts]); + if(num_refiner_verts) { + patch_table->ComputeLocalPointValues(&verts[0], &verts[num_refiner_verts]); + } /* create patch map */ patch_map = new Far::PatchMap(*patch_table); @@ -236,13 +238,15 @@ public: src = dest; } - if(attr.same_storage(attr.type, TypeDesc::TypeFloat)) { - patch_table->ComputeLocalPointValues((OsdValue<float>*)&attr.buffer[0], - (OsdValue<float>*)&attr.buffer[num_refiner_verts * attr.data_sizeof()]); - } - else { - patch_table->ComputeLocalPointValues((OsdValue<float4>*)&attr.buffer[0], - (OsdValue<float4>*)&attr.buffer[num_refiner_verts * attr.data_sizeof()]); + if(num_refiner_verts) { + if(attr.same_storage(attr.type, TypeDesc::TypeFloat)) { + patch_table->ComputeLocalPointValues((OsdValue<float>*)&attr.buffer[0], + (OsdValue<float>*)&attr.buffer[num_refiner_verts * attr.data_sizeof()]); + } + else { + patch_table->ComputeLocalPointValues((OsdValue<float4>*)&attr.buffer[0], + (OsdValue<float4>*)&attr.buffer[num_refiner_verts * attr.data_sizeof()]); + } } } else if(attr.element == ATTR_ELEMENT_CORNER || attr.element == ATTR_ELEMENT_CORNER_BYTE) { |