summaryrefslogtreecommitdiffstats
path: root/tools/gfx/d3d12/d3d12-sampler.cpp
blob: 9f739a268d700822992694f34fc0a5aece6e6026 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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