From ed37dcbc175d07134cb0493f5e379a19e97c82f5 Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:53:36 -0700 Subject: Split render-cpu into smaller files (#2340) * render-cpu split, does not compile * split finished, one compile error * added missing include and missing destructor implementation * Rerun TeamCity CI --- tools/gfx/cpu/cpu-helper-functions.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tools/gfx/cpu/cpu-helper-functions.cpp (limited to 'tools/gfx/cpu/cpu-helper-functions.cpp') diff --git a/tools/gfx/cpu/cpu-helper-functions.cpp b/tools/gfx/cpu/cpu-helper-functions.cpp new file mode 100644 index 000000000..1aa9d82eb --- /dev/null +++ b/tools/gfx/cpu/cpu-helper-functions.cpp @@ -0,0 +1,18 @@ +// cpu-helper-functions.cpp +#include "cpu-helper-functions.h" + +#include "cpu-device.h" + +namespace gfx +{ +using namespace Slang; + +Result SLANG_MCALL createCPUDevice(const IDevice::Desc* desc, IDevice** outDevice) +{ + RefPtr result = new cpu::DeviceImpl(); + SLANG_RETURN_ON_FAIL(result->initialize(*desc)); + returnComPtr(outDevice, result); + return SLANG_OK; +} + +} // namespace gfx -- cgit v1.2.3