2020-10-27 03:07:36 +00:00
|
|
|
// Copyright 2020 yuzu Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include "common/assert.h"
|
|
|
|
#include "video_core/command_classes/host1x.h"
|
|
|
|
#include "video_core/gpu.h"
|
|
|
|
|
|
|
|
Tegra::Host1x::Host1x(GPU& gpu_) : gpu(gpu_) {}
|
|
|
|
|
|
|
|
Tegra::Host1x::~Host1x() = default;
|
|
|
|
|
2020-12-28 06:21:41 +00:00
|
|
|
void Tegra::Host1x::ProcessMethod(Method method, u32 argument) {
|
2020-10-27 03:07:36 +00:00
|
|
|
switch (method) {
|
|
|
|
case Method::LoadSyncptPayload32:
|
2020-12-28 06:21:41 +00:00
|
|
|
syncpoint_value = argument;
|
2020-10-27 03:07:36 +00:00
|
|
|
break;
|
2020-12-28 06:21:41 +00:00
|
|
|
case Method::WaitSyncpt:
|
2020-10-27 03:07:36 +00:00
|
|
|
case Method::WaitSyncpt32:
|
2020-12-28 06:21:41 +00:00
|
|
|
Execute(argument);
|
2020-10-27 03:07:36 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
UNIMPLEMENTED_MSG("Host1x method 0x{:X}", static_cast<u32>(method));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Tegra::Host1x::Execute(u32 data) {
|
2020-12-28 06:21:41 +00:00
|
|
|
gpu.WaitFence(data, syncpoint_value);
|
2020-10-27 03:07:36 +00:00
|
|
|
}
|