mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:55:08 +01:00
Drop engine base class usage from GPFIFO
This class does nothing since we made stopped GPFIFO submits from using virtual functions so it can be dropped.
This commit is contained in:
parent
4378658cbc
commit
8d5463ef28
@ -6,11 +6,7 @@
|
||||
|
||||
namespace skyline::soc::gm20b {
|
||||
ChannelContext::ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> asCtx, size_t numEntries) :
|
||||
fermi2D(state),
|
||||
keplerMemory(state),
|
||||
maxwell3D(std::make_unique<engine::maxwell3d::Maxwell3D>(state, *this, executor)),
|
||||
maxwellCompute(state),
|
||||
maxwellDma(state),
|
||||
gpfifo(state, *this, numEntries),
|
||||
executor(state),
|
||||
asCtx(std::move(asCtx)){}
|
||||
|
@ -21,11 +21,7 @@ namespace skyline::soc::gm20b {
|
||||
struct ChannelContext {
|
||||
std::shared_ptr<AddressSpaceContext> asCtx;
|
||||
gpu::interconnect::CommandExecutor executor;
|
||||
engine::Engine fermi2D;
|
||||
std::unique_ptr<engine::maxwell3d::Maxwell3D> maxwell3D; //!< TODO: fix this once graphics context is moved into a cpp file
|
||||
engine::Engine maxwellCompute;
|
||||
engine::Engine maxwellDma;
|
||||
engine::Engine keplerMemory;
|
||||
ChannelGpfifo gpfifo;
|
||||
|
||||
ChannelContext(const DeviceState &state, std::shared_ptr<AddressSpaceContext> asCtx, size_t numEntries);
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include "gpfifo.h"
|
||||
|
||||
namespace skyline::soc::gm20b::engine {
|
||||
GPFIFO::GPFIFO(const DeviceState &state, ChannelContext &channelCtx) : Engine(state), channelCtx(channelCtx) {}
|
||||
GPFIFO::GPFIFO(host1x::SyncpointSet &syncpoints, ChannelContext &channelCtx) : syncpoints(syncpoints), channelCtx(channelCtx) {}
|
||||
|
||||
void GPFIFO::CallMethod(u32 method, u32 argument, bool lastCall) {
|
||||
void GPFIFO::CallMethod(u32 method, u32 argument) {
|
||||
Logger::Debug("Called method in GPFIFO: 0x{:X} args: 0x{:X}", method, argument);
|
||||
|
||||
registers.raw[method] = argument;
|
||||
@ -29,12 +29,12 @@ namespace skyline::soc::gm20b::engine {
|
||||
if (action.operation == Registers::SyncpointOperation::Incr) {
|
||||
Logger::Debug("Increment syncpoint: {}", +action.index);
|
||||
channelCtx.executor.Execute();
|
||||
state.soc->host1x.syncpoints.at(action.index).Increment();
|
||||
syncpoints.at(action.index).Increment();
|
||||
} else if (action.operation == Registers::SyncpointOperation::Wait) {
|
||||
Logger::Debug("Wait syncpoint: {}, thresh: {}", +action.index, registers.syncpoint.payload);
|
||||
|
||||
// Wait forever for another channel to increment
|
||||
state.soc->host1x.syncpoints.at(action.index).Wait(registers.syncpoint.payload, std::chrono::steady_clock::duration::max());
|
||||
syncpoints.at(action.index).Wait(registers.syncpoint.payload, std::chrono::steady_clock::duration::max());
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace skyline::soc::gm20b::engine {
|
||||
* @brief The GPFIFO engine handles managing macros and semaphores
|
||||
* @url https://github.com/NVIDIA/open-gpu-doc/blob/ab27fc22db5de0d02a4cabe08e555663b62db4d4/manuals/volta/gv100/dev_pbdma.ref.txt
|
||||
*/
|
||||
class GPFIFO : public Engine {
|
||||
class GPFIFO {
|
||||
public:
|
||||
static constexpr u32 RegisterCount{0x40}; //!< The number of GPFIFO registers
|
||||
|
||||
@ -168,11 +168,12 @@ namespace skyline::soc::gm20b::engine {
|
||||
static_assert(sizeof(Registers) == (RegisterCount * sizeof(u32)));
|
||||
#pragma pack(pop)
|
||||
|
||||
host1x::SyncpointSet &syncpoints;
|
||||
ChannelContext &channelCtx;
|
||||
|
||||
public:
|
||||
GPFIFO(const DeviceState &state, ChannelContext &channelCtx);
|
||||
GPFIFO(host1x::SyncpointSet &syncpoints, ChannelContext &channelCtx);
|
||||
|
||||
void CallMethod(u32 method, u32 argument, bool lastCall);
|
||||
void CallMethod(u32 method, u32 argument);
|
||||
};
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ namespace skyline::soc::gm20b {
|
||||
|
||||
ChannelGpfifo::ChannelGpfifo(const DeviceState &state, ChannelContext &channelCtx, size_t numEntries) :
|
||||
state(state),
|
||||
gpfifoEngine(state, channelCtx),
|
||||
gpfifoEngine(state.soc->host1x.syncpoints, channelCtx),
|
||||
channelCtx(channelCtx),
|
||||
gpEntries(numEntries),
|
||||
thread(std::thread(&ChannelGpfifo::Run, this)) {}
|
||||
@ -76,7 +76,7 @@ namespace skyline::soc::gm20b {
|
||||
Logger::Debug("Called GPU method - method: 0x{:X} argument: 0x{:X} subchannel: 0x{:X} last: {}", method, argument, subChannel, lastCall);
|
||||
|
||||
if (method < engine::GPFIFO::RegisterCount) {
|
||||
gpfifoEngine.CallMethod(method, argument, lastCall);
|
||||
gpfifoEngine.CallMethod(method, argument);
|
||||
} else {
|
||||
switch (subChannel) {
|
||||
case ThreeDSubChannel:
|
||||
|
Loading…
Reference in New Issue
Block a user