summaryrefslogtreecommitdiffstats
path: root/tools/gfx/cpu/cpu-helper-functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/cpu/cpu-helper-functions.cpp')
-rw-r--r--tools/gfx/cpu/cpu-helper-functions.cpp18
1 files changed, 18 insertions, 0 deletions
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<cpu::DeviceImpl> result = new cpu::DeviceImpl();
+ SLANG_RETURN_ON_FAIL(result->initialize(*desc));
+ returnComPtr(outDevice, result);
+ return SLANG_OK;
+}
+
+} // namespace gfx