Merge pull request #5203 from stenzek/useless-interface

D3D: Drop redundant interface TextureEncoder
This commit is contained in:
Stenzek 2017-04-05 00:09:19 +10:00 committed by GitHub
commit 8d31b4f827
12 changed files with 5 additions and 76 deletions

View File

@ -31,7 +31,6 @@ set(SRCS
Television.h
TextureCache.cpp
TextureCache.h
TextureEncoder.h
VertexManager.cpp
VertexManager.h
VertexShaderCache.cpp

View File

@ -72,7 +72,6 @@
<ClInclude Include="Render.h" />
<ClInclude Include="Television.h" />
<ClInclude Include="TextureCache.h" />
<ClInclude Include="TextureEncoder.h" />
<ClInclude Include="VertexManager.h" />
<ClInclude Include="VertexShaderCache.h" />
<ClInclude Include="VideoBackend.h" />

View File

@ -111,9 +111,6 @@
<ClInclude Include="TextureCache.h">
<Filter>Render</Filter>
</ClInclude>
<ClInclude Include="TextureEncoder.h">
<Filter>Render</Filter>
</ClInclude>
<ClInclude Include="VertexManager.h">
<Filter>Render</Filter>
</ClInclude>

View File

@ -7,7 +7,6 @@
#include <map>
#include "Common/CommonTypes.h"
#include "VideoBackends/D3D/TextureEncoder.h"
#include "VideoCommon/VideoCommon.h"
struct ID3D11Texture2D;
@ -25,7 +24,7 @@ struct ID3D11SamplerState;
namespace DX11
{
class PSTextureEncoder : public TextureEncoder
class PSTextureEncoder final
{
public:
PSTextureEncoder();

View File

@ -18,7 +18,6 @@
#include "VideoBackends/D3D/GeometryShaderCache.h"
#include "VideoBackends/D3D/PSTextureEncoder.h"
#include "VideoBackends/D3D/PixelShaderCache.h"
#include "VideoBackends/D3D/TextureEncoder.h"
#include "VideoBackends/D3D/VertexShaderCache.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/RenderBase.h"
@ -26,7 +25,7 @@
namespace DX11
{
static std::unique_ptr<TextureEncoder> g_encoder;
static std::unique_ptr<PSTextureEncoder> g_encoder;
const size_t MAX_COPY_BUFFERS = 32;
ID3D11Buffer* efbcopycbuf[MAX_COPY_BUFFERS] = {0};

View File

@ -1,29 +0,0 @@
// Copyright 2011 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "Common/CommonTypes.h"
#include "VideoCommon/VideoCommon.h"
namespace DX11
{
// Maximum number of bytes that can occur in a texture block-row generated by
// the encoder
static const UINT MAX_BYTES_PER_BLOCK_ROW = (EFB_WIDTH / 4) * 64;
// The maximum amount of data that the texture encoder can generate in one call
static const UINT 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, bool is_depth_copy, const EFBRectangle& srcRect,
bool isIntensity, bool scaleByHalf) = 0;
};
}

View File

@ -38,7 +38,6 @@ set(SRCS
StaticShaderCache.h
TextureCache.cpp
TextureCache.h
TextureEncoder.h
VertexManager.cpp
VertexManager.h
VideoBackend.h

View File

@ -91,7 +91,6 @@
<ClInclude Include="ShaderConstantsManager.h" />
<ClInclude Include="StaticShaderCache.h" />
<ClInclude Include="TextureCache.h" />
<ClInclude Include="TextureEncoder.h" />
<ClInclude Include="VertexManager.h" />
<ClInclude Include="VideoBackend.h" />
<ClInclude Include="XFBEncoder.h" />

View File

@ -105,9 +105,6 @@
<ClInclude Include="TextureCache.h">
<Filter>Render</Filter>
</ClInclude>
<ClInclude Include="TextureEncoder.h">
<Filter>Render</Filter>
</ClInclude>
<ClInclude Include="VertexManager.h">
<Filter>Render</Filter>
</ClInclude>

View File

@ -9,11 +9,11 @@
#include "Common/CommonTypes.h"
#include "VideoBackends/D3D12/D3DBase.h"
#include "VideoBackends/D3D12/TextureEncoder.h"
#include "VideoCommon/VideoCommon.h"
namespace DX12
{
class PSTextureEncoder final : public TextureEncoder
class PSTextureEncoder final
{
public:
PSTextureEncoder();

View File

@ -18,7 +18,6 @@
#include "VideoBackends/D3D12/FramebufferManager.h"
#include "VideoBackends/D3D12/PSTextureEncoder.h"
#include "VideoBackends/D3D12/StaticShaderCache.h"
#include "VideoBackends/D3D12/TextureEncoder.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/RenderBase.h"
@ -26,7 +25,7 @@
namespace DX12
{
static std::unique_ptr<TextureEncoder> s_encoder = nullptr;
static std::unique_ptr<PSTextureEncoder> s_encoder = nullptr;
static std::unique_ptr<D3DStreamBuffer> s_efb_copy_stream_buffer = nullptr;
static u32 s_efb_copy_last_cbuf_id = UINT_MAX;

View File

@ -1,29 +0,0 @@
// Copyright 2011 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "Common/CommonTypes.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, bool is_depth_copy, const EFBRectangle& src_rect,
bool is_intensity, bool scale_by_half) = 0;
};
}