2019-06-07 11:34:55 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
namespace Service::Nvidia {
|
|
|
|
|
2019-06-07 12:56:30 -04:00
|
|
|
constexpr u32 MaxSyncPoints = 192;
|
2019-06-07 18:41:55 -04:00
|
|
|
constexpr u32 MaxNvEvents = 64;
|
2019-06-07 12:56:30 -04:00
|
|
|
|
2019-06-07 11:34:55 -04:00
|
|
|
struct Fence {
|
|
|
|
s32 id;
|
|
|
|
u32 value;
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(Fence) == 8, "Fence has wrong size");
|
|
|
|
|
|
|
|
struct MultiFence {
|
|
|
|
u32 num_fences;
|
|
|
|
std::array<Fence, 4> fences;
|
|
|
|
};
|
|
|
|
|
2019-06-07 18:41:55 -04:00
|
|
|
enum NvResult : u32 {
|
2019-06-07 11:34:55 -04:00
|
|
|
Success = 0,
|
2019-06-07 18:41:55 -04:00
|
|
|
BadParameter = 4,
|
|
|
|
Timeout = 5,
|
|
|
|
ResourceError = 15,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class EventState {
|
|
|
|
Free = 0,
|
|
|
|
Registered = 1,
|
|
|
|
Waiting = 2,
|
|
|
|
Busy = 3,
|
2019-06-07 11:34:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Service::Nvidia
|