From ded02e3eac1250662a6f880ef1543d8b79481225 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 31 Aug 2022 15:19:52 +0100 Subject: [PATCH] Small engine.h fixups --- app/src/main/cpp/skyline/soc/gm20b/engines/engine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/engine.h b/app/src/main/cpp/skyline/soc/gm20b/engines/engine.h index 69299e51..2b753ebe 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/engine.h +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/engine.h @@ -7,7 +7,7 @@ #include #define U32_OFFSET(regs, field) (offsetof(regs, field) / sizeof(u32)) -#define ENGINE_OFFSET(field) (sizeof(typeof(Registers::field)) - sizeof(std::remove_reference_t)) / sizeof(u32) +#define ENGINE_OFFSET(field) (sizeof(decltype(Registers::field)) - sizeof(std::remove_reference_t)) / sizeof(u32) #define ENGINE_STRUCT_OFFSET(field, member) ENGINE_OFFSET(field) + U32_OFFSET(std::remove_reference_t, member) #define ENGINE_STRUCT_STRUCT_OFFSET(field, member, submember) ENGINE_STRUCT_OFFSET(field, member) + U32_OFFSET(std::remove_reference_tmember)>, submember) #define ENGINE_STRUCT_ARRAY_OFFSET(field, member, index) ENGINE_STRUCT_OFFSET(field, member) + ((sizeof(std::remove_reference_tmember[0])>) / sizeof(u32)) * index) @@ -47,7 +47,7 @@ namespace skyline::soc::gm20b::engine { }; static_assert(sizeof(Address) == sizeof(u64)); - constexpr u32 EngineMethodsEnd = 0xE00; //!< All methods above this are passed to the MME on supported engines + constexpr u32 EngineMethodsEnd{0xE00}; //!< All methods above this are passed to the MME on supported engines /** * @brief Returns current time in GPU ticks