Correct crashes in the GameOfLife example

This commit is contained in:
Robert Maynard 2018-12-27 11:47:34 -05:00
parent cdbee58c1b
commit 34165c8e75

@ -61,17 +61,9 @@
#include "LoadShaders.h"
//This is the list of devices to compile in support for. The order of the
//devices determines the runtime preference.
struct DevicesToTry : vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagCuda,
vtkm::cont::DeviceAdapterTagTBB,
vtkm::cont::DeviceAdapterTagSerial>
{
};
struct GameOfLifePolicy : public vtkm::filter::PolicyBase<GameOfLifePolicy>
{
using DeviceAdapterList = DevicesToTry;
using FieldTypeList = vtkm::ListTagBase<vtkm::UInt8, vtkm::Vec<vtkm::UInt8, 4>>;
};
struct UpdateLifeState : public vtkm::worklet::WorkletPointNeighborhood
@ -231,7 +223,7 @@ struct RenderGameOfLife
UploadData task(&this->ColorState,
data.GetField("colors", vtkm::cont::Field::Association::POINTS));
vtkm::cont::TryExecute(task, DevicesToTry());
vtkm::cont::TryExecute(task);
vtkm::Float32 mvp[16] = { 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f,
0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 3.5f };