|
|
@ -16,8 +16,8 @@ class System; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
namespace VideoCore { |
|
|
namespace VideoCore { |
|
|
class RasterizerInterface; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
class RendererBase; |
|
|
|
|
|
} // namespace VideoCore |
|
|
|
|
|
|
|
|
namespace Tegra { |
|
|
namespace Tegra { |
|
|
|
|
|
|
|
|
@ -121,7 +121,8 @@ enum class EngineID { |
|
|
|
|
|
|
|
|
class GPU final { |
|
|
class GPU final { |
|
|
public: |
|
|
public: |
|
|
explicit GPU(Core::System& system, VideoCore::RasterizerInterface& rasterizer); |
|
|
|
|
|
|
|
|
explicit GPU(Core::System& system, VideoCore::RendererBase& renderer); |
|
|
|
|
|
|
|
|
~GPU(); |
|
|
~GPU(); |
|
|
|
|
|
|
|
|
struct MethodCall { |
|
|
struct MethodCall { |
|
|
@ -200,10 +201,25 @@ public: |
|
|
}; |
|
|
}; |
|
|
} regs{}; |
|
|
} regs{}; |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
void ProcessBindMethod(const MethodCall& method_call); |
|
|
|
|
|
void ProcessSemaphoreTriggerMethod(); |
|
|
|
|
|
void ProcessSemaphoreRelease(); |
|
|
|
|
|
void ProcessSemaphoreAcquire(); |
|
|
|
|
|
|
|
|
|
|
|
// Calls a GPU puller method. |
|
|
|
|
|
void CallPullerMethod(const MethodCall& method_call); |
|
|
|
|
|
// Calls a GPU engine method. |
|
|
|
|
|
void CallEngineMethod(const MethodCall& method_call); |
|
|
|
|
|
// Determines where the method should be executed. |
|
|
|
|
|
bool ExecuteMethodOnEngine(const MethodCall& method_call); |
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
std::unique_ptr<Tegra::DmaPusher> dma_pusher; |
|
|
std::unique_ptr<Tegra::DmaPusher> dma_pusher; |
|
|
std::unique_ptr<Tegra::MemoryManager> memory_manager; |
|
|
std::unique_ptr<Tegra::MemoryManager> memory_manager; |
|
|
|
|
|
|
|
|
|
|
|
VideoCore::RendererBase& renderer; |
|
|
|
|
|
|
|
|
/// Mapping of command subchannels to their bound engine ids. |
|
|
/// Mapping of command subchannels to their bound engine ids. |
|
|
std::array<EngineID, 8> bound_engines = {}; |
|
|
std::array<EngineID, 8> bound_engines = {}; |
|
|
|
|
|
|
|
|
@ -217,18 +233,6 @@ private: |
|
|
std::unique_ptr<Engines::MaxwellDMA> maxwell_dma; |
|
|
std::unique_ptr<Engines::MaxwellDMA> maxwell_dma; |
|
|
/// Inline memory engine |
|
|
/// Inline memory engine |
|
|
std::unique_ptr<Engines::KeplerMemory> kepler_memory; |
|
|
std::unique_ptr<Engines::KeplerMemory> kepler_memory; |
|
|
|
|
|
|
|
|
void ProcessBindMethod(const MethodCall& method_call); |
|
|
|
|
|
void ProcessSemaphoreTriggerMethod(); |
|
|
|
|
|
void ProcessSemaphoreRelease(); |
|
|
|
|
|
void ProcessSemaphoreAcquire(); |
|
|
|
|
|
|
|
|
|
|
|
// Calls a GPU puller method. |
|
|
|
|
|
void CallPullerMethod(const MethodCall& method_call); |
|
|
|
|
|
// Calls a GPU engine method. |
|
|
|
|
|
void CallEngineMethod(const MethodCall& method_call); |
|
|
|
|
|
// Determines where the method should be executed. |
|
|
|
|
|
bool ExecuteMethodOnEngine(const MethodCall& method_call); |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
#define ASSERT_REG_POSITION(field_name, position) \ |
|
|
#define ASSERT_REG_POSITION(field_name, position) \ |
|
|
|