diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 16 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/interface.h | 3 |
3 files changed, 22 insertions, 6 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index d7e0b1bbd..4776c8aa3 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -104,8 +104,20 @@ u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u } u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) { - LOG_WARNING(Service_NVDRV, "(STUBBED) called"); - std::memset(output.data(), 0, output.size()); + LOG_DEBUG(Service_NVDRV, "called"); + IoctlNvgpuGpuZcullGetInfoArgs params{}; + std::memcpy(¶ms, input.data(), input.size()); + params.width_align_pixels = 0x20; + params.height_align_pixels = 0x20; + params.pixel_squares_by_aliquots = 0x400; + params.aliquot_total = 0x800; + params.region_byte_multiplier = 0x20; + params.region_header_size = 0x20; + params.subregion_header_size = 0xc0; + params.subregion_width_align_pixels = 0x20; + params.subregion_height_align_pixels = 0x40; + params.subregion_count = 0x10; + std::memcpy(output.data(), ¶ms, output.size()); return 0; } diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 0edb64cc3..367791da6 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -78,11 +78,10 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { u32 event_id = rp.Pop<u32>(); LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd=%x, event_id=%x", fd, event_id); - IPC::ResponseBuilder rb{ctx, 2, 1}; + IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(RESULT_SUCCESS); - auto event = Kernel::Event::Create(Kernel::ResetType::Pulse, "NVEvent"); - event->Signal(); - rb.PushCopyObjects(event); + rb.PushCopyObjects(query_event); + rb.Push<u32>(0); } void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { @@ -113,6 +112,8 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) {13, &NVDRV::FinishInitialize, "FinishInitialize"}, }; RegisterHandlers(functions); + + query_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NVDRV::query_event"); } } // namespace Nvidia diff --git a/src/core/hle/service/nvdrv/interface.h b/src/core/hle/service/nvdrv/interface.h index 8c4b068c2..daf2302af 100644 --- a/src/core/hle/service/nvdrv/interface.h +++ b/src/core/hle/service/nvdrv/interface.h @@ -6,6 +6,7 @@ #include <memory> #include <string> +#include "core/hle/kernel/event.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/service.h" @@ -29,6 +30,8 @@ private: std::shared_ptr<Module> nvdrv; u64 pid{}; + + Kernel::SharedPtr<Kernel::Event> query_event; }; } // namespace Nvidia |