mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
VideoCore/Shader: Move ProduceDebugInfo to InterpreterEngine
This commit is contained in:
parent
a9b7752b9d
commit
ade7ed7c5f
@ -8,6 +8,7 @@
|
|||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
#include "citra_qt/debugger/graphics/graphics_breakpoint_observer.h"
|
#include "citra_qt/debugger/graphics/graphics_breakpoint_observer.h"
|
||||||
#include "nihstro/parser_shbin.h"
|
#include "nihstro/parser_shbin.h"
|
||||||
|
#include "video_core/shader/debug_data.h"
|
||||||
#include "video_core/shader/shader.h"
|
#include "video_core/shader/shader.h"
|
||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "common/vector_math.h"
|
#include "common/vector_math.h"
|
||||||
#include "video_core/pica.h"
|
#include "video_core/pica.h"
|
||||||
#include "video_core/pica_types.h"
|
#include "video_core/pica_types.h"
|
||||||
#include "video_core/shader/debug_data.h"
|
|
||||||
|
|
||||||
using nihstro::RegisterType;
|
using nihstro::RegisterType;
|
||||||
using nihstro::SourceRegister;
|
using nihstro::SourceRegister;
|
||||||
@ -192,16 +191,6 @@ public:
|
|||||||
* @param state Shader unit state, must be setup per shader and per shader unit
|
* @param state Shader unit state, must be setup per shader and per shader unit
|
||||||
*/
|
*/
|
||||||
virtual void Run(UnitState& state, unsigned int entry_point) const = 0;
|
virtual void Run(UnitState& state, unsigned int entry_point) const = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
virtual DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes,
|
|
||||||
unsigned int entry_point) const = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO(yuriks): Remove and make it non-global state somewhere
|
// TODO(yuriks): Remove and make it non-global state somewhere
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "video_core/shader/debug_data.h"
|
||||||
#include "video_core/shader/shader.h"
|
#include "video_core/shader/shader.h"
|
||||||
|
|
||||||
namespace Pica {
|
namespace Pica {
|
||||||
@ -14,8 +15,16 @@ class InterpreterEngine final : public ShaderEngine {
|
|||||||
public:
|
public:
|
||||||
void SetupBatch(const ShaderSetup* setup) override;
|
void SetupBatch(const ShaderSetup* setup) override;
|
||||||
void Run(UnitState& state, unsigned int entry_point) const override;
|
void Run(UnitState& state, unsigned int entry_point) const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes,
|
DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes,
|
||||||
unsigned int entry_point) const override;
|
unsigned int entry_point) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const ShaderSetup* setup = nullptr;
|
const ShaderSetup* setup = nullptr;
|
||||||
|
@ -47,10 +47,5 @@ void JitX64Engine::Run(UnitState& state, unsigned int entry_point) const {
|
|||||||
cached_shader->Run(*setup, state, entry_point);
|
cached_shader->Run(*setup, state, entry_point);
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugData<true> JitX64Engine::ProduceDebugInfo(const InputVertex& input, int num_attributes,
|
|
||||||
unsigned int entry_point) const {
|
|
||||||
UNIMPLEMENTED_MSG("Shader tracing/debugging is not supported by the JIT.");
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Shader
|
} // namespace Shader
|
||||||
} // namespace Pica
|
} // namespace Pica
|
||||||
|
@ -21,8 +21,6 @@ public:
|
|||||||
|
|
||||||
void SetupBatch(const ShaderSetup* setup) override;
|
void SetupBatch(const ShaderSetup* setup) override;
|
||||||
void Run(UnitState& state, unsigned int entry_point) const override;
|
void Run(UnitState& state, unsigned int entry_point) const override;
|
||||||
DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes,
|
|
||||||
unsigned int entry_point) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const ShaderSetup* setup = nullptr;
|
const ShaderSetup* setup = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user