Address PR feedback

This commit is contained in:
Billy Laws 2021-11-01 20:46:37 +00:00 committed by PixelyIon
parent 1b453c04ca
commit d88b08d986
3 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,6 @@ namespace skyline::service::nvdrv::deserialisation {
auto out{buffer.subspan(offset, bytes).template cast<RemoveSlotSizeSpan<ArgType>, std::dynamic_extent, true>()}; auto out{buffer.subspan(offset, bytes).template cast<RemoveSlotSizeSpan<ArgType>, std::dynamic_extent, true>()};
offset += bytes; offset += bytes;
// Return a simple `span` as that will be the function argument type as opposed to `SlotSizeSpan` // Return a simple `span` as that will be the function argument type as opposed to `SlotSizeSpan`
return out; return out;
} }
@ -48,10 +47,8 @@ namespace skyline::service::nvdrv::deserialisation {
return std::tuple<Ts...>{std::forward<Ts>(ts)...}; return std::tuple<Ts...>{std::forward<Ts>(ts)...};
} }
template<typename Desc, typename ArgType, typename... ArgTypes> template<typename Desc, typename ArgType, typename... ArgTypes>
constexpr auto DecodeArgumentsImpl(span<u8, Desc::Size> buffer, size_t &offset, std::array<size_t, NumSaveSlots> &saveSlots) { constexpr auto DecodeArgumentsImpl(span<u8, Desc::Size> buffer, size_t &offset, std::array<size_t, NumSaveSlots> &saveSlots) {
if constexpr (IsAutoSizeSpan<ArgType>::value) { if constexpr (IsAutoSizeSpan<ArgType>::value) {
// AutoSizeSpan needs to be the last argument // AutoSizeSpan needs to be the last argument
static_assert(sizeof...(ArgTypes) == 0); static_assert(sizeof...(ArgTypes) == 0);

View File

@ -21,9 +21,11 @@ namespace skyline::soc::host1x {
syncpoints.at(incrSyncpoint.index).Increment(); syncpoints.at(incrSyncpoint.index).Increment();
break; break;
} }
case LoadSyncpointPayload32MethodId: case LoadSyncpointPayload32MethodId:
syncpointPayload = argument; syncpointPayload = argument;
break; break;
case WaitSyncpoint32MethodId: { case WaitSyncpoint32MethodId: {
u32 syncpointId{static_cast<u8>(argument)}; u32 syncpointId{static_cast<u8>(argument)};
state.logger->Debug("Wait syncpoint: {}, thresh: {}", syncpointId, syncpointPayload); state.logger->Debug("Wait syncpoint: {}, thresh: {}", syncpointId, syncpointPayload);
@ -31,6 +33,7 @@ namespace skyline::soc::host1x {
syncpoints.at(syncpointId).Wait(syncpointPayload, std::chrono::steady_clock::duration::max()); syncpoints.at(syncpointId).Wait(syncpointPayload, std::chrono::steady_clock::duration::max());
break; break;
} }
default: default:
state.logger->Error("Unknown host1x class method called: 0x{:X}", method); state.logger->Error("Unknown host1x class method called: 0x{:X}", method);
break; break;

View File

@ -56,7 +56,7 @@ namespace skyline::soc::host1x {
void Start(); void Start();
/** /**
* @brief Pushes a single gather into the fifo to be processed asynchronously * @brief Pushes a single gather into the FIFO to be processed asynchronously
*/ */
void Push(span<u32> gather); void Push(span<u32> gather);
}; };