diff options
| author | lucy96chen <47800040+lucy96chen@users.noreply.github.com> | 2022-06-30 11:09:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-30 11:09:45 -0700 |
| commit | 5eee6b03c391d0bb6ed0ded2d8d91c2e525fdb97 (patch) | |
| tree | 0d47d3ebc385699ff195c8a19400dd3780107667 /tools/gfx/d3d11/d3d11-buffer.h | |
| parent | abc100f81d4b22229105f9ed569a7efafc653a3a (diff) | |
Split render-d3d11.cpp into smaller files (#2307)
* render-d3d11 split, does not compile
* Compiles but unit tests failing
* ran premake.bat
* Readded constructor code that was accidentally removed
Diffstat (limited to 'tools/gfx/d3d11/d3d11-buffer.h')
| -rw-r--r-- | tools/gfx/d3d11/d3d11-buffer.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/gfx/d3d11/d3d11-buffer.h b/tools/gfx/d3d11/d3d11-buffer.h new file mode 100644 index 000000000..f5462b029 --- /dev/null +++ b/tools/gfx/d3d11/d3d11-buffer.h @@ -0,0 +1,37 @@ +// d3d11-buffer.h +#pragma once + +#include "d3d11-base.h" + +namespace gfx +{ + +using namespace Slang; + +namespace d3d11 +{ + +class BufferResourceImpl : public BufferResource +{ +public: + typedef BufferResource Parent; + + BufferResourceImpl(const IBufferResource::Desc& desc) : + Parent(desc) + { + } + + MapFlavor m_mapFlavor; + D3D11_USAGE m_d3dUsage; + ComPtr<ID3D11Buffer> m_buffer; + ComPtr<ID3D11Buffer> m_staging; + List<uint8_t> m_uploadStagingBuffer; + + virtual SLANG_NO_THROW DeviceAddress SLANG_MCALL getDeviceAddress() override; + virtual SLANG_NO_THROW Result SLANG_MCALL + map(MemoryRange* rangeToRead, void** outPointer) override; + virtual SLANG_NO_THROW Result SLANG_MCALL unmap(MemoryRange* writtenRange) override; +}; + +} // namespace d3d11 +} // namespace gfx |
