summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d12/d3d12-sampler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/d3d12/d3d12-sampler.cpp')
-rw-r--r--tools/gfx/d3d12/d3d12-sampler.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/gfx/d3d12/d3d12-sampler.cpp b/tools/gfx/d3d12/d3d12-sampler.cpp
new file mode 100644
index 000000000..b96fb4c90
--- /dev/null
+++ b/tools/gfx/d3d12/d3d12-sampler.cpp
@@ -0,0 +1,21 @@
+// d3d12-sampler.cpp
+#include "d3d12-sampler.h"
+
+namespace gfx
+{
+namespace d3d12
+{
+
+using namespace Slang;
+
+SamplerStateImpl::~SamplerStateImpl() { m_allocator->free(m_descriptor); }
+
+Result SamplerStateImpl::getNativeHandle(InteropHandle* outHandle)
+{
+ outHandle->api = InteropHandleAPI::D3D12CpuDescriptorHandle;
+ outHandle->handleValue = m_descriptor.cpuHandle.ptr;
+ return SLANG_OK;
+}
+
+} // namespace d3d12
+} // namespace gfx