diff options
| author | lucy96chen <47800040+lucy96chen@users.noreply.github.com> | 2022-08-04 16:59:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-04 16:59:28 -0700 |
| commit | 12a846e8facf090aaeb68fcabf55867f5eaed747 (patch) | |
| tree | cc7c70c447200c1b45f20efc47e43e17828ec84d /tools/gfx/cpu | |
| parent | 11b29eff99910d55a54658b8a1d053cc4ec076fc (diff) | |
Split debug-layer into smaller files (#2344)
* checkpoint commit
* debug-layer split, does not compile
* Almost compiles, rebasing before making any further changes
* everything compiles and passes tests locally
* Added tools/gfx/debug-layer to premake and ran premake
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx/cpu')
| -rw-r--r-- | tools/gfx/cpu/cpu-base.h | 2 | ||||
| -rw-r--r-- | tools/gfx/cpu/cpu-device.cpp | 11 | ||||
| -rw-r--r-- | tools/gfx/cpu/cpu-device.h | 3 | ||||
| -rw-r--r-- | tools/gfx/cpu/cpu-helper-functions.cpp | 8 | ||||
| -rw-r--r-- | tools/gfx/cpu/cpu-helper-functions.h | 2 |
5 files changed, 16 insertions, 10 deletions
diff --git a/tools/gfx/cpu/cpu-base.h b/tools/gfx/cpu/cpu-base.h index 4629686b7..6f30662ec 100644 --- a/tools/gfx/cpu/cpu-base.h +++ b/tools/gfx/cpu/cpu-base.h @@ -2,8 +2,6 @@ // Shared header file for CPU implementation #pragma once -#include <chrono> - #include "slang.h" #include "slang-com-ptr.h" #include "slang-com-helper.h" 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 diff --git a/tools/gfx/cpu/cpu-device.h b/tools/gfx/cpu/cpu-device.h index d216eb0be..d90ce1e8b 100644 --- a/tools/gfx/cpu/cpu-device.h +++ b/tools/gfx/cpu/cpu-device.h @@ -95,4 +95,7 @@ private: }; } // namespace cpu + +Result SLANG_MCALL createCPUDevice(const IDevice::Desc* desc, IDevice** outDevice); + } // namespace gfx diff --git a/tools/gfx/cpu/cpu-helper-functions.cpp b/tools/gfx/cpu/cpu-helper-functions.cpp index 1aa9d82eb..f21be8d66 100644 --- a/tools/gfx/cpu/cpu-helper-functions.cpp +++ b/tools/gfx/cpu/cpu-helper-functions.cpp @@ -7,12 +7,6 @@ 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 diff --git a/tools/gfx/cpu/cpu-helper-functions.h b/tools/gfx/cpu/cpu-helper-functions.h index 1f122b750..ba8d4c88e 100644 --- a/tools/gfx/cpu/cpu-helper-functions.h +++ b/tools/gfx/cpu/cpu-helper-functions.h @@ -6,6 +6,6 @@ namespace gfx { using namespace Slang; -Result SLANG_MCALL createCPUDevice(const IDevice::Desc* desc, IDevice** outDevice); + } // namespace gfx |
