mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 04:27:56 -05:00
GPU: Process command mode 5 (IncreaseOnce) differently from other commands.
Accumulate all arguments before calling the desired method. Note: Maybe we should do the same for the NonIncreasing mode?
This commit is contained in:
@ -8,8 +8,23 @@
|
||||
namespace Tegra {
|
||||
namespace Engines {
|
||||
|
||||
const std::unordered_map<u32, Maxwell3D::MethodInfo> Maxwell3D::method_handlers = {
|
||||
{0xE24, {"PrepareShader", 5, &Maxwell3D::PrepareShader}},
|
||||
};
|
||||
|
||||
Maxwell3D::Maxwell3D(MemoryManager& memory_manager) : memory_manager(memory_manager) {}
|
||||
|
||||
void Maxwell3D::CallMethod(u32 method, const std::vector<u32>& parameters) {
|
||||
auto itr = method_handlers.find(method);
|
||||
if (itr == method_handlers.end()) {
|
||||
LOG_ERROR(HW_GPU, "Unhandled method call %08X", method);
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT(itr->second.arguments == parameters.size());
|
||||
(this->*itr->second.handler)(parameters);
|
||||
}
|
||||
|
||||
void Maxwell3D::WriteReg(u32 method, u32 value) {
|
||||
ASSERT_MSG(method < Regs::NUM_REGS,
|
||||
"Invalid Maxwell3D register, increase the size of the Regs structure");
|
||||
@ -56,5 +71,7 @@ void Maxwell3D::DrawArrays() {
|
||||
LOG_WARNING(HW_GPU, "Game requested a DrawArrays, ignoring");
|
||||
}
|
||||
|
||||
void Maxwell3D::PrepareShader(const std::vector<u32>& parameters) {}
|
||||
|
||||
} // namespace Engines
|
||||
} // namespace Tegra
|
||||
|
Reference in New Issue
Block a user