diff options
| author | hdcmeta <hdcmeta@gmail.com> | 2016-01-07 19:40:35 -0800 |
|---|---|---|
| committer | hdcmeta <hdcmeta@gmail.com> | 2016-02-15 09:48:25 -0800 |
| commit | 8cc686b3606deb1a3638281da9c12180a481e899 (patch) | |
| tree | 6adae584fcc27911bf4464deb8a62d468472c98c /Source/Core/VideoBackends/D3D12/TextureEncoder.h | |
| parent | a2e2e36745717135d42df2d17965aa709480e3e3 (diff) | |
D3D12: Initial commit for D3D12 backend implementation.
Diffstat (limited to 'Source/Core/VideoBackends/D3D12/TextureEncoder.h')
| -rw-r--r-- | Source/Core/VideoBackends/D3D12/TextureEncoder.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/D3D12/TextureEncoder.h b/Source/Core/VideoBackends/D3D12/TextureEncoder.h new file mode 100644 index 0000000000..346f87d79f --- /dev/null +++ b/Source/Core/VideoBackends/D3D12/TextureEncoder.h @@ -0,0 +1,32 @@ +// Copyright 2011 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#pragma once + +#include "VideoCommon/BPMemory.h" +#include "VideoCommon/TextureCacheBase.h" +#include "VideoCommon/VideoCommon.h" + +namespace DX12 +{ +// Maximum number of bytes that can occur in a texture block-row generated by +// the encoder +static constexpr unsigned int MAX_BYTES_PER_BLOCK_ROW = (EFB_WIDTH / 4) * 64; +// The maximum amount of data that the texture encoder can generate in one call +static constexpr unsigned int MAX_BYTES_PER_ENCODE = MAX_BYTES_PER_BLOCK_ROW * (EFB_HEIGHT / 4); + +class TextureEncoder +{ +public: + virtual ~TextureEncoder() { } + + virtual void Init() = 0; + virtual void Shutdown() = 0; + // Returns size in bytes of encoded block of memory + virtual void Encode(u8* dst, u32 format, u32 native_width, u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride, + PEControl::PixelFormat src_format, const EFBRectangle& src_rect, + bool is_intensity, bool scale_by_half) = 0; +}; + +} |
