summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Null/Render.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2018-02-23 09:18:19 -0800
committerGitHub <noreply@github.com>2018-02-23 09:18:19 -0800
commitb66f96c617c87d0edbc4a9cb84c8c8e18ead915c (patch)
tree11876004e4d5c0536a2382a9d7fd380488d47fbe /Source/Core/VideoBackends/Null/Render.cpp
parenta62343bd4fe2ea425b8543d60922bb3d54d39ab2 (diff)
parentfec6bb4d5676de8834c90d93127c1459f46f8dcb (diff)
Merge pull request #6042 from stenzek/videocommon-pipelines
VideoCommon pipelines ("Abstract Pipeline")
Diffstat (limited to 'Source/Core/VideoBackends/Null/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/Null/Render.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Null/Render.cpp b/Source/Core/VideoBackends/Null/Render.cpp
index c589c8278f..6c804bd346 100644
--- a/Source/Core/VideoBackends/Null/Render.cpp
+++ b/Source/Core/VideoBackends/Null/Render.cpp
@@ -7,6 +7,8 @@
#include "VideoBackends/Null/NullTexture.h"
#include "VideoBackends/Null/Render.h"
+#include "VideoCommon/AbstractPipeline.h"
+#include "VideoCommon/AbstractShader.h"
#include "VideoCommon/VideoConfig.h"
namespace Null
@@ -33,6 +35,40 @@ std::unique_ptr<AbstractStagingTexture> Renderer::CreateStagingTexture(StagingTe
return std::make_unique<NullStagingTexture>(type, config);
}
+class NullShader final : public AbstractShader
+{
+public:
+ explicit NullShader(ShaderStage stage) : AbstractShader(stage) {}
+ ~NullShader() = default;
+
+ bool HasBinary() const override { return false; }
+ BinaryData GetBinary() const override { return {}; }
+};
+
+std::unique_ptr<AbstractShader> Renderer::CreateShaderFromSource(ShaderStage stage,
+ const char* source, size_t length)
+{
+ return std::make_unique<NullShader>(stage);
+}
+
+std::unique_ptr<AbstractShader> Renderer::CreateShaderFromBinary(ShaderStage stage,
+ const void* data, size_t length)
+{
+ return std::make_unique<NullShader>(stage);
+}
+
+class NullPipeline final : public AbstractPipeline
+{
+public:
+ NullPipeline() : AbstractPipeline() {}
+ ~NullPipeline() override = default;
+};
+
+std::unique_ptr<AbstractPipeline> Renderer::CreatePipeline(const AbstractPipelineConfig& config)
+{
+ return std::make_unique<NullPipeline>();
+}
+
void Renderer::RenderText(const std::string& text, int left, int top, u32 color)
{
NOTICE_LOG(VIDEO, "RenderText: %s", text.c_str());