service: Use nested namespace specifiers where applicable
Tidies up namespace declarations
This commit is contained in:
parent
17ad56c1dc
commit
ccca5e7c28
136 changed files with 273 additions and 570 deletions
|
@ -9,9 +9,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
/// Represents an abstract nvidia device node. It is to be subclassed by concrete device nodes to
|
||||
/// implement the ioctl interface.
|
||||
|
@ -38,6 +36,4 @@ public:
|
|||
virtual u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) = 0;
|
||||
};
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
#include "video_core/renderer_base.h"
|
||||
#include "video_core/video_core.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
u32 nvdisp_disp0::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
|
||||
UNIMPLEMENTED();
|
||||
|
@ -35,6 +33,4 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3
|
|||
VideoCore::g_renderer->SwapBuffers(framebuffer);
|
||||
}
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
#include "core/hle/service/nvflinger/buffer_queue.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
class nvmap;
|
||||
|
||||
|
@ -31,6 +29,4 @@ private:
|
|||
std::shared_ptr<nvmap> nvmap_dev;
|
||||
};
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
#include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvmap.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx",
|
||||
|
@ -115,6 +113,4 @@ u32 nvhost_as_gpu::GetVARegions(const std::vector<u8>& input, std::vector<u8>& o
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
#include "common/swap.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
class nvmap;
|
||||
|
||||
|
@ -100,6 +98,4 @@ private:
|
|||
std::shared_ptr<nvmap> nvmap_dev;
|
||||
};
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
#include "common/logging/log.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvhost_ctrl.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx",
|
||||
|
@ -59,6 +57,4 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>&
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
class nvhost_ctrl final : public nvdevice {
|
||||
public:
|
||||
|
@ -55,6 +53,4 @@ private:
|
|||
u32 IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output);
|
||||
};
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
#include "common/logging/log.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx",
|
||||
|
@ -122,6 +120,4 @@ u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>&
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
#include "common/swap.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
class nvhost_ctrl_gpu final : public nvdevice {
|
||||
public:
|
||||
|
@ -125,6 +123,5 @@ private:
|
|||
u32 ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output);
|
||||
u32 ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output);
|
||||
};
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
#include "core/core.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvhost_gpu.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx",
|
||||
|
@ -142,6 +140,4 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
#include "common/swap.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
class nvmap;
|
||||
constexpr u32 NVGPU_IOCTL_MAGIC('H');
|
||||
|
@ -139,6 +137,4 @@ private:
|
|||
std::shared_ptr<nvmap> nvmap_dev;
|
||||
};
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
#include "common/logging/log.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvmap.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
VAddr nvmap::GetObjectAddress(u32 handle) const {
|
||||
auto object = GetObject(handle);
|
||||
|
@ -144,6 +142,4 @@ u32 nvmap::IocParam(const std::vector<u8>& input, std::vector<u8>& output) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
#include "common/swap.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Devices {
|
||||
namespace Service::Nvidia::Devices {
|
||||
|
||||
class nvmap final : public nvdevice {
|
||||
public:
|
||||
|
@ -111,6 +109,4 @@ private:
|
|||
u32 IocParam(const std::vector<u8>& input, std::vector<u8>& output);
|
||||
};
|
||||
|
||||
} // namespace Devices
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia::Devices
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include "core/hle/service/nvdrv/interface.h"
|
||||
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Service::Nvidia {
|
||||
|
||||
void NVDRV::Open(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NVDRV, "called");
|
||||
|
@ -111,5 +110,4 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name)
|
|||
query_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NVDRV::query_event");
|
||||
}
|
||||
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Service::Nvidia {
|
||||
|
||||
class NVDRV final : public ServiceFramework<NVDRV> {
|
||||
public:
|
||||
|
@ -34,5 +33,4 @@ private:
|
|||
Kernel::SharedPtr<Kernel::Event> query_event;
|
||||
};
|
||||
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||
#include "core/hle/service/nvdrv/nvmemp.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Service::Nvidia {
|
||||
|
||||
std::weak_ptr<Module> nvdrv;
|
||||
|
||||
|
@ -69,5 +68,4 @@ ResultCode Module::Close(u32 fd) {
|
|||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Service::Nvidia {
|
||||
|
||||
namespace Devices {
|
||||
class nvdevice;
|
||||
|
@ -61,5 +60,4 @@ void InstallInterfaces(SM::ServiceManager& service_manager);
|
|||
|
||||
extern std::weak_ptr<Module> nvdrv;
|
||||
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||
#include "core/hle/service/nvdrv/nvmemp.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Service::Nvidia {
|
||||
|
||||
NVMEMP::NVMEMP() : ServiceFramework("nvmemp") {
|
||||
static const FunctionInfo functions[] = {
|
||||
|
@ -27,5 +26,4 @@ void NVMEMP::Cmd1(Kernel::HLERequestContext& ctx) {
|
|||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Nvidia {
|
||||
namespace Service::Nvidia {
|
||||
|
||||
class NVMEMP final : public ServiceFramework<NVMEMP> {
|
||||
public:
|
||||
|
@ -19,5 +18,4 @@ private:
|
|||
void Cmd1(Kernel::HLERequestContext& ctx);
|
||||
};
|
||||
|
||||
} // namespace Nvidia
|
||||
} // namespace Service
|
||||
} // namespace Service::Nvidia
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue