2014-02-03 13:02:17 +00:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2014-02-03 13:02:17 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-01-27 02:07:05 +00:00
|
|
|
#include "VideoCommon/AbstractGfx.h"
|
2014-02-03 13:02:17 +00:00
|
|
|
#include "VideoCommon/RenderBase.h"
|
|
|
|
|
|
|
|
namespace Null
|
|
|
|
{
|
2023-01-27 02:07:05 +00:00
|
|
|
class NullGfx final : public AbstractGfx
|
2014-02-03 13:02:17 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-01-27 02:07:05 +00:00
|
|
|
NullGfx();
|
|
|
|
~NullGfx() override;
|
2014-02-03 13:02:17 +00:00
|
|
|
|
2018-10-03 13:03:13 +00:00
|
|
|
bool IsHeadless() const override;
|
2023-01-28 03:23:30 +00:00
|
|
|
virtual bool SupportsUtilityDrawing() const override;
|
2018-10-03 13:03:13 +00:00
|
|
|
|
2021-08-28 05:30:05 +00:00
|
|
|
std::unique_ptr<AbstractTexture> CreateTexture(const TextureConfig& config,
|
|
|
|
std::string_view name) override;
|
2017-10-21 14:49:40 +00:00
|
|
|
std::unique_ptr<AbstractStagingTexture>
|
|
|
|
CreateStagingTexture(StagingTextureType type, const TextureConfig& config) override;
|
2018-01-21 10:22:45 +00:00
|
|
|
std::unique_ptr<AbstractFramebuffer>
|
2023-05-29 01:59:02 +00:00
|
|
|
CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
|
|
|
|
std::vector<AbstractTexture*> additional_color_attachments) override;
|
2017-09-30 06:25:36 +00:00
|
|
|
|
2021-08-28 05:30:05 +00:00
|
|
|
std::unique_ptr<AbstractShader> CreateShaderFromSource(ShaderStage stage, std::string_view source,
|
|
|
|
std::string_view name) override;
|
2017-09-08 09:42:56 +00:00
|
|
|
std::unique_ptr<AbstractShader> CreateShaderFromBinary(ShaderStage stage, const void* data,
|
2021-08-28 05:30:05 +00:00
|
|
|
size_t length,
|
|
|
|
std::string_view name) override;
|
2019-02-15 01:59:50 +00:00
|
|
|
std::unique_ptr<NativeVertexFormat>
|
|
|
|
CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
|
2019-04-15 11:55:26 +00:00
|
|
|
std::unique_ptr<AbstractPipeline> CreatePipeline(const AbstractPipelineConfig& config,
|
|
|
|
const void* cache_data = nullptr,
|
|
|
|
size_t cache_data_length = 0) override;
|
2023-02-18 20:35:02 +00:00
|
|
|
SurfaceInfo GetSurfaceInfo() const override { return {}; }
|
2023-01-27 02:07:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class NullRenderer final : public Renderer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NullRenderer() {}
|
|
|
|
~NullRenderer() override;
|
2017-09-08 09:42:56 +00:00
|
|
|
|
2014-02-03 13:02:17 +00:00
|
|
|
u32 AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) override { return 0; }
|
|
|
|
void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override {}
|
|
|
|
|
2019-02-15 01:59:50 +00:00
|
|
|
void ReinterpretPixelData(EFBReinterpretType convtype) override {}
|
2014-02-03 13:02:17 +00:00
|
|
|
};
|
2023-01-27 02:07:05 +00:00
|
|
|
|
2019-02-15 01:59:50 +00:00
|
|
|
} // namespace Null
|