Fix Metroid

This commit is contained in:
liberodark 2025-12-06 01:13:59 +01:00
parent ff71937776
commit 37a6981266
3 changed files with 20 additions and 1 deletions

View file

@ -379,8 +379,9 @@ void CommandGenerator::GenerateBiquadFilterEffectCommand(const s16 buffer_offset
}
break;
default:
LOG_ERROR(Service_Audio, "Invalid biquad parameter state {}",
LOG_WARNING(Service_Audio, "Unknown biquad parameter state {}, treating as initialized",
static_cast<u32>(parameter.state));
needs_init = true;
break;
}

View file

@ -44,6 +44,8 @@ NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8>
return WrapFixed(this, &nvhost_ctrl_gpu::GetTPCMasks1, input, output);
case 0x7:
return WrapFixed(this, &nvhost_ctrl_gpu::FlushL2, input, output);
case 0x13:
return WrapFixed(this, &nvhost_ctrl_gpu::GetGpuLoad, input, output);
case 0x14:
return WrapFixed(this, &nvhost_ctrl_gpu::GetActiveSlotMask, input, output);
case 0x1c:
@ -74,6 +76,8 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8>
case 0x6:
return WrapFixedInlOut(this, &nvhost_ctrl_gpu::GetTPCMasks3, input, output,
inline_output);
case 0x13:
return WrapFixed(this, &nvhost_ctrl_gpu::GetGpuLoad, input, output);
default:
break;
}
@ -247,6 +251,13 @@ NvResult nvhost_ctrl_gpu::GetGpuTime(IoctlGetGpuTime& params) {
return NvResult::Success;
}
NvResult nvhost_ctrl_gpu::GetGpuLoad(IoctlGetGpuLoad& params) {
LOG_DEBUG(Service_NVDRV, "called");
params.load = 0;
params.padding = 0;
return NvResult::Success;
}
Kernel::KEvent* nvhost_ctrl_gpu::QueryEvent(u32 event_id) {
switch (event_id) {
case 1:

View file

@ -151,6 +151,12 @@ private:
};
static_assert(sizeof(IoctlGetGpuTime) == 0x10, "IoctlGetGpuTime is incorrect size");
struct IoctlGetGpuLoad {
u32_le load;
u32_le padding;
};
static_assert(sizeof(IoctlGetGpuLoad) == 8, "IoctlGetGpuLoad is incorrect size");
NvResult GetCharacteristics1(IoctlCharacteristics& params);
NvResult GetCharacteristics3(IoctlCharacteristics& params,
std::span<IoctlGpuCharacteristics> gpu_characteristics);
@ -165,6 +171,7 @@ private:
NvResult ZBCQueryTable(IoctlZbcQueryTable& params);
NvResult FlushL2(IoctlFlushL2& params);
NvResult GetGpuTime(IoctlGetGpuTime& params);
NvResult GetGpuLoad(IoctlGetGpuLoad& params);
EventInterface& events_interface;