Cycles: Replace use_qbvh boolean flag with an enum-based property
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 19 Jan 2018 09:59:58 +0000 (10:59 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 22 Jan 2018 16:19:20 +0000 (17:19 +0100)
commit2f79d1c0584f4d72984e56db1f5878be3360e044
treef2385b9834d7a9e0c15be92ca5356f4bc91aa247
parent0f69026b1c3c07b203aeba658048f1129e41b116
Cycles: Replace use_qbvh boolean flag with an enum-based property

This was we can introduce other types of BVH, for example, wider ones, without
causing too much mess around boolean flags.

Thoughs:

- Ideally device info should probably return bitflag of what BVH types it
  supports.

  It is possible to implement based on simple logic in device/ and mesh.cpp,
  rest of the changes will stay the same.

- Not happy with workarounds in util_debug and duplicated enum in kernel.
  Maybe enbum should be stores in kernel, but then it's kind of weird to include
  kernel types from utils. Soudns some cyclkic dependency.

Reviewers: brecht, maxim_d33

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3011
23 files changed:
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/bvh/bvh.cpp
intern/cycles/bvh/bvh4.cpp
intern/cycles/bvh/bvh_params.h
intern/cycles/device/device.cpp
intern/cycles/device/device.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_network.cpp
intern/cycles/device/device_opencl.cpp
intern/cycles/kernel/bvh/bvh_local.h
intern/cycles/kernel/bvh/bvh_shadow_all.h
intern/cycles/kernel/bvh/bvh_traversal.h
intern/cycles/kernel/bvh/bvh_volume.h
intern/cycles/kernel/bvh/bvh_volume_all.h
intern/cycles/kernel/kernel_types.h
intern/cycles/render/mesh.cpp
intern/cycles/render/scene.h
intern/cycles/util/util_debug.cpp
intern/cycles/util/util_debug.h