message: Fix object handle translation on data commit in offload
diff: #include "common/ObjectHandle.h"
  #include "common/World.h"
  #include "geometry/GeometricModel.h"
  +#include "ospray/MPIDistributedDevice.h"
  +#include "render/RenderTask.h"
  #include "rkcommon/utility/ArrayView.h"
  #include "rkcommon/utility/OwnedArray.h"
  #include "rkcommon/utility/multidim_index_sequence.h"
  -#include "ospray/MPIDistributedDevice.h"
  -#include "render/RenderTask.h"
  #include "texture/Texture.h"
  #include "volume/VolumetricModel.h"
  @@ -199,9 +199,9 @@ void newSharedData(OSPState &state,
  for (auto idx : indices) {
  const size_t i = idx.x * stride.x + idx.y * stride.y + idx.z * stride.z;
  uint8_t *addr = view->data() + i;
  - int64_t *handle = reinterpret_cast<int64_t *>(addr);
  + int64_t *h = reinterpret_cast<int64_t *>(addr);
  OSPObject *obj = reinterpret_cast<OSPObject *>(addr);
  - *obj = state.objects[*handle];
  + *obj = state.objects[*h];
  }
  }
  @@ -287,7 +287,19 @@ void commit(OSPState &state,
  // If it's a data being committed, we need to recieve the updated data
  auto d = state.data.find(handle);
  if (d != state.data.end()) {
  - fabric.recvBcast(*d->second);
  + auto &view = *d->second;
  + fabric.recvBcast(view);
  +
  + Data *d = state.getObject<Data *>(handle);
  + if (mpicommon::isManagedObject(d->type)) {
  + rkcommon::index_sequence_3D indices(d->numItems);
  + for (auto idx : indices) {
  + char *addr = d->data(idx);
  + int64_t *h = reinterpret_cast<int64_t *>(addr);
  + OSPObject *obj = reinterpret_cast<OSPObject *>(addr);
  + *obj = state.objects[*h];
  + }
  + }
  }
  ospCommit(state.objects[handle]);
  @@ -455,34 +467,14 @@ void setParam(
  OSPDataType type;
  cmdBuf >> handle >> param >> type;
  - switch (type) {
  - // All OSP_OBJECT fall through the same style of setting param since it's just
  - // a handle
  - case OSP_DEVICE:
  - case OSP_OBJECT:
  - case OSP_CAMERA:
  - case OSP_DATA:
  - case OSP_FRAMEBUFFER:
  - case OSP_FUTURE:
  - case OSP_GEOMETRIC_MODEL:
  - case OSP_GEOMETRY:
  - case OSP_GROUP:
  - case OSP_IMAGE_OPERATION:
  - case OSP_INSTANCE:
  - case OSP_LIGHT:
  - case OSP_MATERIAL:
  - case OSP_RENDERER:
  - case OSP_TEXTURE:
  - case OSP_TRANSFER_FUNCTION:
  - case OSP_VOLUME:
  - case OSP_VOLUMETRIC_MODEL:
  - case OSP_WORLD: {
  + // OSP_OBJECT use the same style of setting param since it's just a handle
  + if (mpicommon::isManagedObject(type)) {
  int64_t val = 0;
  cmdBuf >> val;
  ospSetParam(
  state.objects[handle], param.c_str(), type, &state.objects[val]);
  - break;
  - }
  + } else {
  + switch (type) {
  case OSP_STRING: {
  std::string val = 0;
  cmdBuf >> val;
  @@ -614,6 +606,7 @@ void setParam(
  throw std::runtime_error("Unrecognized param type!");
  }
  }
  +}
  void removeParam(
  OSPState &state, networking::BufferReader &cmdBuf, networking::Fabric &)
  