summaryrefslogtreecommitdiffstats
path: root/tools/gfx/cpu/cpu-device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/cpu/cpu-device.cpp')
-rw-r--r--tools/gfx/cpu/cpu-device.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/gfx/cpu/cpu-device.cpp b/tools/gfx/cpu/cpu-device.cpp
index 92c08ef71..0db2b0fa7 100644
--- a/tools/gfx/cpu/cpu-device.cpp
+++ b/tools/gfx/cpu/cpu-device.cpp
@@ -1,6 +1,8 @@
// cpu-device.cpp
#include "cpu-device.h"
+#include <chrono>
+
#include "cpu-buffer.h"
#include "cpu-pipeline-state.h"
#include "cpu-query.h"
@@ -290,4 +292,13 @@ namespace cpu
}
} // namespace cpu
+
+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