From 09722cb4a7cafbce7201254c9132156e947d9eca Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 23 Nov 2020 15:01:40 -0500 Subject: streamline cdma_pusher/command_classes --- src/video_core/command_classes/vic.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/video_core/command_classes') diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index 73680d057..564f9c1e8 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp @@ -19,20 +19,13 @@ namespace Tegra { Vic::Vic(GPU& gpu_, std::shared_ptr nvdec_processor_) : gpu(gpu_), - nvdec_processor(std::move(nvdec_processor_)), converted_frame_buffer{nullptr, av_free} + nvdec_processor(std::move(nvdec_processor_)), converted_frame_buffer{nullptr, av_free} {} -{} Vic::~Vic() = default; -void Vic::VicStateWrite(u32 offset, u32 arguments) { - u8* const state_offset = reinterpret_cast(&vic_state) + offset * sizeof(u32); - std::memcpy(state_offset, &arguments, sizeof(u32)); -} - -void Vic::ProcessMethod(Method method, const std::vector& arguments) { - LOG_DEBUG(HW_GPU, "Vic method 0x{:X}", method); - VicStateWrite(static_cast(method), arguments[0]); - const u64 arg = static_cast(arguments[0]) << 8; +void Vic::ProcessMethod(Method method, u32 argument) { + LOG_DEBUG(HW_GPU, "Vic method 0x{:X}", static_cast(method)); + const u64 arg = static_cast(argument) << 8; switch (method) { case Method::Execute: Execute(); @@ -56,8 +49,7 @@ void Vic::ProcessMethod(Method method, const std::vector& arguments) { void Vic::Execute() { if (output_surface_luma_address == 0) { - LOG_ERROR(Service_NVDRV, "VIC Luma address not set. Received 0x{:X}", - vic_state.output_surface.luma_offset); + LOG_ERROR(Service_NVDRV, "VIC Luma address not set."); return; } const VicConfig config{gpu.MemoryManager().Read(config_struct_address + 0x20)}; -- cgit v1.2.3