diff options
| author | Simon Kallweit <simon.kallweit@gmail.com> | 2024-05-27 06:03:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 15:03:13 +0200 |
| commit | d9443d670ef8413971fe7c3f02368b60a7fc5904 (patch) | |
| tree | 001e763846b23814b0e4960991fc457d7b580a0f /tools/gfx/metal/metal-texture.cpp | |
| parent | 4f1cbf6f4d561320b8e3c73b871cc95dd13c6207 (diff) | |
[gfx] metal backend skeleton (#4223)
* add metal-cpp submodule
* add metal-cpp cmake target
* gfx metal backend skeleton
* add premake support
* add foundation framework
* add metal-cpp include to premake
* update vs project file
---------
Co-authored-by: Simon Kallweit <skallweit@nvidia.com>
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
Diffstat (limited to 'tools/gfx/metal/metal-texture.cpp')
| -rw-r--r-- | tools/gfx/metal/metal-texture.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/gfx/metal/metal-texture.cpp b/tools/gfx/metal/metal-texture.cpp new file mode 100644 index 000000000..092a028b0 --- /dev/null +++ b/tools/gfx/metal/metal-texture.cpp @@ -0,0 +1,39 @@ +// metal-texture.cpp +#include "metal-texture.h" + +namespace gfx +{ + +using namespace Slang; + +namespace metal +{ + +TextureResourceImpl::TextureResourceImpl(const Desc& desc, DeviceImpl* device) + : Parent(desc) + , m_device(device) +{} + +TextureResourceImpl::~TextureResourceImpl() +{ +} + +Result TextureResourceImpl::getNativeResourceHandle(InteropHandle* outHandle) +{ + outHandle->api = InteropHandleAPI::Metal; + outHandle->handleValue = reinterpret_cast<intptr_t>(m_texture); + return SLANG_OK; +} + +Result TextureResourceImpl::getSharedHandle(InteropHandle* outHandle) +{ + return SLANG_E_NOT_IMPLEMENTED; +} + +Result TextureResourceImpl::setDebugName(const char* name) +{ + return SLANG_E_NOT_IMPLEMENTED; +} + +} // namespace metal +} // namespace gfx |
