2014-07-26 17:17:09 +00:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 05:38:14 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-07-26 17:17:09 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2016-12-17 09:30:55 +00:00
|
|
|
#include "video_core/shader/debug_data.h"
|
2016-12-17 09:21:16 +00:00
|
|
|
#include "video_core/shader/shader.h"
|
|
|
|
|
2014-07-26 17:17:09 +00:00
|
|
|
namespace Pica {
|
|
|
|
|
2015-07-21 23:04:05 +00:00
|
|
|
namespace Shader {
|
2014-07-26 17:17:09 +00:00
|
|
|
|
2016-12-17 09:21:16 +00:00
|
|
|
class InterpreterEngine final : public ShaderEngine {
|
|
|
|
public:
|
|
|
|
void SetupBatch(const ShaderSetup* setup) override;
|
|
|
|
void Run(UnitState& state, unsigned int entry_point) const override;
|
2016-12-17 09:30:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Produce debug information based on the given shader and input vertex
|
|
|
|
* @param input Input vertex into the shader
|
|
|
|
* @param num_attributes The number of vertex shader attributes
|
|
|
|
* @param config Configuration object for the shader pipeline
|
|
|
|
* @return Debug information for this shader with regards to the given vertex
|
|
|
|
*/
|
2016-12-17 09:21:16 +00:00
|
|
|
DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes,
|
2016-12-17 09:30:55 +00:00
|
|
|
unsigned int entry_point) const;
|
2016-12-16 07:57:10 +00:00
|
|
|
|
2016-12-17 09:21:16 +00:00
|
|
|
private:
|
|
|
|
const ShaderSetup* setup = nullptr;
|
|
|
|
};
|
2014-07-26 17:17:09 +00:00
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
} // namespace
|