Reformat all the things!

This commit is contained in:
spycrab 2018-04-12 14:18:04 +02:00
parent d27e85e9d7
commit 40bb9974f2
179 changed files with 1888 additions and 991 deletions

View File

@ -10,7 +10,7 @@ AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterDefinitionReturnType: None

View File

@ -186,8 +186,9 @@ bool AlsaSound::AlsaInit()
// it is probably a bad idea to try to send more than one buffer of data // it is probably a bad idea to try to send more than one buffer of data
if ((unsigned int)frames_to_deliver > buffer_size) if ((unsigned int)frames_to_deliver > buffer_size)
frames_to_deliver = buffer_size; frames_to_deliver = buffer_size;
NOTICE_LOG(AUDIO, "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d " NOTICE_LOG(AUDIO,
"samples per fragments.", "ALSA gave us a %ld sample \"hardware\" buffer with %d periods. Will send %d "
"samples per fragments.",
buffer_size, periods, frames_to_deliver); buffer_size, periods, frames_to_deliver);
snd_pcm_sw_params_alloca(&swparams); snd_pcm_sw_params_alloca(&swparams);

View File

@ -29,6 +29,7 @@ public:
bool SetRunning(bool running) override; bool SetRunning(bool running) override;
static bool isValid() { return true; } static bool isValid() { return true; }
private: private:
// maximum number of frames the buffer can hold // maximum number of frames the buffer can hold
static constexpr size_t BUFFER_SIZE_MAX = 8192; static constexpr size_t BUFFER_SIZE_MAX = 8192;

View File

@ -44,6 +44,7 @@ public:
float GetCurrentSpeed() const { return m_speed.load(); } float GetCurrentSpeed() const { return m_speed.load(); }
void UpdateSpeed(float val) { m_speed.store(val); } void UpdateSpeed(float val) { m_speed.store(val); }
private: private:
static constexpr u32 MAX_SAMPLES = 1024 * 4; // 128 ms static constexpr u32 MAX_SAMPLES = 1024 * 4; // 128 ms
static constexpr u32 INDEX_MASK = MAX_SAMPLES * 2 - 1; static constexpr u32 INDEX_MASK = MAX_SAMPLES * 2 - 1;

View File

@ -17,6 +17,7 @@ public:
bool Init() override; bool Init() override;
bool SetRunning(bool running) override { return running; } bool SetRunning(bool running) override { return running; }
static bool isValid() { return true; } static bool isValid() { return true; }
private: private:
std::thread thread; std::thread thread;
Common::Event soundSyncEvent; Common::Event soundSyncEvent;

View File

@ -37,6 +37,7 @@ public:
void SetSkipSilence(bool skip) { skip_silence = skip; } void SetSkipSilence(bool skip) { skip_silence = skip; }
void AddStereoSamplesBE(const short* sample_data, u32 count, int sample_rate); // big endian void AddStereoSamplesBE(const short* sample_data, u32 count, int sample_rate); // big endian
u32 GetAudioSize() const { return audio_size; } u32 GetAudioSize() const { return audio_size; }
private: private:
static constexpr size_t BUFFER_SIZE = 32 * 1024; static constexpr size_t BUFFER_SIZE = 32 * 1024;

View File

@ -148,6 +148,7 @@ public:
// For convenience. // For convenience.
void Send(AnalyticsReportBuilder& report) { Send(std::move(report)); } void Send(AnalyticsReportBuilder& report) { Send(std::move(report)); }
protected: protected:
void ThreadProc(); void ThreadProc();

View File

@ -201,8 +201,12 @@ bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned
// (1 + 2^d + 2^(2d) + ...), i.e. 0x0001000100010001 or similar. These can // (1 + 2^d + 2^(2d) + ...), i.e. 0x0001000100010001 or similar. These can
// be derived using a table lookup on CLZ(d). // be derived using a table lookup on CLZ(d).
static const std::array<uint64_t, 6> multipliers = {{ static const std::array<uint64_t, 6> multipliers = {{
0x0000000000000001UL, 0x0000000100000001UL, 0x0001000100010001UL, 0x0101010101010101UL, 0x0000000000000001UL,
0x1111111111111111UL, 0x5555555555555555UL, 0x0000000100000001UL,
0x0001000100010001UL,
0x0101010101010101UL,
0x1111111111111111UL,
0x5555555555555555UL,
}}; }};
int multiplier_idx = CountLeadingZeros(d, kXRegSizeInBits) - 57; int multiplier_idx = CountLeadingZeros(d, kXRegSizeInBits) - 57;

View File

@ -147,6 +147,7 @@ public:
constexpr operator T() const { return Value(); } constexpr operator T() const { return Value(); }
constexpr std::size_t StartBit() const { return position; } constexpr std::size_t StartBit() const { return position; }
constexpr std::size_t NumBits() const { return bits; } constexpr std::size_t NumBits() const { return bits; }
private: private:
// StorageType is T for non-enum types and the underlying type of T if // StorageType is T for non-enum types and the underlying type of T if
// T is an enumeration. Note that T is wrapped within an enable_if in the // T is an enumeration. Note that T is wrapped within an enable_if in the

View File

@ -164,6 +164,7 @@ public:
constexpr int operator*() const { return m_bit; } constexpr int operator*() const { return m_bit; }
constexpr bool operator==(Iterator other) const { return m_bit == other.m_bit; } constexpr bool operator==(Iterator other) const { return m_bit == other.m_bit; }
constexpr bool operator!=(Iterator other) const { return m_bit != other.m_bit; } constexpr bool operator!=(Iterator other) const { return m_bit != other.m_bit; }
private: private:
IntTy m_val; IntTy m_val;
int m_bit; int m_bit;

View File

@ -230,6 +230,7 @@ public:
// This function should be triggered regularly over time so // This function should be triggered regularly over time so
// that we will fall back from the busy loop to sleeping. // that we will fall back from the busy loop to sleeping.
void AllowSleep() { m_may_sleep.Set(); } void AllowSleep() { m_may_sleep.Set(); }
private: private:
std::mutex m_wait_lock; std::mutex m_wait_lock;
std::mutex m_prepare_lock; std::mutex m_prepare_lock;

View File

@ -22,12 +22,12 @@ std::string LastStrerrorString()
{ {
char error_message[BUFFER_SIZE]; char error_message[BUFFER_SIZE];
// There are two variants of strerror_r. The XSI version stores the message to the passed-in // There are two variants of strerror_r. The XSI version stores the message to the passed-in
// buffer and returns an int (0 on success). The GNU version returns a pointer to the message, // buffer and returns an int (0 on success). The GNU version returns a pointer to the message,
// which might have been stored in the passed-in buffer or might be a static string. // which might have been stored in the passed-in buffer or might be a static string.
// We check defines in order to figure out variant is in use, and we store the returned value // We check defines in order to figure out variant is in use, and we store the returned value
// to a variable so that we'll get a compile-time check that our assumption was correct. // to a variable so that we'll get a compile-time check that our assumption was correct.
#if defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)) #if defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600))
const char* str = strerror_r(errno, error_message, BUFFER_SIZE); const char* str = strerror_r(errno, error_message, BUFFER_SIZE);

View File

@ -203,8 +203,7 @@ static bool GetModuleVersion(const wchar_t* name, Version* version)
void CompatPatchesInstall(LdrWatcher* watcher) void CompatPatchesInstall(LdrWatcher* watcher)
{ {
watcher->Install({{L"EZFRD64.dll", L"811EZFRD64.DLL"}, watcher->Install({{L"EZFRD64.dll", L"811EZFRD64.DLL"}, [](const LdrDllLoadEvent& event) {
[](const LdrDllLoadEvent& event) {
// *EZFRD64 is incldued in software packages for cheapo third-party gamepads // *EZFRD64 is incldued in software packages for cheapo third-party gamepads
// (and gamepad adapters). The module cannot handle its heap being above 4GB, // (and gamepad adapters). The module cannot handle its heap being above 4GB,
// which tends to happen very often on modern Windows. // which tends to happen very often on modern Windows.
@ -214,8 +213,7 @@ void CompatPatchesInstall(LdrWatcher* watcher)
auto patcher = ImportPatcher(event.base_address); auto patcher = ImportPatcher(event.base_address);
patcher.PatchIAT("kernel32.dll", "HeapCreate", HeapCreateLow4GB); patcher.PatchIAT("kernel32.dll", "HeapCreate", HeapCreateLow4GB);
}}); }});
watcher->Install({{L"ucrtbase.dll"}, watcher->Install({{L"ucrtbase.dll"}, [](const LdrDllLoadEvent& event) {
[](const LdrDllLoadEvent& event) {
// ucrtbase implements caching between fseek/fread, old versions have a bug // ucrtbase implements caching between fseek/fread, old versions have a bug
// such that some reads return incorrect data. This causes noticable bugs // such that some reads return incorrect data. This causes noticable bugs
// in dolphin since we use these APIs for reading game images. // in dolphin since we use these APIs for reading game images.

View File

@ -34,7 +34,12 @@ enum class System
}; };
constexpr std::array<LayerType, 7> SEARCH_ORDER{{ constexpr std::array<LayerType, 7> SEARCH_ORDER{{
LayerType::CurrentRun, LayerType::CommandLine, LayerType::Movie, LayerType::Netplay, LayerType::CurrentRun,
LayerType::LocalGame, LayerType::GlobalGame, LayerType::Base, LayerType::CommandLine,
LayerType::Movie,
LayerType::Netplay,
LayerType::LocalGame,
LayerType::GlobalGame,
LayerType::Base,
}}; }};
} }

View File

@ -69,6 +69,7 @@ public:
Section(iterator begin_, iterator end_) : m_begin(begin_), m_end(end_) {} Section(iterator begin_, iterator end_) : m_begin(begin_), m_end(end_) {}
iterator begin() const { return m_begin; } iterator begin() const { return m_begin; }
iterator end() const { return m_end; } iterator end() const { return m_end; }
private: private:
iterator m_begin; iterator m_begin;
iterator m_end; iterator m_end;
@ -81,6 +82,7 @@ public:
ConstSection(iterator begin_, iterator end_) : m_begin(begin_), m_end(end_) {} ConstSection(iterator begin_, iterator end_) : m_begin(begin_), m_end(end_) {}
iterator begin() const { return m_begin; } iterator begin() const { return m_begin; }
iterator end() const { return m_end; } iterator end() const { return m_end; }
private: private:
iterator m_begin; iterator m_begin;
iterator m_end; iterator m_end;

View File

@ -12,6 +12,7 @@ class DebugInterface
{ {
protected: protected:
virtual ~DebugInterface() {} virtual ~DebugInterface() {}
public: public:
virtual std::string Disassemble(unsigned int /*address*/) { return "NODEBUGGER"; } virtual std::string Disassemble(unsigned int /*address*/) { return "NODEBUGGER"; }
virtual std::string GetRawMemoryString(int /*memory*/, unsigned int /*address*/) virtual std::string GetRawMemoryString(int /*memory*/, unsigned int /*address*/)

View File

@ -51,6 +51,7 @@ public:
T& front() { return storage[head]; } T& front() { return storage[head]; }
const T& front() const { return storage[head]; } const T& front() const { return storage[head]; }
size_t size() const { return count; } size_t size() const { return count; }
private: private:
std::array<T, N> storage; std::array<T, N> storage;
int head = 0; int head = 0;

View File

@ -38,6 +38,7 @@ public:
} }
bool TestAndClear() { return TestAndSet(false); } bool TestAndClear() { return TestAndSet(false); }
private: private:
std::atomic_bool m_val; std::atomic_bool m_val;
}; };

View File

@ -1041,301 +1041,566 @@ struct GLFunc
const GLFunc gl_function_array[] = { const GLFunc gl_function_array[] = {
// gl_1_1 // gl_1_1
GLFUNC_ALWAYS_REQUIRED(glClearIndex), GLFUNC_ALWAYS_REQUIRED(glIndexMask), GLFUNC_ALWAYS_REQUIRED(glClearIndex),
GLFUNC_ALWAYS_REQUIRED(glAlphaFunc), GLFUNC_ALWAYS_REQUIRED(glLogicOp), GLFUNC_ALWAYS_REQUIRED(glIndexMask),
GLFUNC_ALWAYS_REQUIRED(glPointSize), GLFUNC_ALWAYS_REQUIRED(glLineStipple), GLFUNC_ALWAYS_REQUIRED(glAlphaFunc),
GLFUNC_ALWAYS_REQUIRED(glPolygonMode), GLFUNC_ALWAYS_REQUIRED(glPolygonStipple), GLFUNC_ALWAYS_REQUIRED(glLogicOp),
GLFUNC_ALWAYS_REQUIRED(glGetPolygonStipple), GLFUNC_ALWAYS_REQUIRED(glEdgeFlag), GLFUNC_ALWAYS_REQUIRED(glPointSize),
GLFUNC_ALWAYS_REQUIRED(glEdgeFlagv), GLFUNC_ALWAYS_REQUIRED(glClipPlane), GLFUNC_ALWAYS_REQUIRED(glLineStipple),
GLFUNC_ALWAYS_REQUIRED(glGetClipPlane), GLFUNC_ALWAYS_REQUIRED(glDrawBuffer), GLFUNC_ALWAYS_REQUIRED(glPolygonMode),
GLFUNC_ALWAYS_REQUIRED(glEnableClientState), GLFUNC_ALWAYS_REQUIRED(glDisableClientState), GLFUNC_ALWAYS_REQUIRED(glPolygonStipple),
GLFUNC_ALWAYS_REQUIRED(glGetDoublev), GLFUNC_ALWAYS_REQUIRED(glPushAttrib), GLFUNC_ALWAYS_REQUIRED(glGetPolygonStipple),
GLFUNC_ALWAYS_REQUIRED(glPopAttrib), GLFUNC_ALWAYS_REQUIRED(glPushClientAttrib), GLFUNC_ALWAYS_REQUIRED(glEdgeFlag),
GLFUNC_ALWAYS_REQUIRED(glPopClientAttrib), GLFUNC_ALWAYS_REQUIRED(glRenderMode), GLFUNC_ALWAYS_REQUIRED(glEdgeFlagv),
GLFUNC_ALWAYS_REQUIRED(glClearDepth), GLFUNC_ALWAYS_REQUIRED(glDepthRange), GLFUNC_ALWAYS_REQUIRED(glClipPlane),
GLFUNC_ALWAYS_REQUIRED(glClearAccum), GLFUNC_ALWAYS_REQUIRED(glAccum), GLFUNC_ALWAYS_REQUIRED(glGetClipPlane),
GLFUNC_ALWAYS_REQUIRED(glMatrixMode), GLFUNC_ALWAYS_REQUIRED(glOrtho), GLFUNC_ALWAYS_REQUIRED(glDrawBuffer),
GLFUNC_ALWAYS_REQUIRED(glFrustum), GLFUNC_ALWAYS_REQUIRED(glPushMatrix), GLFUNC_ALWAYS_REQUIRED(glEnableClientState),
GLFUNC_ALWAYS_REQUIRED(glPopMatrix), GLFUNC_ALWAYS_REQUIRED(glLoadIdentity), GLFUNC_ALWAYS_REQUIRED(glDisableClientState),
GLFUNC_ALWAYS_REQUIRED(glLoadMatrixd), GLFUNC_ALWAYS_REQUIRED(glLoadMatrixf), GLFUNC_ALWAYS_REQUIRED(glGetDoublev),
GLFUNC_ALWAYS_REQUIRED(glMultMatrixd), GLFUNC_ALWAYS_REQUIRED(glMultMatrixf), GLFUNC_ALWAYS_REQUIRED(glPushAttrib),
GLFUNC_ALWAYS_REQUIRED(glRotated), GLFUNC_ALWAYS_REQUIRED(glRotatef), GLFUNC_ALWAYS_REQUIRED(glPopAttrib),
GLFUNC_ALWAYS_REQUIRED(glScaled), GLFUNC_ALWAYS_REQUIRED(glScalef), GLFUNC_ALWAYS_REQUIRED(glPushClientAttrib),
GLFUNC_ALWAYS_REQUIRED(glTranslated), GLFUNC_ALWAYS_REQUIRED(glTranslatef), GLFUNC_ALWAYS_REQUIRED(glPopClientAttrib),
GLFUNC_ALWAYS_REQUIRED(glIsList), GLFUNC_ALWAYS_REQUIRED(glDeleteLists), GLFUNC_ALWAYS_REQUIRED(glRenderMode),
GLFUNC_ALWAYS_REQUIRED(glGenLists), GLFUNC_ALWAYS_REQUIRED(glNewList), GLFUNC_ALWAYS_REQUIRED(glClearDepth),
GLFUNC_ALWAYS_REQUIRED(glEndList), GLFUNC_ALWAYS_REQUIRED(glCallList), GLFUNC_ALWAYS_REQUIRED(glDepthRange),
GLFUNC_ALWAYS_REQUIRED(glCallLists), GLFUNC_ALWAYS_REQUIRED(glListBase), GLFUNC_ALWAYS_REQUIRED(glClearAccum),
GLFUNC_ALWAYS_REQUIRED(glBegin), GLFUNC_ALWAYS_REQUIRED(glEnd), GLFUNC_ALWAYS_REQUIRED(glAccum),
GLFUNC_ALWAYS_REQUIRED(glVertex2d), GLFUNC_ALWAYS_REQUIRED(glVertex2f), GLFUNC_ALWAYS_REQUIRED(glMatrixMode),
GLFUNC_ALWAYS_REQUIRED(glVertex2i), GLFUNC_ALWAYS_REQUIRED(glVertex2s), GLFUNC_ALWAYS_REQUIRED(glOrtho),
GLFUNC_ALWAYS_REQUIRED(glVertex3d), GLFUNC_ALWAYS_REQUIRED(glVertex3f), GLFUNC_ALWAYS_REQUIRED(glFrustum),
GLFUNC_ALWAYS_REQUIRED(glVertex3i), GLFUNC_ALWAYS_REQUIRED(glVertex3s), GLFUNC_ALWAYS_REQUIRED(glPushMatrix),
GLFUNC_ALWAYS_REQUIRED(glVertex4d), GLFUNC_ALWAYS_REQUIRED(glVertex4f), GLFUNC_ALWAYS_REQUIRED(glPopMatrix),
GLFUNC_ALWAYS_REQUIRED(glVertex4i), GLFUNC_ALWAYS_REQUIRED(glVertex4s), GLFUNC_ALWAYS_REQUIRED(glLoadIdentity),
GLFUNC_ALWAYS_REQUIRED(glVertex2dv), GLFUNC_ALWAYS_REQUIRED(glVertex2fv), GLFUNC_ALWAYS_REQUIRED(glLoadMatrixd),
GLFUNC_ALWAYS_REQUIRED(glVertex2iv), GLFUNC_ALWAYS_REQUIRED(glVertex2sv), GLFUNC_ALWAYS_REQUIRED(glLoadMatrixf),
GLFUNC_ALWAYS_REQUIRED(glVertex3dv), GLFUNC_ALWAYS_REQUIRED(glVertex3fv), GLFUNC_ALWAYS_REQUIRED(glMultMatrixd),
GLFUNC_ALWAYS_REQUIRED(glVertex3iv), GLFUNC_ALWAYS_REQUIRED(glVertex3sv), GLFUNC_ALWAYS_REQUIRED(glMultMatrixf),
GLFUNC_ALWAYS_REQUIRED(glVertex4dv), GLFUNC_ALWAYS_REQUIRED(glVertex4fv), GLFUNC_ALWAYS_REQUIRED(glRotated),
GLFUNC_ALWAYS_REQUIRED(glVertex4iv), GLFUNC_ALWAYS_REQUIRED(glVertex4sv), GLFUNC_ALWAYS_REQUIRED(glRotatef),
GLFUNC_ALWAYS_REQUIRED(glNormal3b), GLFUNC_ALWAYS_REQUIRED(glNormal3d), GLFUNC_ALWAYS_REQUIRED(glScaled),
GLFUNC_ALWAYS_REQUIRED(glNormal3f), GLFUNC_ALWAYS_REQUIRED(glNormal3i), GLFUNC_ALWAYS_REQUIRED(glScalef),
GLFUNC_ALWAYS_REQUIRED(glNormal3s), GLFUNC_ALWAYS_REQUIRED(glNormal3bv), GLFUNC_ALWAYS_REQUIRED(glTranslated),
GLFUNC_ALWAYS_REQUIRED(glNormal3dv), GLFUNC_ALWAYS_REQUIRED(glNormal3fv), GLFUNC_ALWAYS_REQUIRED(glTranslatef),
GLFUNC_ALWAYS_REQUIRED(glNormal3iv), GLFUNC_ALWAYS_REQUIRED(glNormal3sv), GLFUNC_ALWAYS_REQUIRED(glIsList),
GLFUNC_ALWAYS_REQUIRED(glIndexd), GLFUNC_ALWAYS_REQUIRED(glIndexf), GLFUNC_ALWAYS_REQUIRED(glDeleteLists),
GLFUNC_ALWAYS_REQUIRED(glIndexi), GLFUNC_ALWAYS_REQUIRED(glIndexs), GLFUNC_ALWAYS_REQUIRED(glGenLists),
GLFUNC_ALWAYS_REQUIRED(glIndexub), GLFUNC_ALWAYS_REQUIRED(glIndexdv), GLFUNC_ALWAYS_REQUIRED(glNewList),
GLFUNC_ALWAYS_REQUIRED(glIndexfv), GLFUNC_ALWAYS_REQUIRED(glIndexiv), GLFUNC_ALWAYS_REQUIRED(glEndList),
GLFUNC_ALWAYS_REQUIRED(glIndexsv), GLFUNC_ALWAYS_REQUIRED(glIndexubv), GLFUNC_ALWAYS_REQUIRED(glCallList),
GLFUNC_ALWAYS_REQUIRED(glColor3b), GLFUNC_ALWAYS_REQUIRED(glColor3d), GLFUNC_ALWAYS_REQUIRED(glCallLists),
GLFUNC_ALWAYS_REQUIRED(glColor3f), GLFUNC_ALWAYS_REQUIRED(glColor3i), GLFUNC_ALWAYS_REQUIRED(glListBase),
GLFUNC_ALWAYS_REQUIRED(glColor3s), GLFUNC_ALWAYS_REQUIRED(glColor3ub), GLFUNC_ALWAYS_REQUIRED(glBegin),
GLFUNC_ALWAYS_REQUIRED(glColor3ui), GLFUNC_ALWAYS_REQUIRED(glColor3us), GLFUNC_ALWAYS_REQUIRED(glEnd),
GLFUNC_ALWAYS_REQUIRED(glColor4b), GLFUNC_ALWAYS_REQUIRED(glColor4d), GLFUNC_ALWAYS_REQUIRED(glVertex2d),
GLFUNC_ALWAYS_REQUIRED(glColor4f), GLFUNC_ALWAYS_REQUIRED(glColor4i), GLFUNC_ALWAYS_REQUIRED(glVertex2f),
GLFUNC_ALWAYS_REQUIRED(glColor4s), GLFUNC_ALWAYS_REQUIRED(glColor4ub), GLFUNC_ALWAYS_REQUIRED(glVertex2i),
GLFUNC_ALWAYS_REQUIRED(glColor4ui), GLFUNC_ALWAYS_REQUIRED(glColor4us), GLFUNC_ALWAYS_REQUIRED(glVertex2s),
GLFUNC_ALWAYS_REQUIRED(glColor3bv), GLFUNC_ALWAYS_REQUIRED(glColor3dv), GLFUNC_ALWAYS_REQUIRED(glVertex3d),
GLFUNC_ALWAYS_REQUIRED(glColor3fv), GLFUNC_ALWAYS_REQUIRED(glColor3iv), GLFUNC_ALWAYS_REQUIRED(glVertex3f),
GLFUNC_ALWAYS_REQUIRED(glColor3sv), GLFUNC_ALWAYS_REQUIRED(glColor3ubv), GLFUNC_ALWAYS_REQUIRED(glVertex3i),
GLFUNC_ALWAYS_REQUIRED(glColor3uiv), GLFUNC_ALWAYS_REQUIRED(glColor3usv), GLFUNC_ALWAYS_REQUIRED(glVertex3s),
GLFUNC_ALWAYS_REQUIRED(glColor4bv), GLFUNC_ALWAYS_REQUIRED(glColor4dv), GLFUNC_ALWAYS_REQUIRED(glVertex4d),
GLFUNC_ALWAYS_REQUIRED(glColor4fv), GLFUNC_ALWAYS_REQUIRED(glColor4iv), GLFUNC_ALWAYS_REQUIRED(glVertex4f),
GLFUNC_ALWAYS_REQUIRED(glColor4sv), GLFUNC_ALWAYS_REQUIRED(glColor4ubv), GLFUNC_ALWAYS_REQUIRED(glVertex4i),
GLFUNC_ALWAYS_REQUIRED(glColor4uiv), GLFUNC_ALWAYS_REQUIRED(glColor4usv), GLFUNC_ALWAYS_REQUIRED(glVertex4s),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1d), GLFUNC_ALWAYS_REQUIRED(glTexCoord1f), GLFUNC_ALWAYS_REQUIRED(glVertex2dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1i), GLFUNC_ALWAYS_REQUIRED(glTexCoord1s), GLFUNC_ALWAYS_REQUIRED(glVertex2fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2d), GLFUNC_ALWAYS_REQUIRED(glTexCoord2f), GLFUNC_ALWAYS_REQUIRED(glVertex2iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2i), GLFUNC_ALWAYS_REQUIRED(glTexCoord2s), GLFUNC_ALWAYS_REQUIRED(glVertex2sv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3d), GLFUNC_ALWAYS_REQUIRED(glTexCoord3f), GLFUNC_ALWAYS_REQUIRED(glVertex3dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3i), GLFUNC_ALWAYS_REQUIRED(glTexCoord3s), GLFUNC_ALWAYS_REQUIRED(glVertex3fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4d), GLFUNC_ALWAYS_REQUIRED(glTexCoord4f), GLFUNC_ALWAYS_REQUIRED(glVertex3iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4i), GLFUNC_ALWAYS_REQUIRED(glTexCoord4s), GLFUNC_ALWAYS_REQUIRED(glVertex3sv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1dv), GLFUNC_ALWAYS_REQUIRED(glTexCoord1fv), GLFUNC_ALWAYS_REQUIRED(glVertex4dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1iv), GLFUNC_ALWAYS_REQUIRED(glTexCoord1sv), GLFUNC_ALWAYS_REQUIRED(glVertex4fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2dv), GLFUNC_ALWAYS_REQUIRED(glTexCoord2fv), GLFUNC_ALWAYS_REQUIRED(glVertex4iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2iv), GLFUNC_ALWAYS_REQUIRED(glTexCoord2sv), GLFUNC_ALWAYS_REQUIRED(glVertex4sv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3dv), GLFUNC_ALWAYS_REQUIRED(glTexCoord3fv), GLFUNC_ALWAYS_REQUIRED(glNormal3b),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3iv), GLFUNC_ALWAYS_REQUIRED(glTexCoord3sv), GLFUNC_ALWAYS_REQUIRED(glNormal3d),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4dv), GLFUNC_ALWAYS_REQUIRED(glTexCoord4fv), GLFUNC_ALWAYS_REQUIRED(glNormal3f),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4iv), GLFUNC_ALWAYS_REQUIRED(glTexCoord4sv), GLFUNC_ALWAYS_REQUIRED(glNormal3i),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2d), GLFUNC_ALWAYS_REQUIRED(glRasterPos2f), GLFUNC_ALWAYS_REQUIRED(glNormal3s),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2i), GLFUNC_ALWAYS_REQUIRED(glRasterPos2s), GLFUNC_ALWAYS_REQUIRED(glNormal3bv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3d), GLFUNC_ALWAYS_REQUIRED(glRasterPos3f), GLFUNC_ALWAYS_REQUIRED(glNormal3dv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3i), GLFUNC_ALWAYS_REQUIRED(glRasterPos3s), GLFUNC_ALWAYS_REQUIRED(glNormal3fv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4d), GLFUNC_ALWAYS_REQUIRED(glRasterPos4f), GLFUNC_ALWAYS_REQUIRED(glNormal3iv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4i), GLFUNC_ALWAYS_REQUIRED(glRasterPos4s), GLFUNC_ALWAYS_REQUIRED(glNormal3sv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2dv), GLFUNC_ALWAYS_REQUIRED(glRasterPos2fv), GLFUNC_ALWAYS_REQUIRED(glIndexd),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2iv), GLFUNC_ALWAYS_REQUIRED(glRasterPos2sv), GLFUNC_ALWAYS_REQUIRED(glIndexf),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3dv), GLFUNC_ALWAYS_REQUIRED(glRasterPos3fv), GLFUNC_ALWAYS_REQUIRED(glIndexi),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3iv), GLFUNC_ALWAYS_REQUIRED(glRasterPos3sv), GLFUNC_ALWAYS_REQUIRED(glIndexs),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4dv), GLFUNC_ALWAYS_REQUIRED(glRasterPos4fv), GLFUNC_ALWAYS_REQUIRED(glIndexub),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4iv), GLFUNC_ALWAYS_REQUIRED(glRasterPos4sv), GLFUNC_ALWAYS_REQUIRED(glIndexdv),
GLFUNC_ALWAYS_REQUIRED(glRectd), GLFUNC_ALWAYS_REQUIRED(glRectf), GLFUNC_ALWAYS_REQUIRED(glIndexfv),
GLFUNC_ALWAYS_REQUIRED(glRecti), GLFUNC_ALWAYS_REQUIRED(glRects), GLFUNC_ALWAYS_REQUIRED(glIndexiv),
GLFUNC_ALWAYS_REQUIRED(glRectdv), GLFUNC_ALWAYS_REQUIRED(glRectfv), GLFUNC_ALWAYS_REQUIRED(glIndexsv),
GLFUNC_ALWAYS_REQUIRED(glRectiv), GLFUNC_ALWAYS_REQUIRED(glRectsv), GLFUNC_ALWAYS_REQUIRED(glIndexubv),
GLFUNC_ALWAYS_REQUIRED(glVertexPointer), GLFUNC_ALWAYS_REQUIRED(glNormalPointer), GLFUNC_ALWAYS_REQUIRED(glColor3b),
GLFUNC_ALWAYS_REQUIRED(glColorPointer), GLFUNC_ALWAYS_REQUIRED(glIndexPointer), GLFUNC_ALWAYS_REQUIRED(glColor3d),
GLFUNC_ALWAYS_REQUIRED(glTexCoordPointer), GLFUNC_ALWAYS_REQUIRED(glEdgeFlagPointer), GLFUNC_ALWAYS_REQUIRED(glColor3f),
GLFUNC_ALWAYS_REQUIRED(glArrayElement), GLFUNC_ALWAYS_REQUIRED(glInterleavedArrays), GLFUNC_ALWAYS_REQUIRED(glColor3i),
GLFUNC_ALWAYS_REQUIRED(glShadeModel), GLFUNC_ALWAYS_REQUIRED(glLightf), GLFUNC_ALWAYS_REQUIRED(glColor3s),
GLFUNC_ALWAYS_REQUIRED(glLighti), GLFUNC_ALWAYS_REQUIRED(glLightfv), GLFUNC_ALWAYS_REQUIRED(glColor3ub),
GLFUNC_ALWAYS_REQUIRED(glLightiv), GLFUNC_ALWAYS_REQUIRED(glGetLightfv), GLFUNC_ALWAYS_REQUIRED(glColor3ui),
GLFUNC_ALWAYS_REQUIRED(glGetLightiv), GLFUNC_ALWAYS_REQUIRED(glLightModelf), GLFUNC_ALWAYS_REQUIRED(glColor3us),
GLFUNC_ALWAYS_REQUIRED(glLightModeli), GLFUNC_ALWAYS_REQUIRED(glLightModelfv), GLFUNC_ALWAYS_REQUIRED(glColor4b),
GLFUNC_ALWAYS_REQUIRED(glLightModeliv), GLFUNC_ALWAYS_REQUIRED(glMaterialf), GLFUNC_ALWAYS_REQUIRED(glColor4d),
GLFUNC_ALWAYS_REQUIRED(glMateriali), GLFUNC_ALWAYS_REQUIRED(glMaterialfv), GLFUNC_ALWAYS_REQUIRED(glColor4f),
GLFUNC_ALWAYS_REQUIRED(glMaterialiv), GLFUNC_ALWAYS_REQUIRED(glGetMaterialfv), GLFUNC_ALWAYS_REQUIRED(glColor4i),
GLFUNC_ALWAYS_REQUIRED(glGetMaterialiv), GLFUNC_ALWAYS_REQUIRED(glColorMaterial), GLFUNC_ALWAYS_REQUIRED(glColor4s),
GLFUNC_ALWAYS_REQUIRED(glPixelZoom), GLFUNC_ALWAYS_REQUIRED(glPixelStoref), GLFUNC_ALWAYS_REQUIRED(glColor4ub),
GLFUNC_ALWAYS_REQUIRED(glPixelTransferf), GLFUNC_ALWAYS_REQUIRED(glPixelTransferi), GLFUNC_ALWAYS_REQUIRED(glColor4ui),
GLFUNC_ALWAYS_REQUIRED(glPixelMapfv), GLFUNC_ALWAYS_REQUIRED(glPixelMapuiv), GLFUNC_ALWAYS_REQUIRED(glColor4us),
GLFUNC_ALWAYS_REQUIRED(glPixelMapusv), GLFUNC_ALWAYS_REQUIRED(glGetPixelMapfv), GLFUNC_ALWAYS_REQUIRED(glColor3bv),
GLFUNC_ALWAYS_REQUIRED(glGetPixelMapuiv), GLFUNC_ALWAYS_REQUIRED(glGetPixelMapusv), GLFUNC_ALWAYS_REQUIRED(glColor3dv),
GLFUNC_ALWAYS_REQUIRED(glBitmap), GLFUNC_ALWAYS_REQUIRED(glDrawPixels), GLFUNC_ALWAYS_REQUIRED(glColor3fv),
GLFUNC_ALWAYS_REQUIRED(glCopyPixels), GLFUNC_ALWAYS_REQUIRED(glTexGend), GLFUNC_ALWAYS_REQUIRED(glColor3iv),
GLFUNC_ALWAYS_REQUIRED(glTexGenf), GLFUNC_ALWAYS_REQUIRED(glTexGeni), GLFUNC_ALWAYS_REQUIRED(glColor3sv),
GLFUNC_ALWAYS_REQUIRED(glTexGendv), GLFUNC_ALWAYS_REQUIRED(glTexGenfv), GLFUNC_ALWAYS_REQUIRED(glColor3ubv),
GLFUNC_ALWAYS_REQUIRED(glTexGeniv), GLFUNC_ALWAYS_REQUIRED(glGetTexGendv), GLFUNC_ALWAYS_REQUIRED(glColor3uiv),
GLFUNC_ALWAYS_REQUIRED(glGetTexGenfv), GLFUNC_ALWAYS_REQUIRED(glGetTexGeniv), GLFUNC_ALWAYS_REQUIRED(glColor3usv),
GLFUNC_ALWAYS_REQUIRED(glTexEnvf), GLFUNC_ALWAYS_REQUIRED(glTexEnvi), GLFUNC_ALWAYS_REQUIRED(glColor4bv),
GLFUNC_ALWAYS_REQUIRED(glTexEnvfv), GLFUNC_ALWAYS_REQUIRED(glTexEnviv), GLFUNC_ALWAYS_REQUIRED(glColor4dv),
GLFUNC_ALWAYS_REQUIRED(glGetTexEnvfv), GLFUNC_ALWAYS_REQUIRED(glGetTexEnviv), GLFUNC_ALWAYS_REQUIRED(glColor4fv),
GLFUNC_ALWAYS_REQUIRED(glColor4iv),
GLFUNC_ALWAYS_REQUIRED(glColor4sv),
GLFUNC_ALWAYS_REQUIRED(glColor4ubv),
GLFUNC_ALWAYS_REQUIRED(glColor4uiv),
GLFUNC_ALWAYS_REQUIRED(glColor4usv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1d),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1f),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1i),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1s),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2d),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2f),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2i),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2s),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3d),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3f),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3i),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3s),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4d),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4f),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4i),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4s),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord1sv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord2sv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord3sv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4dv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4fv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4iv),
GLFUNC_ALWAYS_REQUIRED(glTexCoord4sv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2d),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2f),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2i),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2s),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3d),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3f),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3i),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3s),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4d),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4f),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4i),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4s),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2dv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2fv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2iv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos2sv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3dv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3fv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3iv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos3sv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4dv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4fv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4iv),
GLFUNC_ALWAYS_REQUIRED(glRasterPos4sv),
GLFUNC_ALWAYS_REQUIRED(glRectd),
GLFUNC_ALWAYS_REQUIRED(glRectf),
GLFUNC_ALWAYS_REQUIRED(glRecti),
GLFUNC_ALWAYS_REQUIRED(glRects),
GLFUNC_ALWAYS_REQUIRED(glRectdv),
GLFUNC_ALWAYS_REQUIRED(glRectfv),
GLFUNC_ALWAYS_REQUIRED(glRectiv),
GLFUNC_ALWAYS_REQUIRED(glRectsv),
GLFUNC_ALWAYS_REQUIRED(glVertexPointer),
GLFUNC_ALWAYS_REQUIRED(glNormalPointer),
GLFUNC_ALWAYS_REQUIRED(glColorPointer),
GLFUNC_ALWAYS_REQUIRED(glIndexPointer),
GLFUNC_ALWAYS_REQUIRED(glTexCoordPointer),
GLFUNC_ALWAYS_REQUIRED(glEdgeFlagPointer),
GLFUNC_ALWAYS_REQUIRED(glArrayElement),
GLFUNC_ALWAYS_REQUIRED(glInterleavedArrays),
GLFUNC_ALWAYS_REQUIRED(glShadeModel),
GLFUNC_ALWAYS_REQUIRED(glLightf),
GLFUNC_ALWAYS_REQUIRED(glLighti),
GLFUNC_ALWAYS_REQUIRED(glLightfv),
GLFUNC_ALWAYS_REQUIRED(glLightiv),
GLFUNC_ALWAYS_REQUIRED(glGetLightfv),
GLFUNC_ALWAYS_REQUIRED(glGetLightiv),
GLFUNC_ALWAYS_REQUIRED(glLightModelf),
GLFUNC_ALWAYS_REQUIRED(glLightModeli),
GLFUNC_ALWAYS_REQUIRED(glLightModelfv),
GLFUNC_ALWAYS_REQUIRED(glLightModeliv),
GLFUNC_ALWAYS_REQUIRED(glMaterialf),
GLFUNC_ALWAYS_REQUIRED(glMateriali),
GLFUNC_ALWAYS_REQUIRED(glMaterialfv),
GLFUNC_ALWAYS_REQUIRED(glMaterialiv),
GLFUNC_ALWAYS_REQUIRED(glGetMaterialfv),
GLFUNC_ALWAYS_REQUIRED(glGetMaterialiv),
GLFUNC_ALWAYS_REQUIRED(glColorMaterial),
GLFUNC_ALWAYS_REQUIRED(glPixelZoom),
GLFUNC_ALWAYS_REQUIRED(glPixelStoref),
GLFUNC_ALWAYS_REQUIRED(glPixelTransferf),
GLFUNC_ALWAYS_REQUIRED(glPixelTransferi),
GLFUNC_ALWAYS_REQUIRED(glPixelMapfv),
GLFUNC_ALWAYS_REQUIRED(glPixelMapuiv),
GLFUNC_ALWAYS_REQUIRED(glPixelMapusv),
GLFUNC_ALWAYS_REQUIRED(glGetPixelMapfv),
GLFUNC_ALWAYS_REQUIRED(glGetPixelMapuiv),
GLFUNC_ALWAYS_REQUIRED(glGetPixelMapusv),
GLFUNC_ALWAYS_REQUIRED(glBitmap),
GLFUNC_ALWAYS_REQUIRED(glDrawPixels),
GLFUNC_ALWAYS_REQUIRED(glCopyPixels),
GLFUNC_ALWAYS_REQUIRED(glTexGend),
GLFUNC_ALWAYS_REQUIRED(glTexGenf),
GLFUNC_ALWAYS_REQUIRED(glTexGeni),
GLFUNC_ALWAYS_REQUIRED(glTexGendv),
GLFUNC_ALWAYS_REQUIRED(glTexGenfv),
GLFUNC_ALWAYS_REQUIRED(glTexGeniv),
GLFUNC_ALWAYS_REQUIRED(glGetTexGendv),
GLFUNC_ALWAYS_REQUIRED(glGetTexGenfv),
GLFUNC_ALWAYS_REQUIRED(glGetTexGeniv),
GLFUNC_ALWAYS_REQUIRED(glTexEnvf),
GLFUNC_ALWAYS_REQUIRED(glTexEnvi),
GLFUNC_ALWAYS_REQUIRED(glTexEnvfv),
GLFUNC_ALWAYS_REQUIRED(glTexEnviv),
GLFUNC_ALWAYS_REQUIRED(glGetTexEnvfv),
GLFUNC_ALWAYS_REQUIRED(glGetTexEnviv),
GLFUNC_ALWAYS_REQUIRED(glGetTexLevelParameterfv), GLFUNC_ALWAYS_REQUIRED(glGetTexLevelParameterfv),
GLFUNC_ALWAYS_REQUIRED(glGetTexLevelParameteriv), GLFUNC_ALWAYS_REQUIRED(glTexImage1D), GLFUNC_ALWAYS_REQUIRED(glGetTexLevelParameteriv),
GLFUNC_ALWAYS_REQUIRED(glGetTexImage), GLFUNC_ALWAYS_REQUIRED(glPrioritizeTextures), GLFUNC_ALWAYS_REQUIRED(glTexImage1D),
GLFUNC_ALWAYS_REQUIRED(glAreTexturesResident), GLFUNC_ALWAYS_REQUIRED(glTexSubImage1D), GLFUNC_ALWAYS_REQUIRED(glGetTexImage),
GLFUNC_ALWAYS_REQUIRED(glCopyTexImage1D), GLFUNC_ALWAYS_REQUIRED(glCopyTexSubImage1D), GLFUNC_ALWAYS_REQUIRED(glPrioritizeTextures),
GLFUNC_ALWAYS_REQUIRED(glMap1d), GLFUNC_ALWAYS_REQUIRED(glMap1f), GLFUNC_ALWAYS_REQUIRED(glAreTexturesResident),
GLFUNC_ALWAYS_REQUIRED(glMap2d), GLFUNC_ALWAYS_REQUIRED(glMap2f), GLFUNC_ALWAYS_REQUIRED(glTexSubImage1D),
GLFUNC_ALWAYS_REQUIRED(glGetMapdv), GLFUNC_ALWAYS_REQUIRED(glGetMapfv), GLFUNC_ALWAYS_REQUIRED(glCopyTexImage1D),
GLFUNC_ALWAYS_REQUIRED(glGetMapiv), GLFUNC_ALWAYS_REQUIRED(glEvalCoord1d), GLFUNC_ALWAYS_REQUIRED(glCopyTexSubImage1D),
GLFUNC_ALWAYS_REQUIRED(glEvalCoord1f), GLFUNC_ALWAYS_REQUIRED(glEvalCoord1dv), GLFUNC_ALWAYS_REQUIRED(glMap1d),
GLFUNC_ALWAYS_REQUIRED(glEvalCoord1fv), GLFUNC_ALWAYS_REQUIRED(glEvalCoord2d), GLFUNC_ALWAYS_REQUIRED(glMap1f),
GLFUNC_ALWAYS_REQUIRED(glEvalCoord2f), GLFUNC_ALWAYS_REQUIRED(glEvalCoord2dv), GLFUNC_ALWAYS_REQUIRED(glMap2d),
GLFUNC_ALWAYS_REQUIRED(glEvalCoord2fv), GLFUNC_ALWAYS_REQUIRED(glMapGrid1d), GLFUNC_ALWAYS_REQUIRED(glMap2f),
GLFUNC_ALWAYS_REQUIRED(glMapGrid1f), GLFUNC_ALWAYS_REQUIRED(glMapGrid2d), GLFUNC_ALWAYS_REQUIRED(glGetMapdv),
GLFUNC_ALWAYS_REQUIRED(glMapGrid2f), GLFUNC_ALWAYS_REQUIRED(glEvalPoint1), GLFUNC_ALWAYS_REQUIRED(glGetMapfv),
GLFUNC_ALWAYS_REQUIRED(glEvalPoint2), GLFUNC_ALWAYS_REQUIRED(glEvalMesh1), GLFUNC_ALWAYS_REQUIRED(glGetMapiv),
GLFUNC_ALWAYS_REQUIRED(glEvalMesh2), GLFUNC_ALWAYS_REQUIRED(glFogf), GLFUNC_ALWAYS_REQUIRED(glEvalCoord1d),
GLFUNC_ALWAYS_REQUIRED(glFogi), GLFUNC_ALWAYS_REQUIRED(glFogfv), GLFUNC_ALWAYS_REQUIRED(glEvalCoord1f),
GLFUNC_ALWAYS_REQUIRED(glFogiv), GLFUNC_ALWAYS_REQUIRED(glFeedbackBuffer), GLFUNC_ALWAYS_REQUIRED(glEvalCoord1dv),
GLFUNC_ALWAYS_REQUIRED(glPassThrough), GLFUNC_ALWAYS_REQUIRED(glSelectBuffer), GLFUNC_ALWAYS_REQUIRED(glEvalCoord1fv),
GLFUNC_ALWAYS_REQUIRED(glInitNames), GLFUNC_ALWAYS_REQUIRED(glLoadName), GLFUNC_ALWAYS_REQUIRED(glEvalCoord2d),
GLFUNC_ALWAYS_REQUIRED(glPushName), GLFUNC_ALWAYS_REQUIRED(glPopName), GLFUNC_ALWAYS_REQUIRED(glEvalCoord2f),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexImage2D), GL_ES_FUNC_ALWAYS_REQUIRED(glClearColor), GLFUNC_ALWAYS_REQUIRED(glEvalCoord2dv),
GL_ES_FUNC_ALWAYS_REQUIRED(glClear), GL_ES_FUNC_ALWAYS_REQUIRED(glColorMask), GLFUNC_ALWAYS_REQUIRED(glEvalCoord2fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendFunc), GL_ES_FUNC_ALWAYS_REQUIRED(glCullFace), GLFUNC_ALWAYS_REQUIRED(glMapGrid1d),
GL_ES_FUNC_ALWAYS_REQUIRED(glFrontFace), GL_ES_FUNC_ALWAYS_REQUIRED(glLineWidth), GLFUNC_ALWAYS_REQUIRED(glMapGrid1f),
GL_ES_FUNC_ALWAYS_REQUIRED(glPolygonOffset), GL_ES_FUNC_ALWAYS_REQUIRED(glScissor), GLFUNC_ALWAYS_REQUIRED(glMapGrid2d),
GL_ES_FUNC_ALWAYS_REQUIRED(glEnable), GL_ES_FUNC_ALWAYS_REQUIRED(glDisable), GLFUNC_ALWAYS_REQUIRED(glMapGrid2f),
GL_ES_FUNC_ALWAYS_REQUIRED(glIsEnabled), GL_ES_FUNC_ALWAYS_REQUIRED(glGetBooleanv), GLFUNC_ALWAYS_REQUIRED(glEvalPoint1),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetFloatv), GL_ES_FUNC_ALWAYS_REQUIRED(glFinish), GLFUNC_ALWAYS_REQUIRED(glEvalPoint2),
GL_ES_FUNC_ALWAYS_REQUIRED(glFlush), GL_ES_FUNC_ALWAYS_REQUIRED(glHint), GLFUNC_ALWAYS_REQUIRED(glEvalMesh1),
GL_ES_FUNC_ALWAYS_REQUIRED(glDepthFunc), GL_ES_FUNC_ALWAYS_REQUIRED(glDepthMask), GLFUNC_ALWAYS_REQUIRED(glEvalMesh2),
GL_ES_FUNC_ALWAYS_REQUIRED(glViewport), GL_ES_FUNC_ALWAYS_REQUIRED(glDrawArrays), GLFUNC_ALWAYS_REQUIRED(glFogf),
GL_ES_FUNC_ALWAYS_REQUIRED(glDrawElements), GL_ES_FUNC_ALWAYS_REQUIRED(glPixelStorei), GLFUNC_ALWAYS_REQUIRED(glFogi),
GL_ES_FUNC_ALWAYS_REQUIRED(glReadPixels), GL_ES_FUNC_ALWAYS_REQUIRED(glStencilFunc), GLFUNC_ALWAYS_REQUIRED(glFogfv),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilMask), GL_ES_FUNC_ALWAYS_REQUIRED(glStencilOp), GLFUNC_ALWAYS_REQUIRED(glFogiv),
GL_ES_FUNC_ALWAYS_REQUIRED(glClearStencil), GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameterf), GLFUNC_ALWAYS_REQUIRED(glFeedbackBuffer),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameteri), GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameterfv), GLFUNC_ALWAYS_REQUIRED(glPassThrough),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameteriv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetTexParameterfv), GLFUNC_ALWAYS_REQUIRED(glSelectBuffer),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetTexParameteriv), GL_ES_FUNC_ALWAYS_REQUIRED(glGenTextures), GLFUNC_ALWAYS_REQUIRED(glInitNames),
GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteTextures), GL_ES_FUNC_ALWAYS_REQUIRED(glBindTexture), GLFUNC_ALWAYS_REQUIRED(glLoadName),
GL_ES_FUNC_ALWAYS_REQUIRED(glIsTexture), GL_ES_FUNC_ALWAYS_REQUIRED(glTexSubImage2D), GLFUNC_ALWAYS_REQUIRED(glPushName),
GL_ES_FUNC_ALWAYS_REQUIRED(glCopyTexImage2D), GL_ES_FUNC_ALWAYS_REQUIRED(glCopyTexSubImage2D), GLFUNC_ALWAYS_REQUIRED(glPopName),
GL_ES3_FUNC_ALWAYS_REQUIRED(glReadBuffer), GL_ES32_FUNC_ALWAYS_REQUIRED(glGetPointerv), GL_ES_FUNC_ALWAYS_REQUIRED(glTexImage2D),
GL_ES_FUNC_ALWAYS_REQUIRED(glClearColor),
GL_ES_FUNC_ALWAYS_REQUIRED(glClear),
GL_ES_FUNC_ALWAYS_REQUIRED(glColorMask),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendFunc),
GL_ES_FUNC_ALWAYS_REQUIRED(glCullFace),
GL_ES_FUNC_ALWAYS_REQUIRED(glFrontFace),
GL_ES_FUNC_ALWAYS_REQUIRED(glLineWidth),
GL_ES_FUNC_ALWAYS_REQUIRED(glPolygonOffset),
GL_ES_FUNC_ALWAYS_REQUIRED(glScissor),
GL_ES_FUNC_ALWAYS_REQUIRED(glEnable),
GL_ES_FUNC_ALWAYS_REQUIRED(glDisable),
GL_ES_FUNC_ALWAYS_REQUIRED(glIsEnabled),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetBooleanv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetFloatv),
GL_ES_FUNC_ALWAYS_REQUIRED(glFinish),
GL_ES_FUNC_ALWAYS_REQUIRED(glFlush),
GL_ES_FUNC_ALWAYS_REQUIRED(glHint),
GL_ES_FUNC_ALWAYS_REQUIRED(glDepthFunc),
GL_ES_FUNC_ALWAYS_REQUIRED(glDepthMask),
GL_ES_FUNC_ALWAYS_REQUIRED(glViewport),
GL_ES_FUNC_ALWAYS_REQUIRED(glDrawArrays),
GL_ES_FUNC_ALWAYS_REQUIRED(glDrawElements),
GL_ES_FUNC_ALWAYS_REQUIRED(glPixelStorei),
GL_ES_FUNC_ALWAYS_REQUIRED(glReadPixels),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilFunc),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilMask),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilOp),
GL_ES_FUNC_ALWAYS_REQUIRED(glClearStencil),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameterf),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameteri),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameterfv),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexParameteriv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetTexParameterfv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetTexParameteriv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGenTextures),
GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteTextures),
GL_ES_FUNC_ALWAYS_REQUIRED(glBindTexture),
GL_ES_FUNC_ALWAYS_REQUIRED(glIsTexture),
GL_ES_FUNC_ALWAYS_REQUIRED(glTexSubImage2D),
GL_ES_FUNC_ALWAYS_REQUIRED(glCopyTexImage2D),
GL_ES_FUNC_ALWAYS_REQUIRED(glCopyTexSubImage2D),
GL_ES3_FUNC_ALWAYS_REQUIRED(glReadBuffer),
GL_ES32_FUNC_ALWAYS_REQUIRED(glGetPointerv),
// gl_1_2 // gl_1_2
GL_ES3_FUNC_ALWAYS_REQUIRED(glCopyTexSubImage3D), GL_ES3_FUNC_ALWAYS_REQUIRED(glCopyTexSubImage3D),
GL_ES3_FUNC_ALWAYS_REQUIRED(glDrawRangeElements), GL_ES3_FUNC_ALWAYS_REQUIRED(glTexImage3D), GL_ES3_FUNC_ALWAYS_REQUIRED(glDrawRangeElements),
GL_ES3_FUNC_ALWAYS_REQUIRED(glTexImage3D),
GL_ES3_FUNC_ALWAYS_REQUIRED(glTexSubImage3D), GL_ES3_FUNC_ALWAYS_REQUIRED(glTexSubImage3D),
// gl_1_3 // gl_1_3
GLFUNC_ALWAYS_REQUIRED(glClientActiveTexture), GLFUNC_ALWAYS_REQUIRED(glCompressedTexImage1D), GLFUNC_ALWAYS_REQUIRED(glClientActiveTexture),
GLFUNC_ALWAYS_REQUIRED(glCompressedTexImage1D),
GLFUNC_ALWAYS_REQUIRED(glCompressedTexSubImage1D), GLFUNC_ALWAYS_REQUIRED(glCompressedTexSubImage1D),
GLFUNC_ALWAYS_REQUIRED(glGetCompressedTexImage), GLFUNC_ALWAYS_REQUIRED(glLoadTransposeMatrixd), GLFUNC_ALWAYS_REQUIRED(glGetCompressedTexImage),
GLFUNC_ALWAYS_REQUIRED(glLoadTransposeMatrixf), GLFUNC_ALWAYS_REQUIRED(glMultTransposeMatrixd), GLFUNC_ALWAYS_REQUIRED(glLoadTransposeMatrixd),
GLFUNC_ALWAYS_REQUIRED(glMultTransposeMatrixf), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1d), GLFUNC_ALWAYS_REQUIRED(glLoadTransposeMatrixf),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1dv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1f), GLFUNC_ALWAYS_REQUIRED(glMultTransposeMatrixd),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1fv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1i), GLFUNC_ALWAYS_REQUIRED(glMultTransposeMatrixf),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1iv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1s), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1d),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1sv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2d), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1dv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2dv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2f), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1f),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2fv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2i), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1fv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2iv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2s), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1i),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2sv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3d), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1iv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3dv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3f), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1s),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3fv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3i), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord1sv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3iv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3s), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2d),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3sv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4d), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2dv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4dv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4f), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2f),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4fv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4i), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2fv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4iv), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4s), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2i),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4sv), GL_ES_FUNC_ALWAYS_REQUIRED(glSampleCoverage), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2iv),
GL_ES_FUNC_ALWAYS_REQUIRED(glActiveTexture), GL_ES_FUNC_ALWAYS_REQUIRED(glCompressedTexImage2D), GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2s),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord2sv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3d),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3dv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3f),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3fv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3i),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3iv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3s),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord3sv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4d),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4dv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4f),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4fv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4i),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4iv),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4s),
GLFUNC_ALWAYS_REQUIRED(glMultiTexCoord4sv),
GL_ES_FUNC_ALWAYS_REQUIRED(glSampleCoverage),
GL_ES_FUNC_ALWAYS_REQUIRED(glActiveTexture),
GL_ES_FUNC_ALWAYS_REQUIRED(glCompressedTexImage2D),
GL_ES_FUNC_ALWAYS_REQUIRED(glCompressedTexSubImage2D), GL_ES_FUNC_ALWAYS_REQUIRED(glCompressedTexSubImage2D),
GL_ES3_FUNC_ALWAYS_REQUIRED(glCompressedTexImage3D), GL_ES3_FUNC_ALWAYS_REQUIRED(glCompressedTexImage3D),
GL_ES3_FUNC_ALWAYS_REQUIRED(glCompressedTexSubImage3D), GL_ES3_FUNC_ALWAYS_REQUIRED(glCompressedTexSubImage3D),
// gl_1_4 // gl_1_4
GLFUNC_ALWAYS_REQUIRED(glFogCoordPointer), GLFUNC_ALWAYS_REQUIRED(glFogCoordd), GLFUNC_ALWAYS_REQUIRED(glFogCoordPointer),
GLFUNC_ALWAYS_REQUIRED(glFogCoorddv), GLFUNC_ALWAYS_REQUIRED(glFogCoordf), GLFUNC_ALWAYS_REQUIRED(glFogCoordd),
GLFUNC_ALWAYS_REQUIRED(glFogCoordfv), GLFUNC_ALWAYS_REQUIRED(glMultiDrawArrays), GLFUNC_ALWAYS_REQUIRED(glFogCoorddv),
GLFUNC_ALWAYS_REQUIRED(glMultiDrawElements), GLFUNC_ALWAYS_REQUIRED(glPointParameterf), GLFUNC_ALWAYS_REQUIRED(glFogCoordf),
GLFUNC_ALWAYS_REQUIRED(glPointParameterfv), GLFUNC_ALWAYS_REQUIRED(glPointParameteri), GLFUNC_ALWAYS_REQUIRED(glFogCoordfv),
GLFUNC_ALWAYS_REQUIRED(glPointParameteriv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3b), GLFUNC_ALWAYS_REQUIRED(glMultiDrawArrays),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3bv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3d), GLFUNC_ALWAYS_REQUIRED(glMultiDrawElements),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3dv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3f), GLFUNC_ALWAYS_REQUIRED(glPointParameterf),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3fv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3i), GLFUNC_ALWAYS_REQUIRED(glPointParameterfv),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3iv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3s), GLFUNC_ALWAYS_REQUIRED(glPointParameteri),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3sv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3ub), GLFUNC_ALWAYS_REQUIRED(glPointParameteriv),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3ubv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3ui), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3b),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3uiv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3us), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3bv),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3usv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColorPointer), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3d),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2d), GLFUNC_ALWAYS_REQUIRED(glWindowPos2dv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3dv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2f), GLFUNC_ALWAYS_REQUIRED(glWindowPos2fv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3f),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2i), GLFUNC_ALWAYS_REQUIRED(glWindowPos2iv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3fv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2s), GLFUNC_ALWAYS_REQUIRED(glWindowPos2sv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3i),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3d), GLFUNC_ALWAYS_REQUIRED(glWindowPos3dv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3iv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3f), GLFUNC_ALWAYS_REQUIRED(glWindowPos3fv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3s),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3i), GLFUNC_ALWAYS_REQUIRED(glWindowPos3iv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3sv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3s), GLFUNC_ALWAYS_REQUIRED(glWindowPos3sv), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3ub),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendColor), GL_ES_FUNC_ALWAYS_REQUIRED(glBlendEquation), GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3ubv),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3ui),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3uiv),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3us),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColor3usv),
GLFUNC_ALWAYS_REQUIRED(glSecondaryColorPointer),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2d),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2dv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2f),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2fv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2i),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2iv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2s),
GLFUNC_ALWAYS_REQUIRED(glWindowPos2sv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3d),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3dv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3f),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3fv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3i),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3iv),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3s),
GLFUNC_ALWAYS_REQUIRED(glWindowPos3sv),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendColor),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendEquation),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendFuncSeparate), GL_ES_FUNC_ALWAYS_REQUIRED(glBlendFuncSeparate),
// gl_1_5 // gl_1_5
GLFUNC_ALWAYS_REQUIRED(glGetBufferSubData), GLFUNC_ALWAYS_REQUIRED(glGetQueryObjectiv), GLFUNC_ALWAYS_REQUIRED(glGetBufferSubData),
GLFUNC_ALWAYS_REQUIRED(glMapBuffer), GL_ES_FUNC_ALWAYS_REQUIRED(glBindBuffer), GLFUNC_ALWAYS_REQUIRED(glGetQueryObjectiv),
GL_ES_FUNC_ALWAYS_REQUIRED(glBufferData), GL_ES_FUNC_ALWAYS_REQUIRED(glBufferSubData), GLFUNC_ALWAYS_REQUIRED(glMapBuffer),
GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteBuffers), GL_ES_FUNC_ALWAYS_REQUIRED(glGenBuffers), GL_ES_FUNC_ALWAYS_REQUIRED(glBindBuffer),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetBufferParameteriv), GL_ES_FUNC_ALWAYS_REQUIRED(glIsBuffer), GL_ES_FUNC_ALWAYS_REQUIRED(glBufferData),
GL_ES3_FUNC_ALWAYS_REQUIRED(glBeginQuery), GL_ES3_FUNC_ALWAYS_REQUIRED(glDeleteQueries), GL_ES_FUNC_ALWAYS_REQUIRED(glBufferSubData),
GL_ES3_FUNC_ALWAYS_REQUIRED(glEndQuery), GL_ES3_FUNC_ALWAYS_REQUIRED(glGenQueries), GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteBuffers),
GL_ES3_FUNC_ALWAYS_REQUIRED(glIsQuery), GL_ES3_FUNC_ALWAYS_REQUIRED(glGetQueryiv), GL_ES_FUNC_ALWAYS_REQUIRED(glGenBuffers),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetBufferParameteriv),
GL_ES_FUNC_ALWAYS_REQUIRED(glIsBuffer),
GL_ES3_FUNC_ALWAYS_REQUIRED(glBeginQuery),
GL_ES3_FUNC_ALWAYS_REQUIRED(glDeleteQueries),
GL_ES3_FUNC_ALWAYS_REQUIRED(glEndQuery),
GL_ES3_FUNC_ALWAYS_REQUIRED(glGenQueries),
GL_ES3_FUNC_ALWAYS_REQUIRED(glIsQuery),
GL_ES3_FUNC_ALWAYS_REQUIRED(glGetQueryiv),
GL_ES3_FUNC_ALWAYS_REQUIRED(glGetQueryObjectuiv), GL_ES3_FUNC_ALWAYS_REQUIRED(glGetQueryObjectuiv),
GL_ES3_FUNC_ALWAYS_REQUIRED(glGetBufferPointerv), GL_ES3_FUNC_ALWAYS_REQUIRED(glUnmapBuffer), GL_ES3_FUNC_ALWAYS_REQUIRED(glGetBufferPointerv),
GL_ES3_FUNC_ALWAYS_REQUIRED(glUnmapBuffer),
// gl_2_0 // gl_2_0
GLFUNC_ALWAYS_REQUIRED(glGetVertexAttribdv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1d), GLFUNC_ALWAYS_REQUIRED(glGetVertexAttribdv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1dv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1s), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1d),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1sv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2d), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1dv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2dv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2s), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1s),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2sv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3d), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib1sv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3dv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3s), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2d),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3sv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nbv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2dv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Niv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nsv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2s),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nub), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nubv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib2sv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nuiv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nusv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3d),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4bv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4d), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3dv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4dv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4iv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3s),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4s), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4sv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib3sv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4ubv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4uiv), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nbv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4usv), GL_ES_FUNC_ALWAYS_REQUIRED(glAttachShader), GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Niv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nsv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nub),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nubv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nuiv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4Nusv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4bv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4d),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4dv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4iv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4s),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4sv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4ubv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4uiv),
GLFUNC_ALWAYS_REQUIRED(glVertexAttrib4usv),
GL_ES_FUNC_ALWAYS_REQUIRED(glAttachShader),
GL_ES_FUNC_ALWAYS_REQUIRED(glBindAttribLocation), GL_ES_FUNC_ALWAYS_REQUIRED(glBindAttribLocation),
GL_ES_FUNC_ALWAYS_REQUIRED(glBlendEquationSeparate), GL_ES_FUNC_ALWAYS_REQUIRED(glBlendEquationSeparate),
GL_ES_FUNC_ALWAYS_REQUIRED(glCompileShader), GL_ES_FUNC_ALWAYS_REQUIRED(glCreateProgram), GL_ES_FUNC_ALWAYS_REQUIRED(glCompileShader),
GL_ES_FUNC_ALWAYS_REQUIRED(glCreateShader), GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteProgram), GL_ES_FUNC_ALWAYS_REQUIRED(glCreateProgram),
GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteShader), GL_ES_FUNC_ALWAYS_REQUIRED(glDetachShader), GL_ES_FUNC_ALWAYS_REQUIRED(glCreateShader),
GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteProgram),
GL_ES_FUNC_ALWAYS_REQUIRED(glDeleteShader),
GL_ES_FUNC_ALWAYS_REQUIRED(glDetachShader),
GL_ES_FUNC_ALWAYS_REQUIRED(glDisableVertexAttribArray), GL_ES_FUNC_ALWAYS_REQUIRED(glDisableVertexAttribArray),
GL_ES_FUNC_ALWAYS_REQUIRED(glEnableVertexAttribArray), GL_ES_FUNC_ALWAYS_REQUIRED(glEnableVertexAttribArray),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetActiveAttrib), GL_ES_FUNC_ALWAYS_REQUIRED(glGetActiveUniform), GL_ES_FUNC_ALWAYS_REQUIRED(glGetActiveAttrib),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetActiveUniform),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetAttachedShaders), GL_ES_FUNC_ALWAYS_REQUIRED(glGetAttachedShaders),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetAttribLocation), GL_ES_FUNC_ALWAYS_REQUIRED(glGetAttribLocation),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetProgramInfoLog), GL_ES_FUNC_ALWAYS_REQUIRED(glGetProgramiv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetProgramInfoLog),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetShaderInfoLog), GL_ES_FUNC_ALWAYS_REQUIRED(glGetShaderSource), GL_ES_FUNC_ALWAYS_REQUIRED(glGetProgramiv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetShaderiv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetUniformLocation), GL_ES_FUNC_ALWAYS_REQUIRED(glGetShaderInfoLog),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetUniformfv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetUniformiv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetShaderSource),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetShaderiv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetUniformLocation),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetUniformfv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetUniformiv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetVertexAttribPointerv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetVertexAttribPointerv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetVertexAttribfv), GL_ES_FUNC_ALWAYS_REQUIRED(glGetVertexAttribfv),
GL_ES_FUNC_ALWAYS_REQUIRED(glGetVertexAttribiv), GL_ES_FUNC_ALWAYS_REQUIRED(glIsProgram), GL_ES_FUNC_ALWAYS_REQUIRED(glGetVertexAttribiv),
GL_ES_FUNC_ALWAYS_REQUIRED(glIsShader), GL_ES_FUNC_ALWAYS_REQUIRED(glLinkProgram), GL_ES_FUNC_ALWAYS_REQUIRED(glIsProgram),
GL_ES_FUNC_ALWAYS_REQUIRED(glShaderSource), GL_ES_FUNC_ALWAYS_REQUIRED(glStencilFuncSeparate), GL_ES_FUNC_ALWAYS_REQUIRED(glIsShader),
GL_ES_FUNC_ALWAYS_REQUIRED(glLinkProgram),
GL_ES_FUNC_ALWAYS_REQUIRED(glShaderSource),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilFuncSeparate),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilMaskSeparate), GL_ES_FUNC_ALWAYS_REQUIRED(glStencilMaskSeparate),
GL_ES_FUNC_ALWAYS_REQUIRED(glStencilOpSeparate), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1f), GL_ES_FUNC_ALWAYS_REQUIRED(glStencilOpSeparate),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1i), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1f),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1iv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2f), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2i), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1i),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2iv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3f), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform1iv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3i), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2f),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3iv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4f), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4i), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2i),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4iv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniformMatrix2fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform2iv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniformMatrix3fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniformMatrix4fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3f),
GL_ES_FUNC_ALWAYS_REQUIRED(glUseProgram), GL_ES_FUNC_ALWAYS_REQUIRED(glValidateProgram), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib1f), GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib1fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3i),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib2f), GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib2fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform3iv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib3f), GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib3fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4f),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib4f), GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib4fv), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttribPointer), GL_ES3_FUNC_ALWAYS_REQUIRED(glDrawBuffers), GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4i),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniform4iv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniformMatrix2fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniformMatrix3fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUniformMatrix4fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glUseProgram),
GL_ES_FUNC_ALWAYS_REQUIRED(glValidateProgram),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib1f),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib1fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib2f),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib2fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib3f),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib3fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib4f),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttrib4fv),
GL_ES_FUNC_ALWAYS_REQUIRED(glVertexAttribPointer),
GL_ES3_FUNC_ALWAYS_REQUIRED(glDrawBuffers),
// gl_2_1 // gl_2_1
GLFUNC_ALWAYS_REQUIRED(glUniformMatrix2x3fv), GLFUNC_ALWAYS_REQUIRED(glUniformMatrix2x4fv), GLFUNC_ALWAYS_REQUIRED(glUniformMatrix2x3fv),
GLFUNC_ALWAYS_REQUIRED(glUniformMatrix3x2fv), GLFUNC_ALWAYS_REQUIRED(glUniformMatrix3x4fv), GLFUNC_ALWAYS_REQUIRED(glUniformMatrix2x4fv),
GLFUNC_ALWAYS_REQUIRED(glUniformMatrix4x2fv), GLFUNC_ALWAYS_REQUIRED(glUniformMatrix4x3fv), GLFUNC_ALWAYS_REQUIRED(glUniformMatrix3x2fv),
GLFUNC_ALWAYS_REQUIRED(glUniformMatrix3x4fv),
GLFUNC_ALWAYS_REQUIRED(glUniformMatrix4x2fv),
GLFUNC_ALWAYS_REQUIRED(glUniformMatrix4x3fv),
// gl_3_0 // gl_3_0
GLFUNC_REQUIRES(glBeginConditionalRender, "VERSION_3_0"), GLFUNC_REQUIRES(glBeginConditionalRender, "VERSION_3_0"),
@ -1412,8 +1677,10 @@ const GLFunc gl_function_array[] = {
GLFUNC_REQUIRES(glGetInternalformativ, "VERSION_4_2"), GLFUNC_REQUIRES(glGetInternalformativ, "VERSION_4_2"),
GLFUNC_REQUIRES(glGetActiveAtomicCounterBufferiv, "VERSION_4_2"), GLFUNC_REQUIRES(glGetActiveAtomicCounterBufferiv, "VERSION_4_2"),
GLFUNC_REQUIRES(glBindImageTexture, "VERSION_4_2"), GLFUNC_REQUIRES(glBindImageTexture, "VERSION_4_2"),
GLFUNC_REQUIRES(glMemoryBarrier, "VERSION_4_2"), GLFUNC_REQUIRES(glTexStorage1D, "VERSION_4_2"), GLFUNC_REQUIRES(glMemoryBarrier, "VERSION_4_2"),
GLFUNC_REQUIRES(glTexStorage2D, "VERSION_4_2"), GLFUNC_REQUIRES(glTexStorage3D, "VERSION_4_2"), GLFUNC_REQUIRES(glTexStorage1D, "VERSION_4_2"),
GLFUNC_REQUIRES(glTexStorage2D, "VERSION_4_2"),
GLFUNC_REQUIRES(glTexStorage3D, "VERSION_4_2"),
GLFUNC_REQUIRES(glDrawTransformFeedbackInstanced, "VERSION_4_2"), GLFUNC_REQUIRES(glDrawTransformFeedbackInstanced, "VERSION_4_2"),
GLFUNC_REQUIRES(glDrawTransformFeedbackStreamInstanced, "VERSION_4_2"), GLFUNC_REQUIRES(glDrawTransformFeedbackStreamInstanced, "VERSION_4_2"),
@ -1456,7 +1723,8 @@ const GLFunc gl_function_array[] = {
GLFUNC_REQUIRES(glDebugMessageCallback, "VERSION_4_3"), GLFUNC_REQUIRES(glDebugMessageCallback, "VERSION_4_3"),
GLFUNC_REQUIRES(glGetDebugMessageLog, "VERSION_4_3"), GLFUNC_REQUIRES(glGetDebugMessageLog, "VERSION_4_3"),
GLFUNC_REQUIRES(glPushDebugGroup, "VERSION_4_3"), GLFUNC_REQUIRES(glPushDebugGroup, "VERSION_4_3"),
GLFUNC_REQUIRES(glPopDebugGroup, "VERSION_4_3"), GLFUNC_REQUIRES(glObjectLabel, "VERSION_4_3"), GLFUNC_REQUIRES(glPopDebugGroup, "VERSION_4_3"),
GLFUNC_REQUIRES(glObjectLabel, "VERSION_4_3"),
GLFUNC_REQUIRES(glGetObjectLabel, "VERSION_4_3"), GLFUNC_REQUIRES(glGetObjectLabel, "VERSION_4_3"),
GLFUNC_REQUIRES(glObjectPtrLabel, "VERSION_4_3"), GLFUNC_REQUIRES(glObjectPtrLabel, "VERSION_4_3"),
GLFUNC_REQUIRES(glGetObjectPtrLabel, "VERSION_4_3"), GLFUNC_REQUIRES(glGetObjectPtrLabel, "VERSION_4_3"),
@ -1467,7 +1735,8 @@ const GLFunc gl_function_array[] = {
GLFUNC_REQUIRES(glClearTexSubImage, "VERSION_4_4"), GLFUNC_REQUIRES(glClearTexSubImage, "VERSION_4_4"),
GLFUNC_REQUIRES(glBindBuffersBase, "VERSION_4_4"), GLFUNC_REQUIRES(glBindBuffersBase, "VERSION_4_4"),
GLFUNC_REQUIRES(glBindBuffersRange, "VERSION_4_4"), GLFUNC_REQUIRES(glBindBuffersRange, "VERSION_4_4"),
GLFUNC_REQUIRES(glBindTextures, "VERSION_4_4"), GLFUNC_REQUIRES(glBindSamplers, "VERSION_4_4"), GLFUNC_REQUIRES(glBindTextures, "VERSION_4_4"),
GLFUNC_REQUIRES(glBindSamplers, "VERSION_4_4"),
GLFUNC_REQUIRES(glBindImageTextures, "VERSION_4_4"), GLFUNC_REQUIRES(glBindImageTextures, "VERSION_4_4"),
GLFUNC_REQUIRES(glBindVertexBuffers, "VERSION_4_4"), GLFUNC_REQUIRES(glBindVertexBuffers, "VERSION_4_4"),
@ -1574,7 +1843,8 @@ const GLFunc gl_function_array[] = {
GLFUNC_REQUIRES(glGetTextureSubImage, "VERSION_4_5"), GLFUNC_REQUIRES(glGetTextureSubImage, "VERSION_4_5"),
GLFUNC_REQUIRES(glGetCompressedTextureSubImage, "VERSION_4_5"), GLFUNC_REQUIRES(glGetCompressedTextureSubImage, "VERSION_4_5"),
GLFUNC_REQUIRES(glGetGraphicsResetStatus, "VERSION_4_5"), GLFUNC_REQUIRES(glGetGraphicsResetStatus, "VERSION_4_5"),
GLFUNC_REQUIRES(glReadnPixels, "VERSION_4_5"), GLFUNC_REQUIRES(glTextureBarrier, "VERSION_4_5"), GLFUNC_REQUIRES(glReadnPixels, "VERSION_4_5"),
GLFUNC_REQUIRES(glTextureBarrier, "VERSION_4_5"),
// AMD's video driver is trash and doesn't expose these function pointers // AMD's video driver is trash and doesn't expose these function pointers
// Remove them for now until they learn how to implement the spec properly. // Remove them for now until they learn how to implement the spec properly.
// GLFUNC_REQUIRES(glGetnCompressedTexImage, "VERSION_4_5"), // GLFUNC_REQUIRES(glGetnCompressedTexImage, "VERSION_4_5"),
@ -2082,8 +2352,11 @@ static void InitExtensionList()
{ {
// Can't add NV_primitive_restart since function name changed // Can't add NV_primitive_restart since function name changed
std::string gl310exts[] = { std::string gl310exts[] = {
"GL_ARB_draw_instanced", "GL_ARB_copy_buffer", "GL_ARB_texture_buffer_object", "GL_ARB_draw_instanced",
"GL_ARB_texture_rectangle", "GL_ARB_uniform_buffer_object", "GL_ARB_copy_buffer",
"GL_ARB_texture_buffer_object",
"GL_ARB_texture_rectangle",
"GL_ARB_uniform_buffer_object",
//"GL_NV_primitive_restart", //"GL_NV_primitive_restart",
"VERSION_3_1", "VERSION_3_1",
}; };
@ -2095,9 +2368,14 @@ static void InitExtensionList()
// Quite a lot of these had their names changed when merged in to core // Quite a lot of these had their names changed when merged in to core
// Disable the ones that have // Disable the ones that have
std::string gl300exts[] = { std::string gl300exts[] = {
"GL_ARB_map_buffer_range", "GL_ARB_color_buffer_float", "GL_ARB_texture_float", "GL_ARB_map_buffer_range",
"GL_ARB_half_float_pixel", "GL_ARB_framebuffer_object", "GL_ARB_texture_float", "GL_ARB_color_buffer_float",
"GL_ARB_vertex_array_object", "GL_ARB_depth_buffer_float", "GL_ARB_texture_float",
"GL_ARB_half_float_pixel",
"GL_ARB_framebuffer_object",
"GL_ARB_texture_float",
"GL_ARB_vertex_array_object",
"GL_ARB_depth_buffer_float",
//"GL_EXT_texture_integer", //"GL_EXT_texture_integer",
//"GL_EXT_gpu_shader4", //"GL_EXT_gpu_shader4",
//"GL_APPLE_flush_buffer_range", //"GL_APPLE_flush_buffer_range",

View File

@ -53,7 +53,8 @@ void cInterfaceEGL::DetectMode()
EGLint num_configs; EGLint num_configs;
bool supportsGL = false, supportsGLES2 = false, supportsGLES3 = false; bool supportsGL = false, supportsGLES2 = false, supportsGLES3 = false;
std::array<int, 3> renderable_types{{ std::array<int, 3> renderable_types{{
EGL_OPENGL_BIT, (1 << 6), /* EGL_OPENGL_ES3_BIT_KHR */ EGL_OPENGL_BIT,
(1 << 6), /* EGL_OPENGL_ES3_BIT_KHR */
EGL_OPENGL_ES2_BIT, EGL_OPENGL_ES2_BIT,
}}; }};
@ -237,7 +238,13 @@ bool cInterfaceEGL::Create(void* window_handle, bool stereo, bool core)
if (supports_core_profile && core && s_opengl_mode == GLInterfaceMode::MODE_OPENGL) if (supports_core_profile && core && s_opengl_mode == GLInterfaceMode::MODE_OPENGL)
{ {
std::array<std::pair<int, int>, 7> versions_to_try = {{ std::array<std::pair<int, int>, 7> versions_to_try = {{
{4, 5}, {4, 4}, {4, 3}, {4, 2}, {4, 1}, {4, 0}, {3, 3}, {4, 5},
{4, 4},
{4, 3},
{4, 2},
{4, 1},
{4, 0},
{3, 3},
}}; }};
for (const auto& version : versions_to_try) for (const auto& version : versions_to_try)

View File

@ -35,6 +35,7 @@ protected:
return (EGLNativeWindowType)EGL_DEFAULT_DISPLAY; return (EGLNativeWindowType)EGL_DEFAULT_DISPLAY;
} }
virtual void ShutdownPlatform() {} virtual void ShutdownPlatform() {}
public: public:
void Swap() override; void Swap() override;
void SwapInterval(int interval) override; void SwapInterval(int interval) override;

View File

@ -230,17 +230,26 @@ bool cInterfaceWGL::Create(void* window_handle, bool stereo, bool core)
PFD_TYPE_RGBA, // Request An RGBA Format PFD_TYPE_RGBA, // Request An RGBA Format
32, // Select Our Color Depth 32, // Select Our Color Depth
0, 0,
0, 0, 0, 0, 0, // Color Bits Ignored 0,
0, // 8bit Alpha Buffer 0,
0, // Shift Bit Ignored 0,
0, // No Accumulation Buffer 0,
0, 0, 0, 0, // Accumulation Bits Ignored 0, // Color Bits Ignored
0, // 8bit Alpha Buffer
0, // Shift Bit Ignored
0, // No Accumulation Buffer
0,
0,
0,
0, // Accumulation Bits Ignored
0, // 0Bit Z-Buffer (Depth Buffer) 0, // 0Bit Z-Buffer (Depth Buffer)
0, // 0bit Stencil Buffer 0, // 0bit Stencil Buffer
0, // No Auxiliary Buffer 0, // No Auxiliary Buffer
PFD_MAIN_PLANE, // Main Drawing Layer PFD_MAIN_PLANE, // Main Drawing Layer
0, // Reserved 0, // Reserved
0, 0, 0 // Layer Masks Ignored 0,
0,
0 // Layer Masks Ignored
}; };
m_dc = GetDC(m_window_handle); m_dc = GetDC(m_window_handle);
@ -358,22 +367,22 @@ HGLRC cInterfaceWGL::CreateCoreContext(HDC dc, HGLRC share_context)
for (const auto& version : try_versions) for (const auto& version : try_versions)
{ {
// Construct list of attributes. Prefer a forward-compatible, core context. // Construct list of attributes. Prefer a forward-compatible, core context.
std::array<int, 5 * 2> attribs = { std::array<int, 5 * 2> attribs = {WGL_CONTEXT_PROFILE_MASK_ARB,
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
#ifdef _DEBUG #ifdef _DEBUG
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FLAGS_ARB,
WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB | WGL_CONTEXT_DEBUG_BIT_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB |
WGL_CONTEXT_DEBUG_BIT_ARB,
#else #else
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FLAGS_ARB,
WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
#endif #endif
WGL_CONTEXT_MAJOR_VERSION_ARB, WGL_CONTEXT_MAJOR_VERSION_ARB,
version.first, version.first,
WGL_CONTEXT_MINOR_VERSION_ARB, WGL_CONTEXT_MINOR_VERSION_ARB,
version.second, version.second,
0, 0,
0}; 0};
// Attempt creating this context. // Attempt creating this context.
HGLRC core_context = wglCreateContextAttribsARB(dc, nullptr, attribs.data()); HGLRC core_context = wglCreateContextAttribsARB(dc, nullptr, attribs.data());

View File

@ -967,7 +967,7 @@ void GekkoDisassembler::mtfsb(u32 in, int n)
} }
} }
// Paired instructions // Paired instructions
#define RA ((inst >> 16) & 0x1f) #define RA ((inst >> 16) & 0x1f)
#define RB ((inst >> 11) & 0x1f) #define RB ((inst >> 11) & 0x1f)

View File

@ -76,6 +76,7 @@ public:
const std::string& GetName() const { return name; } const std::string& GetName() const { return name; }
const SectionMap& GetValues() const { return values; } const SectionMap& GetValues() const { return values; }
bool HasLines() const { return !m_lines.empty(); } bool HasLines() const { return !m_lines.empty(); }
protected: protected:
std::string name; std::string name;
@ -142,6 +143,7 @@ public:
static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut); static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut);
const std::list<Section>& GetSections() const { return sections; } const std::list<Section>& GetSections() const { return sections; }
private: private:
std::list<Section> sections; std::list<Section> sections;

View File

@ -25,7 +25,7 @@
* When building with -march=native, or enabling the instruction sets in the compile flags, permit * When building with -march=native, or enabling the instruction sets in the compile flags, permit
* usage of the instrinsics without any function attributes. If the command-line architecture does * usage of the instrinsics without any function attributes. If the command-line architecture does
* not support this instruction set, enable it via function targeting. * not support this instruction set, enable it via function targeting.
*/ */
#include <x86intrin.h> #include <x86intrin.h>
#ifndef __SSE4_2__ #ifndef __SSE4_2__

View File

@ -35,6 +35,7 @@ public:
const T* operator->() const { return ComputeValue(); } const T* operator->() const { return ComputeValue(); }
T& operator*() { return *ComputeValue(); } T& operator*() { return *ComputeValue(); }
T* operator->() { return ComputeValue(); } T* operator->() { return ComputeValue(); }
private: private:
T* ComputeValue() const T* ComputeValue() const
{ {

View File

@ -48,6 +48,7 @@ public:
bool IsValid() const { return m_logfile.good(); } bool IsValid() const { return m_logfile.good(); }
bool IsEnabled() const { return m_enable; } bool IsEnabled() const { return m_enable; }
void SetEnable(bool enable) { m_enable = enable; } void SetEnable(bool enable) { m_enable = enable; }
private: private:
std::mutex m_log_lock; std::mutex m_log_lock;
std::ofstream m_logfile; std::ofstream m_logfile;

View File

@ -51,6 +51,7 @@ class ProfilerExecuter
public: public:
ProfilerExecuter(Profiler* _p) : m_p(_p) { m_p->Start(); } ProfilerExecuter(Profiler* _p) : m_p(_p) { m_p->Start(); }
~ProfilerExecuter() { m_p->Stop(); } ~ProfilerExecuter() { m_p->Stop(); }
private: private:
Profiler* m_p; Profiler* m_p;
}; };

View File

@ -27,6 +27,7 @@ public:
QoSSession& operator=(QoSSession&& session); QoSSession& operator=(QoSSession&& session);
QoSSession(QoSSession&& session) { *this = std::move(session); } QoSSession(QoSSession&& session) { *this = std::move(session); }
bool Successful() const { return m_success; } bool Successful() const { return m_success; }
private: private:
#if defined(_WIN32) #if defined(_WIN32)
void* m_qos_handle = nullptr; void* m_qos_handle = nullptr;

View File

@ -24,6 +24,7 @@ public:
const T* operator->() const { return &std::get<T>(m_variant); } const T* operator->() const { return &std::get<T>(m_variant); }
T& operator*() { return std::get<T>(m_variant); } T& operator*() { return std::get<T>(m_variant); }
T* operator->() { return &std::get<T>(m_variant); } T* operator->() { return &std::get<T>(m_variant); }
private: private:
std::variant<ResultCode, T> m_variant; std::variant<ResultCode, T> m_variant;
}; };

View File

@ -233,17 +233,17 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename)
} }
/* Here's the layout: /* Here's the layout:
* *
* boot_sector * boot_sector
* fsinfo_sector * fsinfo_sector
* empty * empty
* backup boot sector * backup boot sector
* backup fsinfo sector * backup fsinfo sector
* RESERVED_SECTORS - 4 empty sectors (if backup sectors), or RESERVED_SECTORS - 2 (if no backup) * RESERVED_SECTORS - 4 empty sectors (if backup sectors), or RESERVED_SECTORS - 2 (if no backup)
* first fat * first fat
* second fat * second fat
* zero sectors * zero sectors
*/ */
if (write_sector(f, s_boot_sector)) if (write_sector(f, s_boot_sector))
goto FailWrite; goto FailWrite;

View File

@ -24,6 +24,7 @@ public:
~Semaphore() { CloseHandle(m_handle); } ~Semaphore() { CloseHandle(m_handle); }
void Wait() { WaitForSingleObject(m_handle, INFINITE); } void Wait() { WaitForSingleObject(m_handle, INFINITE); }
void Post() { ReleaseSemaphore(m_handle, 1, nullptr); } void Post() { ReleaseSemaphore(m_handle, 1, nullptr); }
private: private:
HANDLE m_handle; HANDLE m_handle;
}; };
@ -42,6 +43,7 @@ public:
~Semaphore() { sem_destroy(&m_handle); } ~Semaphore() { sem_destroy(&m_handle); }
void Wait() { sem_wait(&m_handle); } void Wait() { sem_wait(&m_handle); }
void Post() { sem_post(&m_handle); } void Post() { sem_post(&m_handle); }
private: private:
sem_t m_handle; sem_t m_handle;
}; };

View File

@ -307,7 +307,7 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _
#ifdef _WIN32 #ifdef _WIN32
":" ":"
#endif #endif
); );
if (std::string::npos == dir_end) if (std::string::npos == dir_end)
dir_end = 0; dir_end = 0;
else else

View File

@ -248,7 +248,7 @@ void OpArg::WriteRest(XEmitter* emit, int extraBytes, X64Reg _operandReg,
bool warn_64bit_offset) const bool warn_64bit_offset) const
{ {
if (_operandReg == INVALID_REG) if (_operandReg == INVALID_REG)
_operandReg = (X64Reg) this->operandReg; _operandReg = (X64Reg)this->operandReg;
int mod = 0; int mod = 0;
int ireg = indexReg; int ireg = indexReg;
bool SIB = false; bool SIB = false;

View File

@ -28,6 +28,7 @@ public:
u32 GetEntryPoint() const override { return m_dolheader.entryPoint; } u32 GetEntryPoint() const override { return m_dolheader.entryPoint; }
bool LoadIntoMemory(bool only_in_mem1 = false) const override; bool LoadIntoMemory(bool only_in_mem1 = false) const override;
bool LoadSymbols() const override { return false; } bool LoadSymbols() const override { return false; }
private: private:
enum enum
{ {

View File

@ -63,6 +63,7 @@ public:
SectionID GetSectionByName(const char* name, int firstSection = 0) const; //-1 for not found SectionID GetSectionByName(const char* name, int firstSection = 0) const; //-1 for not found
bool DidRelocate() const { return bRelocate; } bool DidRelocate() const { return bRelocate; }
private: private:
void Initialize(u8* bytes); void Initialize(u8* bytes);

View File

@ -23,57 +23,89 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location)
const static std::vector<Config::ConfigLocation> s_setting_saveable{ const static std::vector<Config::ConfigLocation> s_setting_saveable{
// Graphics.Hardware // Graphics.Hardware
Config::GFX_VSYNC.location, Config::GFX_ADAPTER.location, Config::GFX_VSYNC.location,
Config::GFX_ADAPTER.location,
// Graphics.Settings // Graphics.Settings
Config::GFX_WIDESCREEN_HACK.location, Config::GFX_ASPECT_RATIO.location, Config::GFX_WIDESCREEN_HACK.location,
Config::GFX_CROP.location, Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location, Config::GFX_ASPECT_RATIO.location,
Config::GFX_SHOW_FPS.location, Config::GFX_SHOW_NETPLAY_PING.location, Config::GFX_CROP.location,
Config::GFX_SHOW_NETPLAY_MESSAGES.location, Config::GFX_LOG_RENDER_TIME_TO_FILE.location, Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location,
Config::GFX_OVERLAY_STATS.location, Config::GFX_OVERLAY_PROJ_STATS.location, Config::GFX_SHOW_FPS.location,
Config::GFX_DUMP_TEXTURES.location, Config::GFX_HIRES_TEXTURES.location, Config::GFX_SHOW_NETPLAY_PING.location,
Config::GFX_CACHE_HIRES_TEXTURES.location, Config::GFX_DUMP_EFB_TARGET.location, Config::GFX_SHOW_NETPLAY_MESSAGES.location,
Config::GFX_DUMP_FRAMES_AS_IMAGES.location, Config::GFX_FREE_LOOK.location, Config::GFX_LOG_RENDER_TIME_TO_FILE.location,
Config::GFX_USE_FFV1.location, Config::GFX_DUMP_FORMAT.location, Config::GFX_OVERLAY_STATS.location,
Config::GFX_DUMP_CODEC.location, Config::GFX_DUMP_ENCODER.location, Config::GFX_OVERLAY_PROJ_STATS.location,
Config::GFX_DUMP_PATH.location, Config::GFX_BITRATE_KBPS.location, Config::GFX_DUMP_TEXTURES.location,
Config::GFX_HIRES_TEXTURES.location,
Config::GFX_CACHE_HIRES_TEXTURES.location,
Config::GFX_DUMP_EFB_TARGET.location,
Config::GFX_DUMP_FRAMES_AS_IMAGES.location,
Config::GFX_FREE_LOOK.location,
Config::GFX_USE_FFV1.location,
Config::GFX_DUMP_FORMAT.location,
Config::GFX_DUMP_CODEC.location,
Config::GFX_DUMP_ENCODER.location,
Config::GFX_DUMP_PATH.location,
Config::GFX_BITRATE_KBPS.location,
Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS.location, Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS.location,
Config::GFX_ENABLE_GPU_TEXTURE_DECODING.location, Config::GFX_ENABLE_PIXEL_LIGHTING.location, Config::GFX_ENABLE_GPU_TEXTURE_DECODING.location,
Config::GFX_FAST_DEPTH_CALC.location, Config::GFX_MSAA.location, Config::GFX_SSAA.location, Config::GFX_ENABLE_PIXEL_LIGHTING.location,
Config::GFX_EFB_SCALE.location, Config::GFX_TEXFMT_OVERLAY_ENABLE.location, Config::GFX_FAST_DEPTH_CALC.location,
Config::GFX_TEXFMT_OVERLAY_CENTER.location, Config::GFX_ENABLE_WIREFRAME.location, Config::GFX_MSAA.location,
Config::GFX_DISABLE_FOG.location, Config::GFX_BORDERLESS_FULLSCREEN.location, Config::GFX_SSAA.location,
Config::GFX_ENABLE_VALIDATION_LAYER.location, Config::GFX_BACKEND_MULTITHREADING.location, Config::GFX_EFB_SCALE.location,
Config::GFX_COMMAND_BUFFER_EXECUTE_INTERVAL.location, Config::GFX_SHADER_CACHE.location, Config::GFX_TEXFMT_OVERLAY_ENABLE.location,
Config::GFX_TEXFMT_OVERLAY_CENTER.location,
Config::GFX_ENABLE_WIREFRAME.location,
Config::GFX_DISABLE_FOG.location,
Config::GFX_BORDERLESS_FULLSCREEN.location,
Config::GFX_ENABLE_VALIDATION_LAYER.location,
Config::GFX_BACKEND_MULTITHREADING.location,
Config::GFX_COMMAND_BUFFER_EXECUTE_INTERVAL.location,
Config::GFX_SHADER_CACHE.location,
Config::GFX_WAIT_FOR_SHADERS_BEFORE_STARTING.location, Config::GFX_WAIT_FOR_SHADERS_BEFORE_STARTING.location,
Config::GFX_SHADER_COMPILATION_MODE.location, Config::GFX_SHADER_COMPILER_THREADS.location, Config::GFX_SHADER_COMPILATION_MODE.location,
Config::GFX_SHADER_COMPILER_THREADS.location,
Config::GFX_SHADER_PRECOMPILER_THREADS.location, Config::GFX_SHADER_PRECOMPILER_THREADS.location,
Config::GFX_SW_ZCOMPLOC.location, Config::GFX_SW_ZFREEZE.location, Config::GFX_SW_ZCOMPLOC.location,
Config::GFX_SW_DUMP_OBJECTS.location, Config::GFX_SW_DUMP_TEV_STAGES.location, Config::GFX_SW_ZFREEZE.location,
Config::GFX_SW_DUMP_TEV_TEX_FETCHES.location, Config::GFX_SW_DRAW_START.location, Config::GFX_SW_DUMP_OBJECTS.location,
Config::GFX_SW_DUMP_TEV_STAGES.location,
Config::GFX_SW_DUMP_TEV_TEX_FETCHES.location,
Config::GFX_SW_DRAW_START.location,
Config::GFX_SW_DRAW_END.location, Config::GFX_SW_DRAW_END.location,
// Graphics.Enhancements // Graphics.Enhancements
Config::GFX_ENHANCE_FORCE_FILTERING.location, Config::GFX_ENHANCE_MAX_ANISOTROPY.location, Config::GFX_ENHANCE_FORCE_FILTERING.location,
Config::GFX_ENHANCE_POST_SHADER.location, Config::GFX_ENHANCE_FORCE_TRUE_COLOR.location, Config::GFX_ENHANCE_MAX_ANISOTROPY.location,
Config::GFX_ENHANCE_POST_SHADER.location,
Config::GFX_ENHANCE_FORCE_TRUE_COLOR.location,
// Graphics.Stereoscopy // Graphics.Stereoscopy
Config::GFX_STEREO_MODE.location, Config::GFX_STEREO_DEPTH.location, Config::GFX_STEREO_MODE.location,
Config::GFX_STEREO_CONVERGENCE_PERCENTAGE.location, Config::GFX_STEREO_SWAP_EYES.location, Config::GFX_STEREO_DEPTH.location,
Config::GFX_STEREO_CONVERGENCE.location, Config::GFX_STEREO_EFB_MONO_DEPTH.location, Config::GFX_STEREO_CONVERGENCE_PERCENTAGE.location,
Config::GFX_STEREO_SWAP_EYES.location,
Config::GFX_STEREO_CONVERGENCE.location,
Config::GFX_STEREO_EFB_MONO_DEPTH.location,
Config::GFX_STEREO_DEPTH_PERCENTAGE.location, Config::GFX_STEREO_DEPTH_PERCENTAGE.location,
// Graphics.Hacks // Graphics.Hacks
Config::GFX_HACK_EFB_ACCESS_ENABLE.location, Config::GFX_HACK_BBOX_ENABLE.location, Config::GFX_HACK_EFB_ACCESS_ENABLE.location,
Config::GFX_HACK_BBOX_ENABLE.location,
Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION.location, Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION.location,
Config::GFX_HACK_FORCE_PROGRESSIVE.location, Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location, Config::GFX_HACK_FORCE_PROGRESSIVE.location,
Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location,
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location, Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location,
Config::GFX_HACK_DISABLE_COPY_TO_VRAM.location, Config::GFX_HACK_IMMEDIATE_XFB.location, Config::GFX_HACK_DISABLE_COPY_TO_VRAM.location,
Config::GFX_HACK_IMMEDIATE_XFB.location,
Config::GFX_HACK_COPY_EFB_SCALED.location, Config::GFX_HACK_COPY_EFB_SCALED.location,
Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location, Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location,
Config::GFX_HACK_VERTEX_ROUDING.location, Config::GFX_HACK_VERTEX_ROUDING.location,

View File

@ -260,8 +260,9 @@ void ScheduleEvent(s64 cycles_into_future, EventType* event_type, u64 userdata,
{ {
if (Core::WantsDeterminism()) if (Core::WantsDeterminism())
{ {
ERROR_LOG(POWERPC, "Someone scheduled an off-thread \"%s\" event while netplay or " ERROR_LOG(POWERPC,
"movie play/record was active. This is likely to cause a desync.", "Someone scheduled an off-thread \"%s\" event while netplay or "
"movie play/record was active. This is likely to cause a desync.",
event_type->name->c_str()); event_type->name->c_str());
} }

View File

@ -524,8 +524,9 @@ bool DSPAssembler::VerifyParams(const DSPOPCTemplate* opc, param_t* par, size_t
if (par[i].val >= 0x1e && par[i].val <= 0x1f) if (par[i].val >= 0x1e && par[i].val <= 0x1f)
{ {
fprintf(stderr, "%i : %s ", code_line, cur_line.c_str()); fprintf(stderr, "%i : %s ", code_line, cur_line.c_str());
fprintf(stderr, "WARNING: $ACM%d register used instead of $ACC%d register Line: %d " fprintf(stderr,
"Param: %zu Ext: %d\n", "WARNING: $ACM%d register used instead of $ACC%d register Line: %d "
"Param: %zu Ext: %d\n",
(par[i].val & 1), (par[i].val & 1), code_line, current_param, (par[i].val & 1), (par[i].val & 1), code_line, current_param,
static_cast<int>(type)); static_cast<int>(type));
} }

View File

@ -63,6 +63,7 @@ public:
std::string GetErrorString() const { return last_error_str; } std::string GetErrorString() const { return last_error_str; }
AssemblerError GetError() const { return last_error; } AssemblerError GetError() const { return last_error; }
private: private:
struct param_t struct param_t
{ {

View File

@ -43,6 +43,7 @@ public:
void Clear() { memset(b, 0, sizeof(b)); } void Clear() { memset(b, 0, sizeof(b)); }
void DeleteByAddress(u32 addr) { b[addr] = 0; } void DeleteByAddress(u32 addr) { b[addr] = 0; }
private: private:
u8 b[65536]; u8 b[65536];
}; };

View File

@ -139,8 +139,9 @@ static Installation InstallCodeHandlerLocked()
// If the code is not going to fit in the space we have left then we have to skip it // If the code is not going to fit in the space we have left then we have to skip it
if (next_address + active_code.codes.size() * CODE_SIZE > end_address) if (next_address + active_code.codes.size() * CODE_SIZE > end_address)
{ {
NOTICE_LOG(ACTIONREPLAY, "Too many GeckoCodes! Ran out of storage space in Game RAM. Could " NOTICE_LOG(ACTIONREPLAY,
"not write: \"%s\". Need %zu bytes, only %u remain.", "Too many GeckoCodes! Ran out of storage space in Game RAM. Could "
"not write: \"%s\". Need %zu bytes, only %u remain.",
active_code.name.c_str(), active_code.codes.size() * CODE_SIZE, active_code.name.c_str(), active_code.codes.size() * CODE_SIZE,
end_address - next_address); end_address - next_address);
continue; continue;
@ -238,8 +239,9 @@ void RunCodeHandler()
PowerPC::HostWrite_U64(riPS0(i), SP + 24 + 2 * i * sizeof(u64)); PowerPC::HostWrite_U64(riPS0(i), SP + 24 + 2 * i * sizeof(u64));
PowerPC::HostWrite_U64(riPS1(i), SP + 24 + (2 * i + 1) * sizeof(u64)); PowerPC::HostWrite_U64(riPS1(i), SP + 24 + (2 * i + 1) * sizeof(u64));
} }
DEBUG_LOG(ACTIONREPLAY, "GeckoCodes: Initiating phantom branch-and-link. " DEBUG_LOG(ACTIONREPLAY,
"PC = 0x%08X, SP = 0x%08X, SFP = 0x%08X", "GeckoCodes: Initiating phantom branch-and-link. "
"PC = 0x%08X, SP = 0x%08X, SFP = 0x%08X",
PC, SP, SFP); PC, SP, SFP);
LR = HLE_TRAMPOLINE_ADDRESS; LR = HLE_TRAMPOLINE_ADDRESS;
PC = NPC = ENTRY_POINT; PC = NPC = ENTRY_POINT;

View File

@ -117,8 +117,8 @@ void AXUCode::HandleCommandList()
switch (cmd) switch (cmd)
{ {
// Some of these commands are unknown, or unused in this AX HLE. // Some of these commands are unknown, or unused in this AX HLE.
// We still need to skip their arguments using "curr_idx += N". // We still need to skip their arguments using "curr_idx += N".
case CMD_SETUP: case CMD_SETUP:
addr_hi = m_cmdlist[curr_idx++]; addr_hi = m_cmdlist[curr_idx++];

View File

@ -460,8 +460,8 @@ void ProcessVoice(PB_TYPE& pb, const AXBuffers& buffers, u16 count, AXMixControl
pb.lpf.yn1 = LowPassFilter(samples, count, pb.lpf.yn1, pb.lpf.a0, pb.lpf.b0); pb.lpf.yn1 = LowPassFilter(samples, count, pb.lpf.yn1, pb.lpf.a0, pb.lpf.b0);
} }
// Mix LRS, AUXA and AUXB depending on mixer_control // Mix LRS, AUXA and AUXB depending on mixer_control
// TODO: Handle DPL2 on AUXB. // TODO: Handle DPL2 on AUXB.
#define MIX_ON(C) (0 != (mctrl & MIX_##C)) #define MIX_ON(C) (0 != (mctrl & MIX_##C))
#define RAMP_ON(C) (0 != (mctrl & MIX_##C##_RAMP)) #define RAMP_ON(C) (0 != (mctrl & MIX_##C##_RAMP))

View File

@ -59,8 +59,8 @@ void AXWiiUCode::HandleCommandList()
{ {
switch (cmd) switch (cmd)
{ {
// Some of these commands are unknown, or unused in this AX HLE. // Some of these commands are unknown, or unused in this AX HLE.
// We still need to skip their arguments using "curr_idx += N". // We still need to skip their arguments using "curr_idx += N".
case CMD_SETUP_OLD: case CMD_SETUP_OLD:
addr_hi = m_cmdlist[curr_idx++]; addr_hi = m_cmdlist[curr_idx++];
@ -156,8 +156,8 @@ void AXWiiUCode::HandleCommandList()
{ {
switch (cmd) switch (cmd)
{ {
// Some of these commands are unknown, or unused in this AX HLE. // Some of these commands are unknown, or unused in this AX HLE.
// We still need to skip their arguments using "curr_idx += N". // We still need to skip their arguments using "curr_idx += N".
case CMD_SETUP: case CMD_SETUP:
addr_hi = m_cmdlist[curr_idx++]; addr_hi = m_cmdlist[curr_idx++];

View File

@ -66,8 +66,9 @@ void ProcessGBACrypto(u32 address)
HLEMemory_Write_U32(dest_addr + 4, t3); HLEMemory_Write_U32(dest_addr + 4, t3);
// Done! // Done!
DEBUG_LOG(DSPHLE, "\n%08x -> challenge: %08x, len: %08x, dest_addr: %08x, " DEBUG_LOG(DSPHLE,
"palette: %08x, speed: %08x key: %08x, auth_code: %08x", "\n%08x -> challenge: %08x, len: %08x, dest_addr: %08x, "
"palette: %08x, speed: %08x key: %08x, auth_code: %08x",
address, challenge, length, dest_addr, logo_palette, logo_speed_32, key, t3); address, challenge, length, dest_addr, logo_palette, logo_speed_32, key, t3);
} }

View File

@ -51,6 +51,7 @@ public:
virtual void DoState(PointerWrap& p) { DoStateShared(p); } virtual void DoState(PointerWrap& p) { DoStateShared(p); }
static u32 GetCRC(UCodeInterface* ucode) { return ucode ? ucode->m_crc : UCODE_NULL; } static u32 GetCRC(UCodeInterface* ucode) { return ucode ? ucode->m_crc : UCODE_NULL; }
protected: protected:
void PrepareBootUCode(u32 mail); void PrepareBootUCode(u32 mail);

View File

@ -1035,10 +1035,15 @@ void ZeldaAudioRenderer::ApplyReverb(bool post_rendering)
// Each of the 4 RPBs maps to one of these buffers. // Each of the 4 RPBs maps to one of these buffers.
MixingBuffer* reverb_buffers[4] = { MixingBuffer* reverb_buffers[4] = {
&m_buf_unk0_reverb, &m_buf_unk1_reverb, &m_buf_front_left_reverb, &m_buf_front_right_reverb, &m_buf_unk0_reverb,
&m_buf_unk1_reverb,
&m_buf_front_left_reverb,
&m_buf_front_right_reverb,
}; };
std::array<s16, 8>* last8_samples_buffers[4] = { std::array<s16, 8>* last8_samples_buffers[4] = {
&m_buf_unk0_reverb_last8, &m_buf_unk1_reverb_last8, &m_buf_front_left_reverb_last8, &m_buf_unk0_reverb_last8,
&m_buf_unk1_reverb_last8,
&m_buf_front_left_reverb_last8,
&m_buf_front_right_reverb_last8, &m_buf_front_right_reverb_last8,
}; };

View File

@ -318,8 +318,9 @@ static u32 AdvanceDTK(u32 maximum_samples, u32* samples_to_process)
{ {
if (s_audio_position >= s_current_start + s_current_length) if (s_audio_position >= s_current_start + s_current_length)
{ {
DEBUG_LOG(DVDINTERFACE, "AdvanceDTK: NextStart=%08" PRIx64 ", NextLength=%08x, " DEBUG_LOG(DVDINTERFACE,
"CurrentStart=%08" PRIx64 ", CurrentLength=%08x, AudioPos=%08" PRIx64, "AdvanceDTK: NextStart=%08" PRIx64 ", NextLength=%08x, "
"CurrentStart=%08" PRIx64 ", CurrentLength=%08x, AudioPos=%08" PRIx64,
s_next_start, s_next_length, s_current_start, s_current_length, s_audio_position); s_next_start, s_next_length, s_current_start, s_current_length, s_audio_position);
s_audio_position = s_next_start; s_audio_position = s_next_start;
@ -825,8 +826,9 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
{ {
u64 iDVDOffset = (u64)command_1 << 2; u64 iDVDOffset = (u64)command_1 << 2;
INFO_LOG(DVDINTERFACE, "Read: DVDOffset=%08" PRIx64 INFO_LOG(DVDINTERFACE,
", DMABuffer = %08x, SrcLength = %08x, DMALength = %08x", "Read: DVDOffset=%08" PRIx64
", DMABuffer = %08x, SrcLength = %08x, DMALength = %08x",
iDVDOffset, output_address, command_2, output_length); iDVDOffset, output_address, command_2, output_length);
command_handled_by_thread = command_handled_by_thread =
@ -948,9 +950,10 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr
switch (command_0 >> 16 & 0xFF) switch (command_0 >> 16 & 0xFF)
{ {
case 0x00: // Returns streaming status case 0x00: // Returns streaming status
INFO_LOG(DVDINTERFACE, "(Audio): Stream Status: Request Audio status " INFO_LOG(DVDINTERFACE,
"AudioPos:%08" PRIx64 "/%08" PRIx64 " " "(Audio): Stream Status: Request Audio status "
"CurrentStart:%08" PRIx64 " CurrentLength:%08x", "AudioPos:%08" PRIx64 "/%08" PRIx64 " "
"CurrentStart:%08" PRIx64 " CurrentLength:%08x",
s_audio_position, s_current_start + s_current_length, s_current_start, s_audio_position, s_current_start + s_current_length, s_current_start,
s_current_length); s_current_length);
WriteImmediate(s_stream ? 1 : 0, output_address, reply_to_ios); WriteImmediate(s_stream ? 1 : 0, output_address, reply_to_ios);
@ -1295,8 +1298,9 @@ void ScheduleReads(u64 offset, u32 length, const DiscIO::Partition& partition, u
s_read_buffer_end_offset - s_read_buffer_start_offset, wii_disc)); s_read_buffer_end_offset - s_read_buffer_start_offset, wii_disc));
} }
DEBUG_LOG(DVDINTERFACE, "Schedule reads: ECC blocks unbuffered=%d, buffered=%d, " DEBUG_LOG(DVDINTERFACE,
"ticks=%" PRId64 ", time=%" PRId64 " us", "Schedule reads: ECC blocks unbuffered=%d, buffered=%d, "
"ticks=%" PRId64 ", time=%" PRId64 " us",
unbuffered_blocks, buffered_blocks, ticks_until_completion, unbuffered_blocks, buffered_blocks, ticks_until_completion,
ticks_until_completion * 1000000 / SystemTimers::GetTicksPerSecond()); ticks_until_completion * 1000000 / SystemTimers::GetTicksPerSecond());
} }

View File

@ -311,9 +311,10 @@ static void FinishRead(u64 id, s64 cycles_late)
const ReadRequest& request = result.first; const ReadRequest& request = result.first;
const std::vector<u8>& buffer = result.second; const std::vector<u8>& buffer = result.second;
DEBUG_LOG(DVDINTERFACE, "Disc has been read. Real time: %" PRIu64 " us. " DEBUG_LOG(DVDINTERFACE,
"Real time including delay: %" PRIu64 " us. " "Disc has been read. Real time: %" PRIu64 " us. "
"Emulated time including delay: %" PRIu64 " us.", "Real time including delay: %" PRIu64 " us. "
"Emulated time including delay: %" PRIu64 " us.",
request.realtime_done_us - request.realtime_started_us, request.realtime_done_us - request.realtime_started_us,
Common::Timer::GetTimeUs() - request.realtime_started_us, Common::Timer::GetTimeUs() - request.realtime_started_us,
(CoreTiming::GetTicks() - request.time_started_ticks) / (CoreTiming::GetTicks() - request.time_started_ticks) /

View File

@ -81,6 +81,7 @@ public:
virtual void DoState(PointerWrap& p) = 0; virtual void DoState(PointerWrap& p) = 0;
u32 GetCardId() const { return m_nintendo_card_id; } u32 GetCardId() const { return m_nintendo_card_id; }
bool IsAddressInBounds(u32 address) const { return address <= (m_memory_card_size - 1); } bool IsAddressInBounds(u32 address) const { return address <= (m_memory_card_size - 1); }
protected: protected:
int m_card_index; int m_card_index;
u16 m_nintendo_card_id; u16 m_nintendo_card_id;

View File

@ -27,7 +27,8 @@ static const u16 button_bitmasks[] = {
}; };
static const u16 trigger_bitmasks[] = { static const u16 trigger_bitmasks[] = {
PAD_TRIGGER_L, PAD_TRIGGER_R, PAD_TRIGGER_L,
PAD_TRIGGER_R,
}; };
static const u16 dpad_bitmasks[] = {PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT, static const u16 dpad_bitmasks[] = {PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT,

View File

@ -148,8 +148,9 @@ private:
std::function<T(u32)> InvalidReadLambda() const std::function<T(u32)> InvalidReadLambda() const
{ {
return [](u32) { return [](u32) {
DEBUG_ASSERT_MSG(MEMMAP, 0, "Called the read lambda on a write " DEBUG_ASSERT_MSG(MEMMAP, 0,
"complex handler."); "Called the read lambda on a write "
"complex handler.");
return 0; return 0;
}; };
} }
@ -157,8 +158,9 @@ private:
std::function<void(u32, T)> InvalidWriteLambda() const std::function<void(u32, T)> InvalidWriteLambda() const
{ {
return [](u32, T) { return [](u32, T) {
DEBUG_ASSERT_MSG(MEMMAP, 0, "Called the write lambda on a read " DEBUG_ASSERT_MSG(MEMMAP, 0,
"complex handler."); "Called the write lambda on a read "
"complex handler.");
}; };
} }

View File

@ -62,9 +62,10 @@ inline bool IsMMIOAddress(u32 address)
// The block ID can easily be computed by simply checking bit 24 (CC vs. CD). // The block ID can easily be computed by simply checking bit 24 (CC vs. CD).
inline u32 UniqueID(u32 address) inline u32 UniqueID(u32 address)
{ {
DEBUG_ASSERT_MSG(MEMMAP, ((address & 0xFFFF0000) == 0x0C000000) || DEBUG_ASSERT_MSG(MEMMAP,
((address & 0xFFFF0000) == 0x0D000000) || ((address & 0xFFFF0000) == 0x0C000000) ||
((address & 0xFFFF0000) == 0x0D800000), ((address & 0xFFFF0000) == 0x0D000000) ||
((address & 0xFFFF0000) == 0x0D800000),
"Trying to get the ID of a non-existing MMIO address."); "Trying to get the ID of a non-existing MMIO address.");
return (((address >> 24) & 1) << 16) | (address & 0xFFFF); return (((address >> 24) & 1) << 16) | (address & 0xFFFF);

View File

@ -61,7 +61,8 @@ static UVIBorderBlankRegister m_BorderHBlank;
static u32 s_target_refresh_rate = 0; static u32 s_target_refresh_rate = 0;
static constexpr std::array<u32, 2> s_clock_freqs{{ static constexpr std::array<u32, 2> s_clock_freqs{{
27000000, 54000000, 27000000,
54000000,
}}; }};
static u64 s_ticks_last_line_start; // number of ticks when the current full scanline started static u64 s_ticks_last_line_start; // number of ticks when the current full scanline started
@ -323,10 +324,9 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
})); }));
mmio->Register( mmio->Register(
base | VI_HORIZONTAL_BEAM_POSITION, MMIO::ComplexRead<u16>([](u32) { base | VI_HORIZONTAL_BEAM_POSITION, MMIO::ComplexRead<u16>([](u32) {
u16 value = u16 value = static_cast<u16>(1 + m_HTiming0.HLW *
static_cast<u16>(1 + (CoreTiming::GetTicks() - s_ticks_last_line_start) /
m_HTiming0.HLW * (CoreTiming::GetTicks() - s_ticks_last_line_start) / (GetTicksPerHalfLine()));
(GetTicksPerHalfLine()));
return MathUtil::Clamp(value, static_cast<u16>(1), static_cast<u16>(m_HTiming0.HLW * 2)); return MathUtil::Clamp(value, static_cast<u16>(1), static_cast<u16>(m_HTiming0.HLW * 2));
}), }),
MMIO::ComplexWrite<u16>([](u32, u16 val) { MMIO::ComplexWrite<u16>([](u32, u16 val) {
@ -644,13 +644,15 @@ static void LogField(FieldType field, u32 xfb_address)
static constexpr std::array<const char*, 2> field_type_names{{"Odd", "Even"}}; static constexpr std::array<const char*, 2> field_type_names{{"Odd", "Even"}};
static const std::array<const UVIVBlankTimingRegister*, 2> vert_timing{{ static const std::array<const UVIVBlankTimingRegister*, 2> vert_timing{{
&m_VBlankTimingOdd, &m_VBlankTimingEven, &m_VBlankTimingOdd,
&m_VBlankTimingEven,
}}; }};
const auto field_index = static_cast<size_t>(field); const auto field_index = static_cast<size_t>(field);
DEBUG_LOG(VIDEOINTERFACE, "(VI->BeginField): Address: %.08X | WPL %u | STD %u | EQ %u | PRB %u | " DEBUG_LOG(VIDEOINTERFACE,
"ACV %u | PSB %u | Field %s", "(VI->BeginField): Address: %.08X | WPL %u | STD %u | EQ %u | PRB %u | "
"ACV %u | PSB %u | Field %s",
xfb_address, m_PictureConfiguration.WPL, m_PictureConfiguration.STD, xfb_address, m_PictureConfiguration.WPL, m_PictureConfiguration.STD,
m_VerticalTimingRegister.EQU, vert_timing[field_index]->PRB, m_VerticalTimingRegister.EQU, vert_timing[field_index]->PRB,
m_VerticalTimingRegister.ACV, vert_timing[field_index]->PSB, m_VerticalTimingRegister.ACV, vert_timing[field_index]->PSB,

View File

@ -23,25 +23,54 @@ constexpr std::array<u8, 6> classic_id{{0x00, 0x00, 0xa4, 0x20, 0x01, 0x01}};
// Classic Controller calibration // Classic Controller calibration
constexpr std::array<u8, 0x10> classic_calibration{{ constexpr std::array<u8, 0x10> classic_calibration{{
0xff, 0x00, 0x80, 0xff, 0x00, 0x80, 0xff, 0x00, 0x80, 0xff, 0x00, 0x80, 0x00, 0x00, 0x51, 0xa6, 0xff,
0x00,
0x80,
0xff,
0x00,
0x80,
0xff,
0x00,
0x80,
0xff,
0x00,
0x80,
0x00,
0x00,
0x51,
0xa6,
}}; }};
constexpr std::array<u16, 9> classic_button_bitmasks{{ constexpr std::array<u16, 9> classic_button_bitmasks{{
Classic::BUTTON_A, Classic::BUTTON_B, Classic::BUTTON_X, Classic::BUTTON_Y, Classic::BUTTON_A,
Classic::BUTTON_B,
Classic::BUTTON_X,
Classic::BUTTON_Y,
Classic::BUTTON_ZL, Classic::BUTTON_ZR, Classic::BUTTON_ZL,
Classic::BUTTON_ZR,
Classic::BUTTON_MINUS, Classic::BUTTON_PLUS, Classic::BUTTON_MINUS,
Classic::BUTTON_PLUS,
Classic::BUTTON_HOME, Classic::BUTTON_HOME,
}}; }};
constexpr std::array<const char*, 9> classic_button_names{{ constexpr std::array<const char*, 9> classic_button_names{{
"A", "B", "X", "Y", "ZL", "ZR", "-", "+", "Home", "A",
"B",
"X",
"Y",
"ZL",
"ZR",
"-",
"+",
"Home",
}}; }};
constexpr std::array<u16, 2> classic_trigger_bitmasks{{ constexpr std::array<u16, 2> classic_trigger_bitmasks{{
Classic::TRIGGER_L, Classic::TRIGGER_R, Classic::TRIGGER_L,
Classic::TRIGGER_R,
}}; }};
constexpr std::array<const char*, 4> classic_trigger_names{{ constexpr std::array<const char*, 4> classic_trigger_names{{
@ -56,7 +85,10 @@ constexpr std::array<const char*, 4> classic_trigger_names{{
}}; }};
constexpr std::array<u16, 4> classic_dpad_bitmasks{{ constexpr std::array<u16, 4> classic_dpad_bitmasks{{
Classic::PAD_UP, Classic::PAD_DOWN, Classic::PAD_LEFT, Classic::PAD_RIGHT, Classic::PAD_UP,
Classic::PAD_DOWN,
Classic::PAD_LEFT,
Classic::PAD_RIGHT,
}}; }};
Classic::Classic(ExtensionReg& reg) : Attachment(_trans("Classic"), reg) Classic::Classic(ExtensionReg& reg) : Attachment(_trans("Classic"), reg)

View File

@ -20,17 +20,26 @@ namespace WiimoteEmu
constexpr std::array<u8, 6> drums_id{{0x01, 0x00, 0xa4, 0x20, 0x01, 0x03}}; constexpr std::array<u8, 6> drums_id{{0x01, 0x00, 0xa4, 0x20, 0x01, 0x03}};
constexpr std::array<u16, 6> drum_pad_bitmasks{{ constexpr std::array<u16, 6> drum_pad_bitmasks{{
Drums::PAD_RED, Drums::PAD_YELLOW, Drums::PAD_BLUE, Drums::PAD_GREEN, Drums::PAD_ORANGE, Drums::PAD_RED,
Drums::PAD_YELLOW,
Drums::PAD_BLUE,
Drums::PAD_GREEN,
Drums::PAD_ORANGE,
Drums::PAD_BASS, Drums::PAD_BASS,
}}; }};
constexpr std::array<const char*, 6> drum_pad_names{{ constexpr std::array<const char*, 6> drum_pad_names{{
_trans("Red"), _trans("Yellow"), _trans("Blue"), _trans("Green"), _trans("Orange"), _trans("Red"),
_trans("Yellow"),
_trans("Blue"),
_trans("Green"),
_trans("Orange"),
_trans("Bass"), _trans("Bass"),
}}; }};
constexpr std::array<u16, 2> drum_button_bitmasks{{ constexpr std::array<u16, 2> drum_button_bitmasks{{
Drums::BUTTON_MINUS, Drums::BUTTON_PLUS, Drums::BUTTON_MINUS,
Drums::BUTTON_PLUS,
}}; }};
Drums::Drums(ExtensionReg& reg) : Attachment(_trans("Drums"), reg) Drums::Drums(ExtensionReg& reg) : Attachment(_trans("Drums"), reg)

View File

@ -36,20 +36,29 @@ static const std::map<const ControlState, const u8> s_slider_bar_control_codes{
constexpr std::array<u8, 6> guitar_id{{0x00, 0x00, 0xa4, 0x20, 0x01, 0x03}}; constexpr std::array<u8, 6> guitar_id{{0x00, 0x00, 0xa4, 0x20, 0x01, 0x03}};
constexpr std::array<u16, 5> guitar_fret_bitmasks{{ constexpr std::array<u16, 5> guitar_fret_bitmasks{{
Guitar::FRET_GREEN, Guitar::FRET_RED, Guitar::FRET_YELLOW, Guitar::FRET_BLUE, Guitar::FRET_GREEN,
Guitar::FRET_RED,
Guitar::FRET_YELLOW,
Guitar::FRET_BLUE,
Guitar::FRET_ORANGE, Guitar::FRET_ORANGE,
}}; }};
constexpr std::array<const char*, 5> guitar_fret_names{{ constexpr std::array<const char*, 5> guitar_fret_names{{
_trans("Green"), _trans("Red"), _trans("Yellow"), _trans("Blue"), _trans("Orange"), _trans("Green"),
_trans("Red"),
_trans("Yellow"),
_trans("Blue"),
_trans("Orange"),
}}; }};
constexpr std::array<u16, 2> guitar_button_bitmasks{{ constexpr std::array<u16, 2> guitar_button_bitmasks{{
Guitar::BUTTON_MINUS, Guitar::BUTTON_PLUS, Guitar::BUTTON_MINUS,
Guitar::BUTTON_PLUS,
}}; }};
constexpr std::array<u16, 2> guitar_strum_bitmasks{{ constexpr std::array<u16, 2> guitar_strum_bitmasks{{
Guitar::BAR_UP, Guitar::BAR_DOWN, Guitar::BAR_UP,
Guitar::BAR_DOWN,
}}; }};
Guitar::Guitar(ExtensionReg& reg) : Attachment(_trans("Guitar"), reg) Guitar::Guitar(ExtensionReg& reg) : Attachment(_trans("Guitar"), reg)

View File

@ -24,7 +24,8 @@ namespace WiimoteEmu
constexpr std::array<u8, 6> nunchuk_id{{0x00, 0x00, 0xa4, 0x20, 0x00, 0x00}}; constexpr std::array<u8, 6> nunchuk_id{{0x00, 0x00, 0xa4, 0x20, 0x00, 0x00}};
constexpr std::array<u8, 2> nunchuk_button_bitmasks{{ constexpr std::array<u8, 2> nunchuk_button_bitmasks{{
Nunchuk::BUTTON_C, Nunchuk::BUTTON_Z, Nunchuk::BUTTON_C,
Nunchuk::BUTTON_Z,
}}; }};
Nunchuk::Nunchuk(ExtensionReg& reg) : Attachment(_trans("Nunchuk"), reg) Nunchuk::Nunchuk(ExtensionReg& reg) : Attachment(_trans("Nunchuk"), reg)

View File

@ -23,14 +23,26 @@ namespace WiimoteEmu
constexpr std::array<u8, 6> turntable_id{{0x03, 0x00, 0xa4, 0x20, 0x01, 0x03}}; constexpr std::array<u8, 6> turntable_id{{0x03, 0x00, 0xa4, 0x20, 0x01, 0x03}};
constexpr std::array<u16, 9> turntable_button_bitmasks{{ constexpr std::array<u16, 9> turntable_button_bitmasks{{
Turntable::BUTTON_L_GREEN, Turntable::BUTTON_L_RED, Turntable::BUTTON_L_BLUE, Turntable::BUTTON_L_GREEN,
Turntable::BUTTON_R_GREEN, Turntable::BUTTON_R_RED, Turntable::BUTTON_R_BLUE, Turntable::BUTTON_L_RED,
Turntable::BUTTON_MINUS, Turntable::BUTTON_PLUS, Turntable::BUTTON_EUPHORIA, Turntable::BUTTON_L_BLUE,
Turntable::BUTTON_R_GREEN,
Turntable::BUTTON_R_RED,
Turntable::BUTTON_R_BLUE,
Turntable::BUTTON_MINUS,
Turntable::BUTTON_PLUS,
Turntable::BUTTON_EUPHORIA,
}}; }};
constexpr std::array<const char*, 9> turntable_button_names{{ constexpr std::array<const char*, 9> turntable_button_names{{
_trans("Green Left"), _trans("Red Left"), _trans("Blue Left"), _trans("Green Right"), _trans("Green Left"),
_trans("Red Right"), _trans("Blue Right"), "-", "+", _trans("Red Left"),
_trans("Blue Left"),
_trans("Green Right"),
_trans("Red Right"),
_trans("Blue Right"),
"-",
"+",
// i18n: This button name refers to a gameplay element in DJ Hero // i18n: This button name refers to a gameplay element in DJ Hero
_trans("Euphoria"), _trans("Euphoria"),
}}; }};

View File

@ -53,6 +53,7 @@ auto const PI = TAU / 2.0;
namespace WiimoteEmu namespace WiimoteEmu
{ {
// clang-format off
static const u8 eeprom_data_0[] = { static const u8 eeprom_data_0[] = {
// IR, maybe more // IR, maybe more
// assuming last 2 bytes are checksum // assuming last 2 bytes are checksum
@ -64,6 +65,7 @@ static const u8 eeprom_data_0[] = {
ACCEL_ZERO_G, ACCEL_ZERO_G, ACCEL_ZERO_G, 0, ACCEL_ONE_G, ACCEL_ONE_G, ACCEL_ONE_G, 0, 0, 0xA3, ACCEL_ZERO_G, ACCEL_ZERO_G, ACCEL_ZERO_G, 0, ACCEL_ONE_G, ACCEL_ONE_G, ACCEL_ONE_G, 0, 0, 0xA3,
ACCEL_ZERO_G, ACCEL_ZERO_G, ACCEL_ZERO_G, 0, ACCEL_ONE_G, ACCEL_ONE_G, ACCEL_ONE_G, 0, 0, 0xA3, ACCEL_ZERO_G, ACCEL_ZERO_G, ACCEL_ZERO_G, 0, ACCEL_ONE_G, ACCEL_ONE_G, ACCEL_ONE_G, 0, 0, 0xA3,
}; };
// clang-format on
static const u8 motion_plus_id[] = {0x00, 0x00, 0xA6, 0x20, 0x00, 0x05}; static const u8 motion_plus_id[] = {0x00, 0x00, 0xA6, 0x20, 0x00, 0x05};

View File

@ -19,6 +19,7 @@ public:
WiimoteAndroid(int index); WiimoteAndroid(int index);
~WiimoteAndroid() override; ~WiimoteAndroid() override;
std::string GetId() const override { return "Android " + std::to_string(m_mayflash_index); } std::string GetId() const override { return "Android " + std::to_string(m_mayflash_index); }
protected: protected:
bool ConnectInternal() override; bool ConnectInternal() override;
void DisconnectInternal() override; void DisconnectInternal() override;

View File

@ -258,8 +258,9 @@ int WiimoteLinux::IORead(u8* buf)
if (errno == ENOTCONN) if (errno == ENOTCONN)
{ {
// This can happen if the Bluetooth dongle is disconnected // This can happen if the Bluetooth dongle is disconnected
ERROR_LOG(WIIMOTE, "Bluetooth appears to be disconnected. " ERROR_LOG(WIIMOTE,
"Wiimote %i will be disconnected.", "Bluetooth appears to be disconnected. "
"Wiimote %i will be disconnected.",
m_index + 1); m_index + 1);
} }

View File

@ -27,6 +27,7 @@ public:
WiimoteWindows(const std::basic_string<TCHAR>& path, WinWriteMethod initial_write_method); WiimoteWindows(const std::basic_string<TCHAR>& path, WinWriteMethod initial_write_method);
~WiimoteWindows() override; ~WiimoteWindows() override;
std::string GetId() const override { return UTF16ToUTF8(m_devicepath); } std::string GetId() const override { return UTF16ToUTF8(m_devicepath); }
protected: protected:
bool ConnectInternal() override; bool ConnectInternal() override;
void DisconnectInternal() override; void DisconnectInternal() override;

View File

@ -15,8 +15,9 @@ static bool IsDeviceUsable(const std::string& device_path)
hid_device* handle = hid_open_path(device_path.c_str()); hid_device* handle = hid_open_path(device_path.c_str());
if (handle == nullptr) if (handle == nullptr)
{ {
ERROR_LOG(WIIMOTE, "Could not connect to Wii Remote at \"%s\". " ERROR_LOG(WIIMOTE,
"Do you have permission to access the device?", "Could not connect to Wii Remote at \"%s\". "
"Do you have permission to access the device?",
device_path.c_str()); device_path.c_str());
return false; return false;
} }
@ -96,8 +97,9 @@ bool WiimoteHidapi::ConnectInternal()
m_handle = hid_open_path(m_device_path.c_str()); m_handle = hid_open_path(m_device_path.c_str());
if (m_handle == nullptr) if (m_handle == nullptr)
{ {
ERROR_LOG(WIIMOTE, "Could not connect to Wii Remote at \"%s\". " ERROR_LOG(WIIMOTE,
"Do you have permission to access the device?", "Could not connect to Wii Remote at \"%s\". "
"Do you have permission to access the device?",
m_device_path.c_str()); m_device_path.c_str());
} }
return m_handle != nullptr; return m_handle != nullptr;

View File

@ -17,6 +17,7 @@ public:
explicit WiimoteHidapi(const std::string& device_path); explicit WiimoteHidapi(const std::string& device_path);
~WiimoteHidapi() override; ~WiimoteHidapi() override;
std::string GetId() const override { return m_device_path; } std::string GetId() const override { return m_device_path; }
protected: protected:
bool ConnectInternal() override; bool ConnectInternal() override;
void DisconnectInternal() override; void DisconnectInternal() override;

View File

@ -278,8 +278,9 @@ ReturnCode ES::ImportContentBegin(Context& context, u64 title_id, u32 content_id
if (title_id != context.title_import_export.tmd.GetTitleId()) if (title_id != context.title_import_export.tmd.GetTitleId())
{ {
ERROR_LOG(IOS_ES, "ImportContentBegin: title id %016" PRIx64 " != " ERROR_LOG(IOS_ES,
"TMD title id %016" PRIx64 ", ignoring", "ImportContentBegin: title id %016" PRIx64 " != "
"TMD title id %016" PRIx64 ", ignoring",
title_id, context.title_import_export.tmd.GetTitleId()); title_id, context.title_import_export.tmd.GetTitleId());
return ES_EINVAL; return ES_EINVAL;
} }

View File

@ -318,6 +318,7 @@ struct ARMBinary final
u32 GetHeaderSize() const { return Common::swap32(m_bytes.data()); } u32 GetHeaderSize() const { return Common::swap32(m_bytes.data()); }
u32 GetElfOffset() const { return Common::swap32(m_bytes.data() + 0x4); } u32 GetElfOffset() const { return Common::swap32(m_bytes.data() + 0x4); }
u32 GetElfSize() const { return Common::swap32(m_bytes.data() + 0x8); } u32 GetElfSize() const { return Common::swap32(m_bytes.data() + 0x8); }
private: private:
std::vector<u8> m_bytes; std::vector<u8> m_bytes;
}; };

View File

@ -100,10 +100,13 @@ namespace HLE
{ {
constexpr u32 DEFAULT_DEVICE_ID = 0x0403AC68; constexpr u32 DEFAULT_DEVICE_ID = 0x0403AC68;
constexpr u32 DEFAULT_KEY_ID = 0x6AAB8C59; constexpr u32 DEFAULT_KEY_ID = 0x6AAB8C59;
constexpr std::array<u8, 30> DEFAULT_PRIVATE_KEY = {{ constexpr std::array<u8, 30> DEFAULT_PRIVATE_KEY = {{
0x00, 0xAB, 0xEE, 0xC1, 0xDD, 0xB4, 0xA6, 0x16, 0x6B, 0x70, 0xFD, 0x7E, 0x56, 0x67, 0x70, 0x00, 0xAB, 0xEE, 0xC1, 0xDD, 0xB4, 0xA6, 0x16, 0x6B, 0x70, 0xFD, 0x7E, 0x56, 0x67, 0x70,
0x57, 0x55, 0x27, 0x38, 0xA3, 0x26, 0xC5, 0x46, 0x16, 0xF7, 0x62, 0xC9, 0xED, 0x73, 0xF2, 0x57, 0x55, 0x27, 0x38, 0xA3, 0x26, 0xC5, 0x46, 0x16, 0xF7, 0x62, 0xC9, 0xED, 0x73, 0xF2,
}}; }};
// clang-format off
constexpr ECCSignature DEFAULT_SIGNATURE = {{ constexpr ECCSignature DEFAULT_SIGNATURE = {{
// R // R
0x00, 0xD8, 0x81, 0x63, 0xB2, 0x00, 0x6B, 0x0B, 0x54, 0x82, 0x88, 0x63, 0x81, 0x1C, 0x00, 0x71, 0x00, 0xD8, 0x81, 0x63, 0xB2, 0x00, 0x6B, 0x0B, 0x54, 0x82, 0x88, 0x63, 0x81, 0x1C, 0x00, 0x71,
@ -112,6 +115,7 @@ constexpr ECCSignature DEFAULT_SIGNATURE = {{
0x00, 0x71, 0x8D, 0x82, 0x41, 0xEE, 0x45, 0x11, 0xC7, 0x3B, 0xAC, 0x08, 0xB6, 0x83, 0xDC, 0x05, 0x00, 0x71, 0x8D, 0x82, 0x41, 0xEE, 0x45, 0x11, 0xC7, 0x3B, 0xAC, 0x08, 0xB6, 0x83, 0xDC, 0x05,
0xB8, 0xA8, 0x90, 0x1F, 0xA8, 0x2A, 0x0E, 0x4E, 0x76, 0xEF, 0x44, 0x72, 0x99, 0xF8, 0xB8, 0xA8, 0x90, 0x1F, 0xA8, 0x2A, 0x0E, 0x4E, 0x76, 0xEF, 0x44, 0x72, 0x99, 0xF8,
}}; }};
// clang-format on
const std::map<std::pair<IOSC::ObjectType, IOSC::ObjectSubType>, size_t> s_type_to_size_map = {{ const std::map<std::pair<IOSC::ObjectType, IOSC::ObjectSubType>, size_t> s_type_to_size_map = {{
{{IOSC::TYPE_SECRET_KEY, IOSC::SUBTYPE_AES128}, 16}, {{IOSC::TYPE_SECRET_KEY, IOSC::SUBTYPE_AES128}, 16},

View File

@ -31,13 +31,13 @@ struct icmp_hdr
static u8 workspace[56]; static u8 workspace[56];
/* /*
* Description: * Description:
* Calculate Internet checksum for data buffer and length (one's * Calculate Internet checksum for data buffer and length (one's
* complement sum of 16-bit words). Used in IP, ICMP, UDP, IGMP. * complement sum of 16-bit words). Used in IP, ICMP, UDP, IGMP.
* *
* NOTE: to handle odd number of bytes, last (even) byte in * NOTE: to handle odd number of bytes, last (even) byte in
* buffer have a value of 0 (we assume that it does) * buffer have a value of 0 (we assume that it does)
*/ */
u16 cksum(const u16* buffer, int length) u16 cksum(const u16* buffer, int length)
{ {
u32 sum = 0; u32 sum = 0;

View File

@ -251,8 +251,9 @@ IPCCommandResult NetIPTop::HandleSocketRequest(const IOCtlRequest& request)
WiiSockMan& sm = WiiSockMan::GetInstance(); WiiSockMan& sm = WiiSockMan::GetInstance();
const s32 return_value = sm.NewSocket(af, type, prot); const s32 return_value = sm.NewSocket(af, type, prot);
INFO_LOG(IOS_NET, "IOCTL_SO_SOCKET " INFO_LOG(IOS_NET,
"Socket: %08x (%d,%d,%d), BufferIn: (%08x, %i), BufferOut: (%08x, %i)", "IOCTL_SO_SOCKET "
"Socket: %08x (%d,%d,%d), BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
return_value, af, type, prot, request.buffer_in, request.buffer_in_size, return_value, af, type, prot, request.buffer_in, request.buffer_in_size,
request.buffer_out, request.buffer_out_size); request.buffer_out, request.buffer_out_size);
@ -353,10 +354,11 @@ IPCCommandResult NetIPTop::HandleSetSockOptRequest(const IOCtlRequest& request)
optlen = std::min(optlen, (u32)sizeof(optval)); optlen = std::min(optlen, (u32)sizeof(optval));
Memory::CopyFromEmu(optval, request.buffer_in + 0x10, optlen); Memory::CopyFromEmu(optval, request.buffer_in + 0x10, optlen);
INFO_LOG(IOS_NET, "IOCTL_SO_SETSOCKOPT(%08x, %08x, %08x, %08x) " INFO_LOG(IOS_NET,
"BufferIn: (%08x, %i), BufferOut: (%08x, %i)" "IOCTL_SO_SETSOCKOPT(%08x, %08x, %08x, %08x) "
"%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx " "BufferIn: (%08x, %i), BufferOut: (%08x, %i)"
"%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx "
"%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx",
fd, level, optname, optlen, request.buffer_in, request.buffer_in_size, fd, level, optname, optlen, request.buffer_in, request.buffer_in_size,
request.buffer_out, request.buffer_out_size, optval[0], optval[1], optval[2], optval[3], request.buffer_out, request.buffer_out_size, optval[0], optval[1], optval[2], optval[3],
optval[4], optval[5], optval[6], optval[7], optval[8], optval[9], optval[10], optval[11], optval[4], optval[5], optval[6], optval[7], optval[8], optval[9], optval[10], optval[11],
@ -502,16 +504,18 @@ IPCCommandResult NetIPTop::HandleInetAToNRequest(const IOCtlRequest& request)
if (remoteHost == nullptr || remoteHost->h_addr_list == nullptr || if (remoteHost == nullptr || remoteHost->h_addr_list == nullptr ||
remoteHost->h_addr_list[0] == nullptr) remoteHost->h_addr_list[0] == nullptr)
{ {
INFO_LOG(IOS_NET, "IOCTL_SO_INETATON = -1 " INFO_LOG(IOS_NET,
"%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: None", "IOCTL_SO_INETATON = -1 "
"%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: None",
hostname.c_str(), request.buffer_in, request.buffer_in_size, request.buffer_out, hostname.c_str(), request.buffer_in, request.buffer_in_size, request.buffer_out,
request.buffer_out_size); request.buffer_out_size);
return GetDefaultReply(0); return GetDefaultReply(0);
} }
Memory::Write_U32(Common::swap32(*(u32*)remoteHost->h_addr_list[0]), request.buffer_out); Memory::Write_U32(Common::swap32(*(u32*)remoteHost->h_addr_list[0]), request.buffer_out);
INFO_LOG(IOS_NET, "IOCTL_SO_INETATON = 0 " INFO_LOG(IOS_NET,
"%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: %08X", "IOCTL_SO_INETATON = 0 "
"%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: %08X",
hostname.c_str(), request.buffer_in, request.buffer_in_size, request.buffer_out, hostname.c_str(), request.buffer_in, request.buffer_in_size, request.buffer_out,
request.buffer_out_size, Common::swap32(*(u32*)remoteHost->h_addr_list[0])); request.buffer_out_size, Common::swap32(*(u32*)remoteHost->h_addr_list[0]));
return GetDefaultReply(1); return GetDefaultReply(1);
@ -577,9 +581,10 @@ IPCCommandResult NetIPTop::HandlePollRequest(const IOCtlRequest& request)
ufds[i].events |= map.native; ufds[i].events |= map.native;
unhandled_events &= ~map.wii; unhandled_events &= ~map.wii;
} }
DEBUG_LOG(IOS_NET, "IOCTL_SO_POLL(%d) " DEBUG_LOG(IOS_NET,
"Sock: %08x, Unknown: %08x, Events: %08x, " "IOCTL_SO_POLL(%d) "
"NativeEvents: %08x", "Sock: %08x, Unknown: %08x, Events: %08x, "
"NativeEvents: %08x",
i, wii_fd, unknown, events, ufds[i].events); i, wii_fd, unknown, events, ufds[i].events);
// Do not pass return-only events to the native poll // Do not pass return-only events to the native poll
@ -625,8 +630,9 @@ IPCCommandResult NetIPTop::HandleGetHostByNameRequest(const IOCtlRequest& reques
std::string hostname = Memory::GetString(request.buffer_in); std::string hostname = Memory::GetString(request.buffer_in);
hostent* remoteHost = gethostbyname(hostname.c_str()); hostent* remoteHost = gethostbyname(hostname.c_str());
INFO_LOG(IOS_NET, "IOCTL_SO_GETHOSTBYNAME " INFO_LOG(IOS_NET,
"Address: %s, BufferIn: (%08x, %i), BufferOut: (%08x, %i)", "IOCTL_SO_GETHOSTBYNAME "
"Address: %s, BufferIn: (%08x, %i), BufferOut: (%08x, %i)",
hostname.c_str(), request.buffer_in, request.buffer_in_size, request.buffer_out, hostname.c_str(), request.buffer_in, request.buffer_in_size, request.buffer_out,
request.buffer_out_size); request.buffer_out_size);
@ -718,8 +724,9 @@ IPCCommandResult NetIPTop::HandleGetInterfaceOptRequest(const IOCtlVRequest& req
param5 = Memory::Read_U32(request.io_vectors[0].address + 4); param5 = Memory::Read_U32(request.io_vectors[0].address + 4);
} }
INFO_LOG(IOS_NET, "IOCTLV_SO_GETINTERFACEOPT(%08X, %08X, %X, %X, %X) " INFO_LOG(IOS_NET,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i) ", "IOCTLV_SO_GETINTERFACEOPT(%08X, %08X, %X, %X, %X) "
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i) ",
param, param2, param3, param4, param5, request.in_vectors[0].address, param, param2, param3, param4, param5, request.in_vectors[0].address,
request.in_vectors[0].size, request.in_vectors[0].size,
request.in_vectors.size() > 1 ? request.in_vectors[1].address : 0, request.in_vectors.size() > 1 ? request.in_vectors[1].address : 0,
@ -989,8 +996,9 @@ IPCCommandResult NetIPTop::HandleICMPPingRequest(const IOCtlVRequest& request)
if (ip_info.length != 8 || ip_info.addr_family != AF_INET) if (ip_info.length != 8 || ip_info.addr_family != AF_INET)
{ {
INFO_LOG(IOS_NET, "IOCTLV_SO_ICMPPING strange IPInfo:\n" INFO_LOG(IOS_NET,
"length %x addr_family %x", "IOCTLV_SO_ICMPPING strange IPInfo:\n"
"length %x addr_family %x",
ip_info.length, ip_info.addr_family); ip_info.length, ip_info.addr_family);
} }

View File

@ -165,7 +165,10 @@ u8 NetKDRequest::GetAreaCode(const std::string& area) const
u8 NetKDRequest::GetHardwareModel(const std::string& model) const u8 NetKDRequest::GetHardwareModel(const std::string& model) const
{ {
static const std::map<std::string, u8> models = { static const std::map<std::string, u8> models = {
{"RVL", MODEL_RVL}, {"RVT", MODEL_RVT}, {"RVV", MODEL_RVV}, {"RVD", MODEL_RVD}, {"RVL", MODEL_RVL},
{"RVT", MODEL_RVT},
{"RVV", MODEL_RVV},
{"RVD", MODEL_RVD},
}; };
auto entryPos = models.find(model); auto entryPos = models.find(model);

View File

@ -38,8 +38,9 @@ void GetMACAddress(u8* mac)
SaveMACAddress(mac); SaveMACAddress(mac);
if (!wireless_mac.empty()) if (!wireless_mac.empty())
{ {
ERROR_LOG(IOS_NET, "The MAC provided (%s) is invalid. We have " ERROR_LOG(IOS_NET,
"generated another one for you.", "The MAC provided (%s) is invalid. We have "
"generated another one for you.",
Common::MacAddressToString(mac).c_str()); Common::MacAddressToString(mac).c_str());
} }
} }

View File

@ -238,10 +238,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
WriteReturnValue(SSL_ERR_FAILED, BufferIn); WriteReturnValue(SSL_ERR_FAILED, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_NEW (%d, %s) " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_NEW (%d, %s) "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
verifyOption, hostname.c_str(), BufferIn, BufferInSize, BufferIn2, BufferInSize2, verifyOption, hostname.c_str(), BufferIn, BufferInSize, BufferIn2, BufferInSize2,
BufferIn3, BufferInSize3, BufferOut, BufferOutSize, BufferOut2, BufferOutSize2, BufferIn3, BufferInSize3, BufferOut, BufferOutSize, BufferOut2, BufferOutSize2,
BufferOut3, BufferOutSize3); BufferOut3, BufferOutSize3);
@ -275,20 +276,22 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
{ {
WriteReturnValue(SSL_ERR_ID, BufferIn); WriteReturnValue(SSL_ERR_ID, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_SHUTDOWN " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_SHUTDOWN "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
break; break;
} }
case IOCTLV_NET_SSL_SETROOTCA: case IOCTLV_NET_SSL_SETROOTCA:
{ {
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_SETROOTCA " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_SETROOTCA "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
@ -325,10 +328,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
} }
case IOCTLV_NET_SSL_SETBUILTINCLIENTCERT: case IOCTLV_NET_SSL_SETBUILTINCLIENTCERT:
{ {
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_SETBUILTINCLIENTCERT " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_SETBUILTINCLIENTCERT "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
@ -371,10 +375,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
} }
case IOCTLV_NET_SSL_REMOVECLIENTCERT: case IOCTLV_NET_SSL_REMOVECLIENTCERT:
{ {
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_REMOVECLIENTCERT " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_REMOVECLIENTCERT "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
@ -424,10 +429,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
{ {
WriteReturnValue(SSL_ERR_ID, BufferIn); WriteReturnValue(SSL_ERR_ID, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_SETBUILTINROOTCA " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_SETBUILTINROOTCA "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
break; break;
@ -450,10 +456,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
{ {
WriteReturnValue(SSL_ERR_ID, BufferIn); WriteReturnValue(SSL_ERR_ID, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_CONNECT " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_CONNECT "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
break; break;
@ -486,10 +493,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
{ {
WriteReturnValue(SSL_ERR_ID, BufferIn); WriteReturnValue(SSL_ERR_ID, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_WRITE " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_WRITE "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
INFO_LOG(IOS_SSL, "%s", Memory::GetString(BufferOut2).c_str()); INFO_LOG(IOS_SSL, "%s", Memory::GetString(BufferOut2).c_str());
@ -510,10 +518,11 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
WriteReturnValue(SSL_ERR_ID, BufferIn); WriteReturnValue(SSL_ERR_ID, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_READ(%d)" INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_READ(%d)"
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
ret, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, ret, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3,
BufferOut, BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOut, BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
break; break;
@ -529,20 +538,22 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
{ {
WriteReturnValue(SSL_ERR_ID, BufferIn); WriteReturnValue(SSL_ERR_ID, BufferIn);
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_SETROOTCADEFAULT " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_SETROOTCADEFAULT "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);
break; break;
} }
case IOCTLV_NET_SSL_SETCLIENTCERTDEFAULT: case IOCTLV_NET_SSL_SETCLIENTCERTDEFAULT:
{ {
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_SETCLIENTCERTDEFAULT " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_SETCLIENTCERTDEFAULT "
"BufferIn3: (%08x, %i), BufferOut: (%08x, %i), " "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)", "BufferIn3: (%08x, %i), BufferOut: (%08x, %i), "
"BufferOut2: (%08x, %i), BufferOut3: (%08x, %i)",
BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferIn3, BufferInSize3, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3); BufferOutSize, BufferOut2, BufferOutSize2, BufferOut3, BufferOutSize3);

View File

@ -393,9 +393,10 @@ void WiiSocket::Update(bool read, bool write, bool except)
} }
} }
INFO_LOG(IOS_SSL, "IOCTLV_NET_SSL_DOHANDSHAKE = (%d) " INFO_LOG(IOS_SSL,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "IOCTLV_NET_SSL_DOHANDSHAKE = (%d) "
"BufferOut: (%08x, %i), BufferOut2: (%08x, %i)", "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut: (%08x, %i), BufferOut2: (%08x, %i)",
ret, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferOut, ret, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2); BufferOutSize, BufferOut2, BufferOutSize2);
break; break;
@ -560,9 +561,10 @@ void WiiSocket::Update(bool read, bool write, bool except)
ReturnValue = ReturnValue =
WiiSockMan::GetNetErrorCode(ret, BufferOutSize2 ? "SO_RECVFROM" : "SO_RECV", true); WiiSockMan::GetNetErrorCode(ret, BufferOutSize2 ? "SO_RECVFROM" : "SO_RECV", true);
INFO_LOG(IOS_NET, "%s(%d, %p) Socket: %08X, Flags: %08X, " INFO_LOG(IOS_NET,
"BufferIn: (%08x, %i), BufferIn2: (%08x, %i), " "%s(%d, %p) Socket: %08X, Flags: %08X, "
"BufferOut: (%08x, %i), BufferOut2: (%08x, %i)", "BufferIn: (%08x, %i), BufferIn2: (%08x, %i), "
"BufferOut: (%08x, %i), BufferOut2: (%08x, %i)",
BufferOutSize2 ? "IOCTLV_SO_RECVFROM " : "IOCTLV_SO_RECV ", ReturnValue, data, BufferOutSize2 ? "IOCTLV_SO_RECVFROM " : "IOCTLV_SO_RECV ", ReturnValue, data,
wii_fd, flags, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferOut, wii_fd, flags, BufferIn, BufferInSize, BufferIn2, BufferInSize2, BufferOut,
BufferOutSize, BufferOut2, BufferOutSize2); BufferOutSize, BufferOut2, BufferOutSize2);

View File

@ -561,7 +561,9 @@ std::array<u32, 4> SDIOSlot0::GetCSDv1() const
// Form the csd using the description above // Form the csd using the description above
return {{ return {{
0x007f003, 0x5b5f8000 | (c_size >> 2), 0x3ffc7f80 | (c_size << 30) | (c_size_mult << 15), 0x007f003,
0x5b5f8000 | (c_size >> 2),
0x3ffc7f80 | (c_size << 30) | (c_size_mult << 15),
0x07c04001 | (crc << 1), 0x07c04001 | (crc << 1),
}}; }};
} }
@ -616,7 +618,10 @@ std::array<u32, 4> SDIOSlot0::GetCSDv2() const
// Form the csd using the description above // Form the csd using the description above
return {{ return {{
0x400e005a, 0x5f590000 | (c_size >> 16), 0x00007f80 | (c_size << 16), 0x0a400001 | (crc << 1), 0x400e005a,
0x5f590000 | (c_size >> 16),
0x00007f80 | (c_size << 16),
0x0a400001 | (crc << 1),
}}; }};
} }

View File

@ -30,6 +30,7 @@ public:
virtual void UpdateSyncButtonState(bool is_held) {} virtual void UpdateSyncButtonState(bool is_held) {}
virtual void TriggerSyncButtonPressedEvent() {} virtual void TriggerSyncButtonPressedEvent() {}
virtual void TriggerSyncButtonHeldEvent() {} virtual void TriggerSyncButtonHeldEvent() {}
protected: protected:
static constexpr int ACL_PKT_SIZE = 339; static constexpr int ACL_PKT_SIZE = 339;
static constexpr int ACL_PKT_NUM = 10; static constexpr int ACL_PKT_NUM = 10;

View File

@ -288,8 +288,9 @@ void BluetoothEmu::AddEventToQueue(const SQueuedEvent& _event)
m_EventQueue.size()); m_EventQueue.size());
m_EventQueue.push_back(_event); m_EventQueue.push_back(_event);
const SQueuedEvent& event = m_EventQueue.front(); const SQueuedEvent& event = m_EventQueue.front();
DEBUG_LOG(IOS_WIIMOTE, "HCI event %x " DEBUG_LOG(IOS_WIIMOTE,
"being written from queue (%zu) to %08x...", "HCI event %x "
"being written from queue (%zu) to %08x...",
((hci_event_hdr_t*)event.m_buffer)->event, m_EventQueue.size() - 1, ((hci_event_hdr_t*)event.m_buffer)->event, m_EventQueue.size() - 1,
m_HCIEndpoint->ios_request.address); m_HCIEndpoint->ios_request.address);
m_HCIEndpoint->FillBuffer(event.m_buffer, event.m_size); m_HCIEndpoint->FillBuffer(event.m_buffer, event.m_size);
@ -400,8 +401,9 @@ void BluetoothEmu::ACLPool::WriteToEndpoint(USB::V0BulkMessage& endpoint)
const u16 size = packet.size; const u16 size = packet.size;
const u16 conn_handle = packet.conn_handle; const u16 conn_handle = packet.conn_handle;
DEBUG_LOG(IOS_WIIMOTE, "ACL packet being written from " DEBUG_LOG(IOS_WIIMOTE,
"queue to %08x", "ACL packet being written from "
"queue to %08x",
endpoint.ios_request.address); endpoint.ios_request.address);
hci_acldata_hdr_t* pHeader = (hci_acldata_hdr_t*)Memory::GetPointer(endpoint.data_address); hci_acldata_hdr_t* pHeader = (hci_acldata_hdr_t*)Memory::GetPointer(endpoint.data_address);
@ -1204,7 +1206,8 @@ void BluetoothEmu::CommandAcceptCon(const u8* input)
const hci_accept_con_cp* accept_connection = reinterpret_cast<const hci_accept_con_cp*>(input); const hci_accept_con_cp* accept_connection = reinterpret_cast<const hci_accept_con_cp*>(input);
static char roles[][128] = { static char roles[][128] = {
{"Master (0x00)"}, {"Slave (0x01)"}, {"Master (0x00)"},
{"Slave (0x01)"},
}; };
INFO_LOG(IOS_WIIMOTE, "Command: HCI_CMD_ACCEPT_CON"); INFO_LOG(IOS_WIIMOTE, "Command: HCI_CMD_ACCEPT_CON");

View File

@ -87,6 +87,7 @@ private:
bool IsEmpty() const { return m_queue.empty(); } bool IsEmpty() const { return m_queue.empty(); }
// For SaveStates // For SaveStates
void DoState(PointerWrap& p) { p.Do(m_queue); } void DoState(PointerWrap& p) { p.Do(m_queue); }
private: private:
struct Packet struct Packet
{ {

View File

@ -621,16 +621,16 @@ void WiimoteDevice::SendConfigurationRequest(u16 scid, u16 MTU, u16 FlushTimeOut
SendCommandToACL(L2CAP_CONFIG_REQ, L2CAP_CONFIG_REQ, Offset, Buffer); SendCommandToACL(L2CAP_CONFIG_REQ, L2CAP_CONFIG_REQ, Offset, Buffer);
} }
// //
// //
// //
// //
// --- SDP // --- SDP
// //
// //
// //
// //
// //
#define SDP_UINT8 0x08 #define SDP_UINT8 0x08
#define SDP_UINT16 0x09 #define SDP_UINT16 0x09

View File

@ -34,6 +34,7 @@ public:
void Write16(u32 offset, u16 data) { *(u16*)&m_pBuffer[offset] = Common::swap16(data); } void Write16(u32 offset, u16 data) { *(u16*)&m_pBuffer[offset] = Common::swap16(data); }
void Write32(u32 offset, u32 data) { *(u32*)&m_pBuffer[offset] = Common::swap32(data); } void Write32(u32 offset, u32 data) { *(u32*)&m_pBuffer[offset] = Common::swap32(data); }
u8* GetPointer(u32 offset) { return &m_pBuffer[offset]; } u8* GetPointer(u32 offset) { return &m_pBuffer[offset]; }
private: private:
u8* m_pBuffer; u8* m_pBuffer;
}; };
@ -69,6 +70,7 @@ public:
u16 GetLMPSubVersion() const { return lmp_subversion; } u16 GetLMPSubVersion() const { return lmp_subversion; }
u16 GetManufactorID() const { return 0x000F; } // Broadcom Corporation u16 GetManufactorID() const { return 0x000F; } // Broadcom Corporation
const u8* GetLinkKey() const { return m_LinkKey; } const u8* GetLinkKey() const { return m_LinkKey; }
private: private:
enum ConnectionState enum ConnectionState
{ {

View File

@ -2530,11 +2530,11 @@ static __inline int hci_filter_test(uint8_t bit, const struct hci_filter* filter
return (filter->mask[off] & (1 << ((bit - 1) & 0x1f))); return (filter->mask[off] & (1 << ((bit - 1) & 0x1f)));
} }
/* /*
* HCI socket ioctl's * HCI socket ioctl's
* *
* Apart from GBTINFOA, these are all indexed on the unit name * Apart from GBTINFOA, these are all indexed on the unit name
*/ */
#define SIOCGBTINFO _IOWR('b', 5, struct btreq) /* get unit info */ #define SIOCGBTINFO _IOWR('b', 5, struct btreq) /* get unit info */
#define SIOCGBTINFOA _IOWR('b', 6, struct btreq) /* get info by address */ #define SIOCGBTINFOA _IOWR('b', 6, struct btreq) /* get info by address */

View File

@ -5,70 +5,70 @@
/* $NetBSD: l2cap.h,v 1.9 2009/09/13 18:45:11 pooka Exp $ */ /* $NetBSD: l2cap.h,v 1.9 2009/09/13 18:45:11 pooka Exp $ */
/*- /*-
* Copyright (c) 2005 Iain Hibbert. * Copyright (c) 2005 Iain Hibbert.
* Copyright (c) 2006 Itronix Inc. * Copyright (c) 2006 Itronix Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. The name of Itronix Inc. may not be used to endorse * 3. The name of Itronix Inc. may not be used to endorse
* or promote products derived from this software without specific * or promote products derived from this software without specific
* prior written permission. * prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN * ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
/*- /*-
* Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com> * Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: l2cap.h,v 1.9 2009/09/13 18:45:11 pooka Exp $ * $Id: l2cap.h,v 1.9 2009/09/13 18:45:11 pooka Exp $
* $FreeBSD: src/sys/netgraph/bluetooth/include/l2cap.h,v 1.4 2005/08/31 18:13:23 emax Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/include/l2cap.h,v 1.4 2005/08/31 18:13:23 emax Exp $
*/ */
/* /*
* This file contains everything that application needs to know about * This file contains everything that application needs to know about
* Link Layer Control and Adaptation Protocol (L2CAP). All information * Link Layer Control and Adaptation Protocol (L2CAP). All information
* was obtained from Bluetooth Specification Books (v1.1 and up) * was obtained from Bluetooth Specification Books (v1.1 and up)
* *
* This file can be included by both kernel and userland applications. * This file can be included by both kernel and userland applications.
*/ */
#pragma once #pragma once
@ -81,10 +81,10 @@
**************************************************************************/ **************************************************************************/
/* /*
* Channel IDs are assigned per machine. So the total number of channels that * Channel IDs are assigned per machine. So the total number of channels that
* a machine can have open at the same time is 0xffff - 0x0040 = 0xffbf (65471). * a machine can have open at the same time is 0xffff - 0x0040 = 0xffbf (65471).
* This number does not depend on number of HCI connections. * This number does not depend on number of HCI connections.
*/ */
#define L2CAP_NULL_CID 0x0000 /* DO NOT USE THIS CID */ #define L2CAP_NULL_CID 0x0000 /* DO NOT USE THIS CID */
#define L2CAP_SIGNAL_CID 0x0001 /* signaling channel ID */ #define L2CAP_SIGNAL_CID 0x0001 /* signaling channel ID */
@ -338,9 +338,9 @@ typedef struct
uint16_t type; /* requested information type */ uint16_t type; /* requested information type */
uint16_t result; /* 0x00 - success */ uint16_t result; /* 0x00 - success */
/* uint8_t info[] -- info data (depends on type) /* uint8_t info[] -- info data (depends on type)
* *
* L2CAP_CONNLESS_MTU - 2 bytes connectionless MTU * L2CAP_CONNLESS_MTU - 2 bytes connectionless MTU
*/ */
} l2cap_info_rsp_cp; } l2cap_info_rsp_cp;
typedef union typedef union

View File

@ -36,6 +36,7 @@ public:
~LibusbConfigDescriptor(); ~LibusbConfigDescriptor();
libusb_config_descriptor* Get() const { return m_descriptor; } libusb_config_descriptor* Get() const { return m_descriptor; }
bool IsValid() const { return m_descriptor != nullptr; } bool IsValid() const { return m_descriptor != nullptr; }
private: private:
libusb_config_descriptor* m_descriptor = nullptr; libusb_config_descriptor* m_descriptor = nullptr;
}; };

View File

@ -178,7 +178,7 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request)
case IOCTL_WFSI_PREPARE_PROFILE: case IOCTL_WFSI_PREPARE_PROFILE:
m_base_extract_path = StringFromFormat("/vol/%s/tmp/", m_device_name.c_str()); m_base_extract_path = StringFromFormat("/vol/%s/tmp/", m_device_name.c_str());
// Fall through intended. // Fall through intended.
case IOCTL_WFSI_PREPARE_CONTENT: case IOCTL_WFSI_PREPARE_CONTENT:
{ {

View File

@ -27,7 +27,9 @@
namespace PatchEngine namespace PatchEngine
{ {
const char* PatchTypeStrings[] = { const char* PatchTypeStrings[] = {
"byte", "word", "dword", "byte",
"word",
"dword",
}; };
static std::vector<Patch> onFrame; static std::vector<Patch> onFrame;

View File

@ -93,6 +93,7 @@ public:
void Clear() { m_mem_checks.clear(); } void Clear() { m_mem_checks.clear(); }
bool HasAny() const { return !m_mem_checks.empty(); } bool HasAny() const { return !m_mem_checks.empty(); }
private: private:
TMemChecks m_mem_checks; TMemChecks m_mem_checks;
}; };

View File

@ -31,6 +31,7 @@ public:
JitBaseBlockCache* GetBlockCache() override { return &m_block_cache; } JitBaseBlockCache* GetBlockCache() override { return &m_block_cache; }
const char* GetName() const override { return "Cached Interpreter"; } const char* GetName() const override { return "Cached Interpreter"; }
const CommonAsmRoutinesBase* GetAsmRoutines() override { return nullptr; } const CommonAsmRoutinesBase* GetAsmRoutines() override { return nullptr; }
private: private:
struct Instruction; struct Instruction;

View File

@ -10,7 +10,6 @@
#include <unistd.h> #include <unistd.h>
#ifdef _WIN32 #ifdef _WIN32
#include <iphlpapi.h> #include <iphlpapi.h>
#include <iphlpapi.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#else #else
#include <netinet/in.h> #include <netinet/in.h>

View File

@ -92,8 +92,9 @@ static void Trace(UGeckoInstruction& inst)
} }
std::string ppc_inst = GekkoDisassembler::Disassemble(inst.hex, PC); std::string ppc_inst = GekkoDisassembler::Disassemble(inst.hex, PC);
DEBUG_LOG(POWERPC, "INTER PC: %08x SRR0: %08x SRR1: %08x CRval: %016lx FPSCR: %08x MSR: %08x LR: " DEBUG_LOG(POWERPC,
"%08x %s %08x %s", "INTER PC: %08x SRR0: %08x SRR1: %08x CRval: %016lx FPSCR: %08x MSR: %08x LR: "
"%08x %s %08x %s",
PC, SRR0, SRR1, (unsigned long)PowerPC::ppcState.cr_val[0], PowerPC::ppcState.fpscr, PC, SRR0, SRR1, (unsigned long)PowerPC::ppcState.cr_val[0], PowerPC::ppcState.fpscr,
PowerPC::ppcState.msr, PowerPC::ppcState.spr[8], regs.c_str(), inst.hex, PowerPC::ppcState.msr, PowerPC::ppcState.spr[8], regs.c_str(), inst.hex,
ppc_inst.c_str()); ppc_inst.c_str());

View File

@ -2,12 +2,12 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/Interpreter/Interpreter.h"
#include "Common/Assert.h" #include "Common/Assert.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/CoreTiming.h" #include "Core/CoreTiming.h"
#include "Core/HLE/HLE.h" #include "Core/HLE/HLE.h"
#include "Core/PowerPC/Interpreter/Interpreter.h"
#include "Core/PowerPC/PowerPC.h" #include "Core/PowerPC/PowerPC.h"
void Interpreter::bx(UGeckoInstruction inst) void Interpreter::bx(UGeckoInstruction inst)

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/Jit64/Jit.h"
#include "Core/PowerPC/Gekko.h" #include "Core/PowerPC/Gekko.h"
#include "Core/PowerPC/Jit64/Jit.h"
static Jit64::Instruction dynaOpTable[64]; static Jit64::Instruction dynaOpTable[64];
static Jit64::Instruction dynaOpTable4[1024]; static Jit64::Instruction dynaOpTable4[1024];

View File

@ -2,12 +2,12 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/Jit64/Jit.h"
#include "Common/Assert.h" #include "Common/Assert.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/x64Emitter.h" #include "Common/x64Emitter.h"
#include "Core/CoreTiming.h" #include "Core/CoreTiming.h"
#include "Core/PowerPC/Gekko.h" #include "Core/PowerPC/Gekko.h"
#include "Core/PowerPC/Jit64/Jit.h"
#include "Core/PowerPC/Jit64/JitRegCache.h" #include "Core/PowerPC/Jit64/JitRegCache.h"
#include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h" #include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h"
#include "Core/PowerPC/PPCAnalyst.h" #include "Core/PowerPC/PPCAnalyst.h"

View File

@ -2,10 +2,10 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/Jit64/Jit.h"
#include "Common/BitSet.h" #include "Common/BitSet.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/x64Emitter.h" #include "Common/x64Emitter.h"
#include "Core/PowerPC/Jit64/Jit.h"
#include "Core/PowerPC/Jit64/JitRegCache.h" #include "Core/PowerPC/Jit64/JitRegCache.h"
#include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h" #include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h"

View File

@ -2,11 +2,11 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/Jit64/Jit.h"
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
#include "Common/x64Emitter.h" #include "Common/x64Emitter.h"
#include "Core/PowerPC/Jit64/Jit.h"
#include "Core/PowerPC/Jit64/JitRegCache.h" #include "Core/PowerPC/Jit64/JitRegCache.h"
using namespace Gen; using namespace Gen;

View File

@ -2,13 +2,13 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/Jit64/Jit.h"
#include "Common/BitSet.h" #include "Common/BitSet.h"
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/x64Emitter.h" #include "Common/x64Emitter.h"
#include "Core/CoreTiming.h" #include "Core/CoreTiming.h"
#include "Core/HW/ProcessorInterface.h" #include "Core/HW/ProcessorInterface.h"
#include "Core/PowerPC/Jit64/Jit.h"
#include "Core/PowerPC/Jit64/JitRegCache.h" #include "Core/PowerPC/Jit64/JitRegCache.h"
#include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h" #include "Core/PowerPC/Jit64Common/Jit64PowerPCState.h"
#include "Core/PowerPC/PowerPC.h" #include "Core/PowerPC/PowerPC.h"

View File

@ -1059,8 +1059,9 @@ void EmuCodeBlock::SetFPRF(Gen::X64Reg xmm)
FixupBranch zeroExponent = J_CC(CC_Z); FixupBranch zeroExponent = J_CC(CC_Z);
// Nice normalized number: sign ? PPC_FPCLASS_NN : PPC_FPCLASS_PN; // Nice normalized number: sign ? PPC_FPCLASS_NN : PPC_FPCLASS_PN;
LEA(32, RSCRATCH, MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NN - MathUtil::PPC_FPCLASS_PN, LEA(32, RSCRATCH,
MathUtil::PPC_FPCLASS_PN)); MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NN - MathUtil::PPC_FPCLASS_PN,
MathUtil::PPC_FPCLASS_PN));
continue1 = J(); continue1 = J();
SetJumpTarget(maxExponent); SetJumpTarget(maxExponent);
@ -1073,8 +1074,9 @@ void EmuCodeBlock::SetFPRF(Gen::X64Reg xmm)
// Max exponent + no mantissa: sign ? PPC_FPCLASS_NINF : PPC_FPCLASS_PINF; // Max exponent + no mantissa: sign ? PPC_FPCLASS_NINF : PPC_FPCLASS_PINF;
SetJumpTarget(notNAN); SetJumpTarget(notNAN);
LEA(32, RSCRATCH, MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NINF - MathUtil::PPC_FPCLASS_PINF, LEA(32, RSCRATCH,
MathUtil::PPC_FPCLASS_PINF)); MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NINF - MathUtil::PPC_FPCLASS_PINF,
MathUtil::PPC_FPCLASS_PINF));
continue3 = J(); continue3 = J();
SetJumpTarget(zeroExponent); SetJumpTarget(zeroExponent);
@ -1082,8 +1084,9 @@ void EmuCodeBlock::SetFPRF(Gen::X64Reg xmm)
FixupBranch zero = J_CC(CC_Z); FixupBranch zero = J_CC(CC_Z);
// No exponent + mantissa: sign ? PPC_FPCLASS_ND : PPC_FPCLASS_PD; // No exponent + mantissa: sign ? PPC_FPCLASS_ND : PPC_FPCLASS_PD;
LEA(32, RSCRATCH, MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_ND - MathUtil::PPC_FPCLASS_PD, LEA(32, RSCRATCH,
MathUtil::PPC_FPCLASS_PD)); MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_ND - MathUtil::PPC_FPCLASS_PD,
MathUtil::PPC_FPCLASS_PD));
continue4 = J(); continue4 = J();
// Zero: sign ? PPC_FPCLASS_NZ : PPC_FPCLASS_PZ; // Zero: sign ? PPC_FPCLASS_NZ : PPC_FPCLASS_PZ;
@ -1103,8 +1106,9 @@ void EmuCodeBlock::SetFPRF(Gen::X64Reg xmm)
FixupBranch infinity = J_CC(CC_E); FixupBranch infinity = J_CC(CC_E);
MOVQ_xmm(R(RSCRATCH), xmm); MOVQ_xmm(R(RSCRATCH), xmm);
SHR(64, R(RSCRATCH), Imm8(63)); SHR(64, R(RSCRATCH), Imm8(63));
LEA(32, RSCRATCH, MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NN - MathUtil::PPC_FPCLASS_PN, LEA(32, RSCRATCH,
MathUtil::PPC_FPCLASS_PN)); MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NN - MathUtil::PPC_FPCLASS_PN,
MathUtil::PPC_FPCLASS_PN));
continue1 = J(); continue1 = J();
SetJumpTarget(nan); SetJumpTarget(nan);
MOVQ_xmm(R(RSCRATCH), xmm); MOVQ_xmm(R(RSCRATCH), xmm);
@ -1114,15 +1118,17 @@ void EmuCodeBlock::SetFPRF(Gen::X64Reg xmm)
SetJumpTarget(infinity); SetJumpTarget(infinity);
MOVQ_xmm(R(RSCRATCH), xmm); MOVQ_xmm(R(RSCRATCH), xmm);
SHR(64, R(RSCRATCH), Imm8(63)); SHR(64, R(RSCRATCH), Imm8(63));
LEA(32, RSCRATCH, MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NINF - MathUtil::PPC_FPCLASS_PINF, LEA(32, RSCRATCH,
MathUtil::PPC_FPCLASS_PINF)); MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_NINF - MathUtil::PPC_FPCLASS_PINF,
MathUtil::PPC_FPCLASS_PINF));
continue3 = J(); continue3 = J();
SetJumpTarget(zeroExponent); SetJumpTarget(zeroExponent);
TEST(64, R(RSCRATCH), R(RSCRATCH)); TEST(64, R(RSCRATCH), R(RSCRATCH));
FixupBranch zero = J_CC(CC_Z); FixupBranch zero = J_CC(CC_Z);
SHR(64, R(RSCRATCH), Imm8(63)); SHR(64, R(RSCRATCH), Imm8(63));
LEA(32, RSCRATCH, MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_ND - MathUtil::PPC_FPCLASS_PD, LEA(32, RSCRATCH,
MathUtil::PPC_FPCLASS_PD)); MScaled(RSCRATCH, MathUtil::PPC_FPCLASS_ND - MathUtil::PPC_FPCLASS_PD,
MathUtil::PPC_FPCLASS_PD));
continue4 = J(); continue4 = J();
SetJumpTarget(zero); SetJumpTarget(zero);
SHR(64, R(RSCRATCH), Imm8(63)); SHR(64, R(RSCRATCH), Imm8(63));

View File

@ -108,7 +108,17 @@ void Arm64GPRCache::Start(PPCAnalyst::BlockRegStats& stats)
bool Arm64GPRCache::IsCalleeSaved(ARM64Reg reg) bool Arm64GPRCache::IsCalleeSaved(ARM64Reg reg)
{ {
static constexpr std::array<ARM64Reg, 11> callee_regs{{ static constexpr std::array<ARM64Reg, 11> callee_regs{{
X28, X27, X26, X25, X24, X23, X22, X21, X20, X19, INVALID_REG, X28,
X27,
X26,
X25,
X24,
X23,
X22,
X21,
X20,
X19,
INVALID_REG,
}}; }};
return std::find(callee_regs.begin(), callee_regs.end(), EncodeRegTo64(reg)) != callee_regs.end(); return std::find(callee_regs.begin(), callee_regs.end(), EncodeRegTo64(reg)) != callee_regs.end();
@ -317,10 +327,37 @@ void Arm64GPRCache::GetAllocationOrder()
// Callee saved registers first in hopes that we will keep everything stored there first // Callee saved registers first in hopes that we will keep everything stored there first
static constexpr std::array<ARM64Reg, 29> allocation_order{{ static constexpr std::array<ARM64Reg, 29> allocation_order{{
// Callee saved // Callee saved
W27, W26, W25, W24, W23, W22, W21, W20, W19, W27,
W26,
W25,
W24,
W23,
W22,
W21,
W20,
W19,
// Caller saved // Caller saved
W18, W17, W16, W15, W14, W13, W12, W11, W10, W9, W8, W7, W6, W5, W4, W3, W2, W1, W0, W30, W18,
W17,
W16,
W15,
W14,
W13,
W12,
W11,
W10,
W9,
W8,
W7,
W6,
W5,
W4,
W3,
W2,
W1,
W0,
W30,
}}; }};
for (ARM64Reg reg : allocation_order) for (ARM64Reg reg : allocation_order)
@ -545,11 +582,40 @@ void Arm64FPRCache::GetAllocationOrder()
{ {
static constexpr std::array<ARM64Reg, 32> allocation_order{{ static constexpr std::array<ARM64Reg, 32> allocation_order{{
// Callee saved // Callee saved
Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15, Q8,
Q9,
Q10,
Q11,
Q12,
Q13,
Q14,
Q15,
// Caller saved // Caller saved
Q16, Q17, Q18, Q19, Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q30, Q31, Q7, Q6, Q5, Q16,
Q4, Q3, Q2, Q1, Q0, Q17,
Q18,
Q19,
Q20,
Q21,
Q22,
Q23,
Q24,
Q25,
Q26,
Q27,
Q28,
Q29,
Q30,
Q31,
Q7,
Q6,
Q5,
Q4,
Q3,
Q2,
Q1,
Q0,
}}; }};
for (ARM64Reg reg : allocation_order) for (ARM64Reg reg : allocation_order)
@ -574,7 +640,15 @@ void Arm64FPRCache::FlushByHost(ARM64Reg host_reg)
bool Arm64FPRCache::IsCalleeSaved(ARM64Reg reg) bool Arm64FPRCache::IsCalleeSaved(ARM64Reg reg)
{ {
static constexpr std::array<ARM64Reg, 9> callee_regs{{ static constexpr std::array<ARM64Reg, 9> callee_regs{{
Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15, INVALID_REG, Q8,
Q9,
Q10,
Q11,
Q12,
Q13,
Q14,
Q15,
INVALID_REG,
}}; }};
return std::find(callee_regs.begin(), callee_regs.end(), reg) != callee_regs.end(); return std::find(callee_regs.begin(), callee_regs.end(), reg) != callee_regs.end();

View File

@ -85,6 +85,7 @@ public:
void IncrementLastUsed() { ++m_last_used; } void IncrementLastUsed() { ++m_last_used; }
void SetDirty(bool dirty) { m_dirty = dirty; } void SetDirty(bool dirty) { m_dirty = dirty; }
bool IsDirty() const { return m_dirty; } bool IsDirty() const { return m_dirty; }
private: private:
// For REG_REG // For REG_REG
RegType m_type; // store type RegType m_type; // store type
@ -108,6 +109,7 @@ public:
void Unlock() { m_locked = false; } void Unlock() { m_locked = false; }
Arm64Gen::ARM64Reg GetReg() const { return m_reg; } Arm64Gen::ARM64Reg GetReg() const { return m_reg; }
bool operator==(const Arm64Gen::ARM64Reg& reg) { return reg == m_reg; } bool operator==(const Arm64Gen::ARM64Reg& reg) { return reg == m_reg; }
private: private:
Arm64Gen::ARM64Reg m_reg; Arm64Gen::ARM64Reg m_reg;
bool m_locked; bool m_locked;
@ -231,6 +233,7 @@ public:
void StoreRegisters(BitSet32 regs) { FlushRegisters(regs, false); } void StoreRegisters(BitSet32 regs) { FlushRegisters(regs, false); }
void StoreCRRegisters(BitSet32 regs) { FlushCRRegisters(regs, false); } void StoreCRRegisters(BitSet32 regs) { FlushCRRegisters(regs, false); }
protected: protected:
// Get the order of the host registers // Get the order of the host registers
void GetAllocationOrder() override; void GetAllocationOrder() override;
@ -284,6 +287,7 @@ public:
void FixSinglePrecision(size_t preg); void FixSinglePrecision(size_t preg);
void StoreRegisters(BitSet32 regs) { FlushRegisters(regs, false); } void StoreRegisters(BitSet32 regs) { FlushRegisters(regs, false); }
protected: protected:
// Get the order of the host registers // Get the order of the host registers
void GetAllocationOrder() override; void GetAllocationOrder() override;

View File

@ -2,7 +2,6 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Core/PowerPC/JitArm64/Jit.h"
#include "Common/Arm64Emitter.h" #include "Common/Arm64Emitter.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/JitRegister.h" #include "Common/JitRegister.h"
@ -10,6 +9,7 @@
#include "Core/CoreTiming.h" #include "Core/CoreTiming.h"
#include "Core/HW/CPU.h" #include "Core/HW/CPU.h"
#include "Core/HW/Memmap.h" #include "Core/HW/Memmap.h"
#include "Core/PowerPC/JitArm64/Jit.h"
#include "Core/PowerPC/JitCommon/JitAsmCommon.h" #include "Core/PowerPC/JitCommon/JitAsmCommon.h"
#include "Core/PowerPC/JitCommon/JitCache.h" #include "Core/PowerPC/JitCommon/JitCache.h"
#include "Core/PowerPC/PowerPC.h" #include "Core/PowerPC/PowerPC.h"

Some files were not shown because too many files have changed in this diff Show More