mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-07-04 01:22:07 -05:00
Remove unused headers
This commit is contained in:
parent
f96a7682d4
commit
ec0c4b72ff
|
|
@ -132,7 +132,6 @@ add_library(common
|
|||
ScopeGuard.h
|
||||
SDCardUtil.cpp
|
||||
SDCardUtil.h
|
||||
Semaphore.h
|
||||
SettingsHandler.cpp
|
||||
SettingsHandler.h
|
||||
SFMLHelper.cpp
|
||||
|
|
@ -142,7 +141,6 @@ add_library(common
|
|||
SocketContext.h
|
||||
SpanUtils.h
|
||||
SPSCQueue.h
|
||||
StringLiteral.h
|
||||
StringUtil.cpp
|
||||
StringUtil.h
|
||||
SymbolDB.cpp
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
// Copyright 2016 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class Semaphore
|
||||
{
|
||||
public:
|
||||
Semaphore(int initial_count, int maximum_count)
|
||||
{
|
||||
m_handle = CreateSemaphoreA(nullptr, initial_count, maximum_count, nullptr);
|
||||
}
|
||||
|
||||
~Semaphore() { CloseHandle(m_handle); }
|
||||
void Wait() { WaitForSingleObject(m_handle, INFINITE); }
|
||||
void Post() { ReleaseSemaphore(m_handle, 1, nullptr); }
|
||||
|
||||
private:
|
||||
HANDLE m_handle;
|
||||
};
|
||||
} // namespace Common
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
#include <dispatch/dispatch.h>
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class Semaphore
|
||||
{
|
||||
public:
|
||||
Semaphore(int initial_count, int maximum_count)
|
||||
{
|
||||
m_handle = dispatch_semaphore_create(0);
|
||||
for (int i = 0; i < initial_count; i++)
|
||||
dispatch_semaphore_signal(m_handle);
|
||||
}
|
||||
~Semaphore() { dispatch_release(m_handle); }
|
||||
void Wait() { dispatch_semaphore_wait(m_handle, DISPATCH_TIME_FOREVER); }
|
||||
void Post() { dispatch_semaphore_signal(m_handle); }
|
||||
|
||||
private:
|
||||
dispatch_semaphore_t m_handle;
|
||||
};
|
||||
} // namespace Common
|
||||
|
||||
#else
|
||||
|
||||
#include <semaphore.h>
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class Semaphore
|
||||
{
|
||||
public:
|
||||
Semaphore(int initial_count, int maximum_count) { sem_init(&m_handle, 0, initial_count); }
|
||||
~Semaphore() { sem_destroy(&m_handle); }
|
||||
void Wait() { sem_wait(&m_handle); }
|
||||
void Post() { sem_post(&m_handle); }
|
||||
|
||||
private:
|
||||
sem_t m_handle;
|
||||
};
|
||||
} // namespace Common
|
||||
|
||||
#endif // _WIN32
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2023 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace Common
|
||||
{
|
||||
// A useful template for passing string literals as arguments to templates
|
||||
// from: https://ctrpeach.io/posts/cpp20-string-literal-template-parameters/
|
||||
template <size_t N>
|
||||
struct StringLiteral
|
||||
{
|
||||
consteval StringLiteral(const char (&str)[N]) { std::copy_n(str, N, value); }
|
||||
|
||||
char value[N];
|
||||
};
|
||||
|
||||
} // namespace Common
|
||||
|
|
@ -71,7 +71,6 @@ add_library(core
|
|||
Debugger/Debugger_SymbolMap.h
|
||||
Debugger/Dump.cpp
|
||||
Debugger/Dump.h
|
||||
Debugger/GCELF.h
|
||||
Debugger/OSThread.cpp
|
||||
Debugger/OSThread.h
|
||||
Debugger/PPCDebugInterface.cpp
|
||||
|
|
|
|||
|
|
@ -1,110 +0,0 @@
|
|||
// Copyright 2008 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
// ELF File Types
|
||||
#define ET_NONE 0 // No file type
|
||||
#define ET_REL 1 // Relocatable file
|
||||
#define ET_EXEC 2 // Executable file
|
||||
#define ET_DYN 3 // Shared object file
|
||||
#define ET_CORE 4 // Core file
|
||||
#define ET_LOPROC 0xFF00 // Processor specific
|
||||
#define ET_HIPROC 0xFFFF // Processor specific
|
||||
|
||||
// ELF Machine Types
|
||||
#define EM_NONE 0 // No machine
|
||||
#define EM_M32 1 // AT&T WE 32100
|
||||
#define EM_SPARC 2 // SPARC
|
||||
#define EM_386 3 // Intel Architecture
|
||||
#define EM_68K 4 // Motorola 68000
|
||||
#define EM_88K 5 // Motorola 88000
|
||||
#define EM_860 6 // Intel 80860
|
||||
#define EM_MIPS 7 // MIPS RS3000 Big-Endian
|
||||
#define EM_MIPS_RS4_BE 8 // MIPS RS4000 Big-Endian
|
||||
#define EM_ARM 40 // ARM/Thumb Architecture
|
||||
|
||||
// ELF Version Types
|
||||
#define EV_NONE 0 // Invalid version
|
||||
#define EV_CURRENT 1 // Current version
|
||||
|
||||
// ELF Section Header Types
|
||||
#define SHT_NULL 0
|
||||
#define SHT_PROGBITS 1
|
||||
#define SHT_SYMTAB 2
|
||||
#define SHT_STRTAB 3
|
||||
#define SHT_RELA 4
|
||||
#define SHT_HASH 5
|
||||
#define SHT_DYNAMIC 6
|
||||
#define SHT_NOTE 7
|
||||
#define SHT_NOBITS 8
|
||||
#define SHT_REL 9
|
||||
#define SHT_SHLIB 10
|
||||
#define SHT_DYNSYM 11
|
||||
|
||||
struct ELF_Header
|
||||
{
|
||||
unsigned char ID[4];
|
||||
unsigned char clazz;
|
||||
unsigned char data;
|
||||
unsigned char version;
|
||||
unsigned char pad[9];
|
||||
unsigned short e_type; // ELF file type
|
||||
unsigned short e_machine; // ELF target machine
|
||||
unsigned int e_version; // ELF file version number
|
||||
unsigned int e_entry;
|
||||
unsigned int e_phoff;
|
||||
unsigned int e_shoff;
|
||||
unsigned int e_flags;
|
||||
unsigned short e_ehsize;
|
||||
unsigned short e_phentsize;
|
||||
unsigned short e_phnum;
|
||||
unsigned short e_shentsize;
|
||||
unsigned short e_shnum;
|
||||
unsigned short e_shtrndx;
|
||||
};
|
||||
|
||||
struct Program_Header
|
||||
{
|
||||
unsigned int type;
|
||||
unsigned int offset;
|
||||
unsigned int vaddr;
|
||||
unsigned int paddr;
|
||||
unsigned int filesz;
|
||||
unsigned int memsz;
|
||||
unsigned int flags;
|
||||
unsigned int align;
|
||||
};
|
||||
|
||||
struct Section_Header
|
||||
{
|
||||
unsigned int name;
|
||||
unsigned int type;
|
||||
unsigned int flags;
|
||||
unsigned int addr;
|
||||
unsigned int offset;
|
||||
unsigned int size;
|
||||
unsigned int link;
|
||||
unsigned int info;
|
||||
unsigned int addralign;
|
||||
unsigned int entsize;
|
||||
};
|
||||
|
||||
struct Symbol_Header
|
||||
{
|
||||
unsigned int name;
|
||||
unsigned int value;
|
||||
unsigned int size;
|
||||
unsigned char info;
|
||||
unsigned char other;
|
||||
unsigned short shndx;
|
||||
};
|
||||
|
||||
struct Rela_Header
|
||||
{
|
||||
unsigned int offset;
|
||||
unsigned int info;
|
||||
signed int addend;
|
||||
};
|
||||
|
||||
const char ELFID[4] = {0x7F, 'E', 'L', 'F'};
|
||||
|
|
@ -159,14 +159,12 @@
|
|||
<ClInclude Include="Common\scmrev.h" />
|
||||
<ClInclude Include="Common\ScopeGuard.h" />
|
||||
<ClInclude Include="Common\SDCardUtil.h" />
|
||||
<ClInclude Include="Common\Semaphore.h" />
|
||||
<ClInclude Include="Common\SettingsHandler.h" />
|
||||
<ClInclude Include="Common\SFMLHelper.h" />
|
||||
<ClInclude Include="Common\SmallVector.h" />
|
||||
<ClInclude Include="Common\SocketContext.h" />
|
||||
<ClInclude Include="Common\SpanUtils.h" />
|
||||
<ClInclude Include="Common\SPSCQueue.h" />
|
||||
<ClInclude Include="Common\StringLiteral.h" />
|
||||
<ClInclude Include="Common\StringUtil.h" />
|
||||
<ClInclude Include="Common\Swap.h" />
|
||||
<ClInclude Include="Common\SymbolDB.h" />
|
||||
|
|
@ -222,7 +220,6 @@
|
|||
<ClInclude Include="Core\Debugger\DebugInterface.h" />
|
||||
<ClInclude Include="Core\Debugger\Debugger_SymbolMap.h" />
|
||||
<ClInclude Include="Core\Debugger\Dump.h" />
|
||||
<ClInclude Include="Core\Debugger\GCELF.h" />
|
||||
<ClInclude Include="Core\Debugger\OSThread.h" />
|
||||
<ClInclude Include="Core\Debugger\PPCDebugInterface.h" />
|
||||
<ClInclude Include="Core\Debugger\RSO.h" />
|
||||
|
|
@ -633,7 +630,6 @@
|
|||
<ClInclude Include="VideoBackends\Null\PerfQuery.h" />
|
||||
<ClInclude Include="VideoBackends\Null\TextureCache.h" />
|
||||
<ClInclude Include="VideoBackends\Null\VideoBackend.h" />
|
||||
<ClInclude Include="VideoBackends\OGL\GPUTimer.h" />
|
||||
<ClInclude Include="VideoBackends\OGL\OGLBoundingBox.h" />
|
||||
<ClInclude Include="VideoBackends\OGL\OGLConfig.h" />
|
||||
<ClInclude Include="VideoBackends\OGL\OGLGfx.h" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
add_library(videoogl
|
||||
GPUTimer.h
|
||||
OGLBoundingBox.cpp
|
||||
OGLBoundingBox.h
|
||||
OGLConfig.cpp
|
||||
|
|
|
|||
|
|
@ -1,104 +0,0 @@
|
|||
// Copyright 2016 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/GL/GLExtensions/GLExtensions.h"
|
||||
|
||||
#ifndef GL_TIME_ELAPSED
|
||||
#define GL_TIME_ELAPSED 0x88BF
|
||||
#endif
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
/*
|
||||
* This class can be used to measure the time it takes for the GPU to perform a draw call
|
||||
* or compute dispatch. To use:
|
||||
*
|
||||
* - Create an instance of GPUTimer before issuing the draw call.
|
||||
* (this can be before or after any binding that needs to be done)
|
||||
*
|
||||
* - (optionally) call Begin(). This is not needed for a single draw call.
|
||||
*
|
||||
* - Issue the draw call or compute dispatch as normal.
|
||||
*
|
||||
* - (optionally) call End(). This is not necessary for a single draw call.
|
||||
*
|
||||
* - Call GetTime{Seconds,Milliseconds,Nanoseconds} to determine how long the operation
|
||||
* took to execute on the GPU.
|
||||
*
|
||||
* NOTE: When the timer is read back, this will force a GL flush, so the more often a timer is used,
|
||||
* the larger of a performance impact it will have. Only one timer can be active at any time, due to
|
||||
* using GL_TIME_ELAPSED. This is not enforced by the class, however.
|
||||
*
|
||||
*/
|
||||
class GPUTimer final
|
||||
{
|
||||
public:
|
||||
GPUTimer()
|
||||
{
|
||||
glGenQueries(1, &m_query_id);
|
||||
Begin();
|
||||
}
|
||||
|
||||
~GPUTimer()
|
||||
{
|
||||
End();
|
||||
glDeleteQueries(1, &m_query_id);
|
||||
}
|
||||
|
||||
void Begin()
|
||||
{
|
||||
if (m_started)
|
||||
glEndQuery(GL_TIME_ELAPSED);
|
||||
|
||||
glBeginQuery(GL_TIME_ELAPSED, m_query_id);
|
||||
m_started = true;
|
||||
}
|
||||
|
||||
void End()
|
||||
{
|
||||
if (!m_started)
|
||||
return;
|
||||
|
||||
glEndQuery(GL_TIME_ELAPSED);
|
||||
m_started = false;
|
||||
}
|
||||
|
||||
double GetTimeSeconds()
|
||||
{
|
||||
GetResult();
|
||||
return static_cast<double>(m_result) / 1000000000.0;
|
||||
}
|
||||
|
||||
double GetTimeMilliseconds()
|
||||
{
|
||||
GetResult();
|
||||
return static_cast<double>(m_result) / 1000000.0;
|
||||
}
|
||||
|
||||
u32 GetTimeNanoseconds()
|
||||
{
|
||||
GetResult();
|
||||
return m_result;
|
||||
}
|
||||
|
||||
private:
|
||||
void GetResult()
|
||||
{
|
||||
if (m_has_result)
|
||||
return;
|
||||
|
||||
if (m_started)
|
||||
End();
|
||||
|
||||
glGetQueryObjectuiv(m_query_id, GL_QUERY_RESULT, &m_result);
|
||||
m_has_result = true;
|
||||
}
|
||||
|
||||
GLuint m_query_id;
|
||||
GLuint m_result = 0;
|
||||
bool m_started = false;
|
||||
bool m_has_result = false;
|
||||
};
|
||||
} // namespace OGL
|
||||
Loading…
Reference in New Issue
Block a user