diff --git a/3rdparty/xbyak/xbyak.h b/3rdparty/xbyak/xbyak/xbyak.h similarity index 100% rename from 3rdparty/xbyak/xbyak.h rename to 3rdparty/xbyak/xbyak/xbyak.h diff --git a/3rdparty/xbyak/xbyak_mnemonic.h b/3rdparty/xbyak/xbyak/xbyak_mnemonic.h similarity index 100% rename from 3rdparty/xbyak/xbyak_mnemonic.h rename to 3rdparty/xbyak/xbyak/xbyak_mnemonic.h diff --git a/3rdparty/xbyak/xbyak_util.h b/3rdparty/xbyak/xbyak/xbyak_util.h similarity index 100% rename from 3rdparty/xbyak/xbyak_util.h rename to 3rdparty/xbyak/xbyak/xbyak_util.h diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 8f8b2090c3..e819139f04 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -241,7 +241,7 @@ option(USE_PGO_OPTIMIZE "Enable PGO optimization (use profile)") # Note1: Builtin strcmp/memcmp was proved to be slower on Mesa than stdlib version. # Note2: float operation SSE is impacted by the PCSX2 SSE configuration. In particular, flush to zero denormal. -set(COMMON_FLAG "-pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp -mfpmath=sse") +set(COMMON_FLAG "-pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp -mfpmath=sse -fno-operator-names") if(USE_VTUNE) set(COMMON_FLAG "${COMMON_FLAG} -DENABLE_VTUNE") diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index ca17e69b19..8f28a4dbc6 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -576,6 +576,7 @@ set(pcsx2PADHeaders ${PADImgHeader}/arrow_right.h ) +include_directories ("${CMAKE_SOURCE_DIR}/3rdparty/xbyak/") # GS sources set(pcsx2GSSources @@ -598,7 +599,6 @@ set(pcsx2GSSources GS/GSVector.cpp GS/GSdx.cpp GS/GS_res.cpp - GS/stdafx.cpp GS/Renderers/Common/GSDevice.cpp GS/Renderers/Common/GSDirtyRect.cpp GS/Renderers/Common/GSFunctionMap.cpp @@ -673,7 +673,6 @@ set(pcsx2GSHeaders GS/GSVector4i.h GS/GSVector8.h GS/GSVector8i.h - GS/stdafx.h GS/Renderers/Common/GSDevice.h GS/Renderers/Common/GSDirtyRect.h GS/Renderers/Common/GSFastList.h diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index 13b7b68d90..06d9959840 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -19,8 +19,8 @@ * */ -#include "stdafx.h" -#include "GSdx.h" +#include "PrecompiledHeader.h" +#include "GS.h" #include "GSUtil.h" #include "Renderers/SW/GSRendererSW.h" #include "Renderers/Null/GSRendererNull.h" @@ -41,7 +41,7 @@ static HRESULT s_hr = E_FAIL; #else -#include "Window/GSWndEGL.h" +#include "GS/Window/GSWndEGL.h" #ifdef __APPLE__ #include @@ -1554,3 +1554,207 @@ void GSReplay(char* lpszCmdLine, int renderer) GSshutdown(); } #endif + +std::string format(const char* fmt, ...) +{ + va_list args; + + va_start(args, fmt); + int size = vsnprintf(nullptr, 0, fmt, args) + 1; + va_end(args); + + assert(size > 0); + std::vector buffer(std::max(1, size)); + + va_start(args, fmt); + vsnprintf(buffer.data(), size, fmt, args); + va_end(args); + + return {buffer.data()}; +} + +// Helper path to dump texture +#ifdef _WIN32 +const std::string root_sw("c:\\temp1\\_"); +const std::string root_hw("c:\\temp2\\_"); +#else +#ifdef _M_AMD64 +const std::string root_sw("/tmp/GS_SW_dump64/"); +const std::string root_hw("/tmp/GS_HW_dump64/"); +#else +const std::string root_sw("/tmp/GS_SW_dump32/"); +const std::string root_hw("/tmp/GS_HW_dump32/"); +#endif +#endif + +#ifdef _WIN32 + +void* vmalloc(size_t size, bool code) +{ + return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, code ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE); +} + +void vmfree(void* ptr, size_t size) +{ + VirtualFree(ptr, 0, MEM_RELEASE); +} + +static HANDLE s_fh = NULL; +static uint8* s_Next[8]; + +void* fifo_alloc(size_t size, size_t repeat) +{ + ASSERT(s_fh == NULL); + + if (repeat >= countof(s_Next)) + { + fprintf(stderr, "Memory mapping overflow (%zu >= %u)\n", repeat, countof(s_Next)); + return vmalloc(size * repeat, false); // Fallback to default vmalloc + } + + s_fh = CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, 0, size, nullptr); + DWORD errorID = ::GetLastError(); + if (s_fh == NULL) + { + fprintf(stderr, "Failed to reserve memory. WIN API ERROR:%u\n", errorID); + return vmalloc(size * repeat, false); // Fallback to default vmalloc + } + + int mmap_segment_failed = 0; + void* fifo = MapViewOfFile(s_fh, FILE_MAP_ALL_ACCESS, 0, 0, size); + for (size_t i = 1; i < repeat; i++) + { + void* base = (uint8*)fifo + size * i; + s_Next[i] = (uint8*)MapViewOfFileEx(s_fh, FILE_MAP_ALL_ACCESS, 0, 0, size, base); + errorID = ::GetLastError(); + if (s_Next[i] != base) + { + mmap_segment_failed++; + if (mmap_segment_failed > 4) + { + fprintf(stderr, "Memory mapping failed after %d attempts, aborting. WIN API ERROR:%u\n", mmap_segment_failed, errorID); + fifo_free(fifo, size, repeat); + return vmalloc(size * repeat, false); // Fallback to default vmalloc + } + do + { + UnmapViewOfFile(s_Next[i]); + s_Next[i] = 0; + } while (--i > 0); + + fifo = MapViewOfFile(s_fh, FILE_MAP_ALL_ACCESS, 0, 0, size); + } + } + + return fifo; +} + +void fifo_free(void* ptr, size_t size, size_t repeat) +{ + ASSERT(s_fh != NULL); + + if (s_fh == NULL) + { + if (ptr != NULL) + vmfree(ptr, size); + return; + } + + UnmapViewOfFile(ptr); + + for (size_t i = 1; i < countof(s_Next); i++) + { + if (s_Next[i] != 0) + { + UnmapViewOfFile(s_Next[i]); + s_Next[i] = 0; + } + } + + CloseHandle(s_fh); + s_fh = NULL; +} + +#else + +#include +#include + +void* vmalloc(size_t size, bool code) +{ + size_t mask = getpagesize() - 1; + + size = (size + mask) & ~mask; + + int prot = PROT_READ | PROT_WRITE; + int flags = MAP_PRIVATE | MAP_ANONYMOUS; + + if (code) + { + prot |= PROT_EXEC; +#if defined(_M_AMD64) && !defined(__APPLE__) + // macOS doesn't allow any mappings in the first 4GB of address space + flags |= MAP_32BIT; +#endif + } + + return mmap(NULL, size, prot, flags, -1, 0); +} + +void vmfree(void* ptr, size_t size) +{ + size_t mask = getpagesize() - 1; + + size = (size + mask) & ~mask; + + munmap(ptr, size); +} + +static int s_shm_fd = -1; + +void* fifo_alloc(size_t size, size_t repeat) +{ + ASSERT(s_shm_fd == -1); + + const char* file_name = "/GSDX.mem"; + s_shm_fd = shm_open(file_name, O_RDWR | O_CREAT | O_EXCL, 0600); + if (s_shm_fd != -1) + { + shm_unlink(file_name); // file is deleted but descriptor is still open + } + else + { + fprintf(stderr, "Failed to open %s due to %s\n", file_name, strerror(errno)); + return nullptr; + } + + if (ftruncate(s_shm_fd, repeat * size) < 0) + fprintf(stderr, "Failed to reserve memory due to %s\n", strerror(errno)); + + void* fifo = mmap(nullptr, size * repeat, PROT_READ | PROT_WRITE, MAP_SHARED, s_shm_fd, 0); + + for (size_t i = 1; i < repeat; i++) + { + void* base = (uint8*)fifo + size * i; + uint8* next = (uint8*)mmap(base, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, s_shm_fd, 0); + if (next != base) + fprintf(stderr, "Fail to mmap contiguous segment\n"); + } + + return fifo; +} + +void fifo_free(void* ptr, size_t size, size_t repeat) +{ + ASSERT(s_shm_fd >= 0); + + if (s_shm_fd < 0) + return; + + munmap(ptr, size * repeat); + + close(s_shm_fd); + s_shm_fd = -1; +} + +#endif diff --git a/pcsx2/GS/GS.h b/pcsx2/GS/GS.h index c9c4cc1e7d..35cc73aeb6 100644 --- a/pcsx2/GS/GS.h +++ b/pcsx2/GS/GS.h @@ -24,6 +24,384 @@ // This file is filled with stuff that breaks clang-format // clang-format off +#include "config.h" +#include "Pcsx2Types.h" + +#ifdef _WIN32 + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#else + +#include + +#endif + +#ifdef __x86_64__ +#define _M_AMD64 +#endif + +// put these into vc9/common7/ide/usertype.dat to have them highlighted + + +typedef unsigned char uint8; +typedef signed char int8; +typedef unsigned short uint16; +typedef signed short int16; +typedef unsigned int uint32; +typedef signed int int32; +typedef unsigned long long uint64; +typedef signed long long int64; + +// xbyak compatibilities +typedef int64 sint64; +#define MIE_INTEGER_TYPE_DEFINED +#define XBYAK_ENABLE_OMITTED_OPERAND + +// stdc + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 4) +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +// Don't un-indent our ifdefs +// clang-format off + +#ifdef _WIN32 + + // Note use GL/glcorearb.h on the future + // Requirements: + // * Update GSWndWGL::GetProcAddress to query 1.0 and 1.1 symbols + // * define all ENABLE_GL_VERSION_1_* + #include + #include + #include + #include "Renderers/OpenGL/GLLoader.h" + + #define DIRECTORY_SEPARATOR '\\' + +#else + + // Note use GL/glcorearb.h on the future + // Requirements: + // * Drop GLX that still include gl.h... + // EGL/OGL status on AMD GPU pro driver is unknown + // * define all ENABLE_GL_VERSION_1_* + #include + #include + #include "Renderers/OpenGL/GLLoader.h" + + #include // mkdir + + #define DIRECTORY_SEPARATOR '/' + +#endif + +#ifdef _MSC_VER + + #define EXPORT_C_(type) extern "C" type __stdcall + #define EXPORT_C EXPORT_C_(void) + + #define ALIGN_STACK(n) alignas(n) int dummy__; + +#else + + #ifndef __fastcall + #define __fastcall __attribute__((fastcall)) + #endif + + #define EXPORT_C_(type) extern "C" __attribute__((stdcall, externally_visible, visibility("default"))) type + #define EXPORT_C EXPORT_C_(void) + + #ifdef __GNUC__ + // GCC removes the variable as dead code and generates some warnings. + // Stack is automatically realigned due to SSE/AVX operations + #define ALIGN_STACK(n) (void)0; + + #else + + // TODO Check clang behavior + #define ALIGN_STACK(n) alignas(n) int dummy__; + + #endif + + +#endif + +#define countof(a) (sizeof(a) / sizeof(a[0])) + +#ifndef RESTRICT + + #ifdef __INTEL_COMPILER + + #define RESTRICT restrict + + #elif defined(_MSC_VER) + + #define RESTRICT __restrict + + #elif defined(__GNUC__) + + #define RESTRICT __restrict__ + + #else + + #define RESTRICT + + #endif + +#endif + +#define ASSERT assert + +/* +#ifdef _M_AMD64 + // Yeah let use mips naming ;) + #ifdef _WIN64 + #define a0 rcx + #define a1 rdx + #define a2 r8 + #define a3 r9 + #define t0 rdi + #define t1 rsi + #else + #define a0 rdi + #define a1 rsi + #define a2 rdx + #define a3 rcx + #define t0 r8 + #define t1 r9 + #endif +#endif +*/ + +// sse +#if defined(__GNUC__) + +// Convert gcc see define into GSdx (windows) define +#if defined(__AVX2__) + #if defined(__x86_64__) + #define _M_SSE 0x500 // TODO + #else + #define _M_SSE 0x501 + #endif +#elif defined(__AVX__) + #define _M_SSE 0x500 +#elif defined(__SSE4_1__) + #define _M_SSE 0x401 +#endif + +#endif + +#if !defined(_M_SSE) && (!defined(_WIN32) || defined(_M_AMD64) || defined(_M_IX86_FP) && _M_IX86_FP >= 2) + + #define _M_SSE 0x401 + +#endif + +#include +#include + +#ifndef _MM_DENORMALS_ARE_ZERO +#define _MM_DENORMALS_ARE_ZERO 0x0040 +#endif + +#define MXCSR (_MM_DENORMALS_ARE_ZERO | _MM_MASK_MASK | _MM_ROUND_NEAREST | _MM_FLUSH_ZERO_ON) + +#define _MM_TRANSPOSE4_SI128(row0, row1, row2, row3) \ +{ \ + __m128 tmp0 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0x44); \ + __m128 tmp2 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0xEE); \ + __m128 tmp1 = _mm_shuffle_ps(_mm_castsi128_ps(row2), _mm_castsi128_ps(row3), 0x44); \ + __m128 tmp3 = _mm_shuffle_ps(_mm_castsi128_ps(row2), _mm_castsi128_ps(row3), 0xEE); \ + (row0) = _mm_castps_si128(_mm_shuffle_ps(tmp0, tmp1, 0x88)); \ + (row1) = _mm_castps_si128(_mm_shuffle_ps(tmp0, tmp1, 0xDD)); \ + (row2) = _mm_castps_si128(_mm_shuffle_ps(tmp2, tmp3, 0x88)); \ + (row3) = _mm_castps_si128(_mm_shuffle_ps(tmp2, tmp3, 0xDD)); \ +} + +#include +#include + +#if _M_SSE >= 0x500 + + #include + +#endif + +#undef min +#undef max +#undef abs + +#if !defined(_MSC_VER) + // http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?view=markup + + __forceinline int _BitScanForward(unsigned long* const Index, const unsigned long Mask) + { +#if defined(__GCC_ASM_FLAG_OUTPUTS__) && 0 + // Need GCC6 to test the code validity + int flag; + __asm__("bsfl %k[Mask], %k[Index]" : [Index] "=r" (*Index), "=@ccz" (flag) : [Mask] "mr" (Mask)); + return flag; +#else + __asm__("bsfl %k[Mask], %k[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask) : "cc"); + return Mask ? 1 : 0; +#endif + } + + #ifdef __GNUC__ + + // gcc 4.8 define __rdtsc but unfortunately the compiler crash... + // The redefine allow to skip the gcc __rdtsc version -- Gregory + #define __rdtsc _lnx_rdtsc + //__forceinline unsigned long long __rdtsc() + __forceinline unsigned long long _lnx_rdtsc() + { + #if defined(__amd64__) || defined(__x86_64__) + unsigned long long low, high; + __asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high)); + return low | (high << 32); + #else + unsigned long long retval; + __asm__ __volatile__("rdtsc" : "=A"(retval)); + return retval; + #endif + } + + #endif + +#endif + +extern std::string format(const char* fmt, ...); + +extern void* vmalloc(size_t size, bool code); +extern void vmfree(void* ptr, size_t size); + +extern void* fifo_alloc(size_t size, size_t repeat); +extern void fifo_free(void* ptr, size_t size, size_t repeat); + +#ifdef ENABLE_VTUNE + + #include "jitprofiling.h" + + #ifdef _WIN32 + + #pragma comment(lib, "jitprofiling.lib") + + #endif + +#endif + +// Note: GL messages are present in common code, so in all renderers. + +#define GL_INSERT(type, code, sev, ...) \ + do \ + if (glDebugMessageInsert) glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, type, code, sev, -1, format(__VA_ARGS__).c_str()); \ + while(0); + +#if defined(_DEBUG) +# define GL_CACHE(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xFEAD, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) +#else +# define GL_CACHE(...) (void)(0); +#endif + +#if defined(ENABLE_TRACE_REG) && defined(_DEBUG) +# define GL_REG(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xB0B0, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) +#else +# define GL_REG(...) (void)(0); +#endif + +#if defined(ENABLE_EXTRA_LOG) && defined(_DEBUG) +# define GL_DBG(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xD0D0, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) +#else +# define GL_DBG(...) (void)(0); +#endif + +#if defined(ENABLE_OGL_DEBUG) + struct GLAutoPop + { + ~GLAutoPop() + { + if (glPopDebugGroup) + glPopDebugGroup(); + } + }; + + #define GL_PUSH_(...) do if (glPushDebugGroup) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0); + #define GL_PUSH(...) do if (glPushDebugGroup) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0); GLAutoPop gl_auto_pop; + #define GL_POP() do if (glPopDebugGroup) glPopDebugGroup(); while(0); + #define GL_INS(...) GL_INSERT(GL_DEBUG_TYPE_ERROR, 0xDEAD, GL_DEBUG_SEVERITY_MEDIUM, __VA_ARGS__) + #define GL_PERF(...) GL_INSERT(GL_DEBUG_TYPE_PERFORMANCE, 0xFEE1, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) +#else + #define GL_PUSH_(...) (void)(0); + #define GL_PUSH(...) (void)(0); + #define GL_POP() (void)(0); + #define GL_INS(...) (void)(0); + #define GL_PERF(...) (void)(0); +#endif + +// Helper path to dump texture +extern const std::string root_sw; +extern const std::string root_hw; + +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif + +#ifdef __cpp_constinit +# define CONSTINIT constinit +#elif __has_attribute(require_constant_initialization) +# define CONSTINIT __attribute__((require_constant_initialization)) +#else +# define CONSTINIT +#endif + #define VM_SIZE 4194304u #define HALF_VM_SIZE (VM_SIZE / 2u) #define PAGE_SIZE 8192u diff --git a/pcsx2/GS/GSAlignedClass.cpp b/pcsx2/GS/GSAlignedClass.cpp index 6940b5ae8b..ffc593e689 100644 --- a/pcsx2/GS/GSAlignedClass.cpp +++ b/pcsx2/GS/GSAlignedClass.cpp @@ -19,5 +19,5 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSAlignedClass.h" diff --git a/pcsx2/GS/GSBlock.cpp b/pcsx2/GS/GSBlock.cpp index d92c5aa172..7f908e40f5 100644 --- a/pcsx2/GS/GSBlock.cpp +++ b/pcsx2/GS/GSBlock.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSBlock.h" #if _M_SSE >= 0x501 diff --git a/pcsx2/GS/GSCapture.cpp b/pcsx2/GS/GSCapture.cpp index 951523965a..b37c81e862 100644 --- a/pcsx2/GS/GSCapture.cpp +++ b/pcsx2/GS/GSCapture.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSCapture.h" #include "GSPng.h" #include "GSUtil.h" diff --git a/pcsx2/GS/GSClut.cpp b/pcsx2/GS/GSClut.cpp index d40139be73..1e1a54f575 100644 --- a/pcsx2/GS/GSClut.cpp +++ b/pcsx2/GS/GSClut.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSClut.h" #include "GSLocalMemory.h" diff --git a/pcsx2/GS/GSCodeBuffer.cpp b/pcsx2/GS/GSCodeBuffer.cpp index 60a830e3d8..d6d4aa74c1 100644 --- a/pcsx2/GS/GSCodeBuffer.cpp +++ b/pcsx2/GS/GSCodeBuffer.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSCodeBuffer.h" GSCodeBuffer::GSCodeBuffer(size_t blocksize) diff --git a/pcsx2/GS/GSCrc.cpp b/pcsx2/GS/GSCrc.cpp index 2c7f0dc667..145e6ce060 100644 --- a/pcsx2/GS/GSCrc.cpp +++ b/pcsx2/GS/GSCrc.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GSCrc.h" diff --git a/pcsx2/GS/GSDrawingContext.cpp b/pcsx2/GS/GSDrawingContext.cpp index 52ecda9de9..6ddea7c23d 100644 --- a/pcsx2/GS/GSDrawingContext.cpp +++ b/pcsx2/GS/GSDrawingContext.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawingContext.h" #include "GSdx.h" diff --git a/pcsx2/GS/GSDump.cpp b/pcsx2/GS/GSDump.cpp index 32d2bc9b40..d2f4030407 100644 --- a/pcsx2/GS/GSDump.cpp +++ b/pcsx2/GS/GSDump.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDump.h" GSDumpBase::GSDumpBase(const std::string& fn) diff --git a/pcsx2/GS/GSLocalMemory.cpp b/pcsx2/GS/GSLocalMemory.cpp index 567b394010..9af37bc364 100644 --- a/pcsx2/GS/GSLocalMemory.cpp +++ b/pcsx2/GS/GSLocalMemory.cpp @@ -24,7 +24,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSLocalMemory.h" #include "GSdx.h" diff --git a/pcsx2/GS/GSLzma.cpp b/pcsx2/GS/GSLzma.cpp index 7cef54b9fd..6ef9311760 100644 --- a/pcsx2/GS/GSLzma.cpp +++ b/pcsx2/GS/GSLzma.cpp @@ -18,7 +18,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSLzma.h" GSDumpFile::GSDumpFile(char* filename, const char* repack_filename) diff --git a/pcsx2/GS/GSPerfMon.cpp b/pcsx2/GS/GSPerfMon.cpp index a6e3b64030..8fa8793734 100644 --- a/pcsx2/GS/GSPerfMon.cpp +++ b/pcsx2/GS/GSPerfMon.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSPerfMon.h" GSPerfMon::GSPerfMon() diff --git a/pcsx2/GS/GSPng.cpp b/pcsx2/GS/GSPng.cpp index 283afeae86..1a0c88eb8a 100644 --- a/pcsx2/GS/GSPng.cpp +++ b/pcsx2/GS/GSPng.cpp @@ -18,7 +18,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSPng.h" #include #include diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 35762fbb5e..df4e8cf86c 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSState.h" #include "GSdx.h" #include "GSUtil.h" diff --git a/pcsx2/GS/GSTables.cpp b/pcsx2/GS/GSTables.cpp index e7177c7b5c..ce2432e336 100644 --- a/pcsx2/GS/GSTables.cpp +++ b/pcsx2/GS/GSTables.cpp @@ -21,7 +21,7 @@ // clang-format off -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTables.h" const uint8 blockTable32[4][8] = diff --git a/pcsx2/GS/GSUtil.cpp b/pcsx2/GS/GSUtil.cpp index 7e138abb75..61a0ae4729 100644 --- a/pcsx2/GS/GSUtil.cpp +++ b/pcsx2/GS/GSUtil.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSUtil.h" #include #include diff --git a/pcsx2/GS/GSVector.cpp b/pcsx2/GS/GSVector.cpp index 0fb2c6292a..8449324a51 100644 --- a/pcsx2/GS/GSVector.cpp +++ b/pcsx2/GS/GSVector.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSVector.h" CONSTINIT const GSVector4i GSVector4i::m_xff[17] = diff --git a/pcsx2/GS/GSVector.h b/pcsx2/GS/GSVector.h index a6989af29e..4fc6b5dba7 100644 --- a/pcsx2/GS/GSVector.h +++ b/pcsx2/GS/GSVector.h @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #pragma once diff --git a/pcsx2/GS/GSdx.cpp b/pcsx2/GS/GSdx.cpp index d8f65b4b6b..66a52be1f5 100644 --- a/pcsx2/GS/GSdx.cpp +++ b/pcsx2/GS/GSdx.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GS.h" #include diff --git a/pcsx2/GS/GSdx.vcxproj b/pcsx2/GS/GSdx.vcxproj deleted file mode 100644 index fbd69fbeae..0000000000 --- a/pcsx2/GS/GSdx.vcxproj +++ /dev/null @@ -1,272 +0,0 @@ - - - - - Debug AVX2 - Win32 - - - Debug AVX2 - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release AVX2 - Win32 - - - Release AVX2 - x64 - - - Release - Win32 - - - Release - x64 - - - - - {18E42F6F-3A62-41EE-B42F-79366C4F1E95} - - - - DynamicLibrary - $(DefaultPlatformToolset) - Unicode - true - true - false - - - - - - - - - - - - - - - - AllRules.ruleset - - - - Use - - - .\GSdx.def - MachineX86 - MachineX64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {78b079bd-9fc7-4b9e-b4a6-96da0f00248b} - - - {d6973076-9317-4ef2-a0b8-b7a18ac0713e} - - - {12728250-16ec-4dc6-94d7-e21dd88947f8} - - - {27f17499-a372-4408-8afa-4f9f4584fbd3} - - - - - \ No newline at end of file diff --git a/pcsx2/GS/GSdx.vcxproj.filters b/pcsx2/GS/GSdx.vcxproj.filters deleted file mode 100644 index 1a649e5325..0000000000 --- a/pcsx2/GS/GSdx.vcxproj.filters +++ /dev/null @@ -1,535 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - {6d029896-e5fd-4b46-8576-52d7d90125e6} - - - {d6fcc23b-bc82-4390-8a9a-928910bc4123} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Resource Files - - - Xbyak - - - Xbyak - - - Xbyak - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - Shaders - - - - - Resource Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/pcsx2/GS/Renderers/Common/GSDevice.cpp b/pcsx2/GS/Renderers/Common/GSDevice.cpp index d300553c41..4a04e00f21 100644 --- a/pcsx2/GS/Renderers/Common/GSDevice.cpp +++ b/pcsx2/GS/Renderers/Common/GSDevice.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GSDevice.h" diff --git a/pcsx2/GS/Renderers/Common/GSDevice.h b/pcsx2/GS/Renderers/Common/GSDevice.h index dc38a0cb08..edf3e86b4e 100644 --- a/pcsx2/GS/Renderers/Common/GSDevice.h +++ b/pcsx2/GS/Renderers/Common/GSDevice.h @@ -22,10 +22,10 @@ #pragma once #include "GSFastList.h" -#include "Window/GSWnd.h" +#include "../../Window/GSWnd.h" #include "GSTexture.h" #include "GSVertex.h" -#include "GSAlignedClass.h" +#include "../../GSAlignedClass.h" #include "GSOsdManager.h" enum ShaderConvert diff --git a/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp b/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp index ae54f17aa0..54eff8167f 100644 --- a/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp +++ b/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDirtyRect.h" GSDirtyRect::GSDirtyRect() diff --git a/pcsx2/GS/Renderers/Common/GSDirtyRect.h b/pcsx2/GS/Renderers/Common/GSDirtyRect.h index 44fe4513aa..0d1d0ef827 100644 --- a/pcsx2/GS/Renderers/Common/GSDirtyRect.h +++ b/pcsx2/GS/Renderers/Common/GSDirtyRect.h @@ -21,7 +21,7 @@ #pragma once -#include "GSLocalMemory.h" +#include "../../GSLocalMemory.h" class GSDirtyRect { diff --git a/pcsx2/GS/Renderers/Common/GSFunctionMap.cpp b/pcsx2/GS/Renderers/Common/GSFunctionMap.cpp index 1b1974c0ea..ac511068f6 100644 --- a/pcsx2/GS/Renderers/Common/GSFunctionMap.cpp +++ b/pcsx2/GS/Renderers/Common/GSFunctionMap.cpp @@ -19,5 +19,5 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSFunctionMap.h" diff --git a/pcsx2/GS/Renderers/Common/GSFunctionMap.h b/pcsx2/GS/Renderers/Common/GSFunctionMap.h index 2411cdc763..e596015c04 100644 --- a/pcsx2/GS/Renderers/Common/GSFunctionMap.h +++ b/pcsx2/GS/Renderers/Common/GSFunctionMap.h @@ -21,12 +21,12 @@ #pragma once -#include "GS.h" -#include "GSCodeBuffer.h" +#include "../../GS.h" +#include "../../GSCodeBuffer.h" #include "xbyak/xbyak.h" #include "xbyak/xbyak_util.h" -#include "Renderers/SW/GSScanlineEnvironment.h" +#include "../SW/GSScanlineEnvironment.h" template class GSFunctionMap diff --git a/pcsx2/GS/Renderers/Common/GSOsdManager.cpp b/pcsx2/GS/Renderers/Common/GSOsdManager.cpp index a8f5b675cd..1794bfd55b 100644 --- a/pcsx2/GS/Renderers/Common/GSOsdManager.cpp +++ b/pcsx2/GS/Renderers/Common/GSOsdManager.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GSOsdManager.h" #ifdef _WIN32 diff --git a/pcsx2/GS/Renderers/Common/GSOsdManager.h b/pcsx2/GS/Renderers/Common/GSOsdManager.h index c2b4001837..5867db086a 100644 --- a/pcsx2/GS/Renderers/Common/GSOsdManager.h +++ b/pcsx2/GS/Renderers/Common/GSOsdManager.h @@ -21,8 +21,8 @@ #pragma once -#include "stdafx.h" -#include "GSVector.h" +#include "PrecompiledHeader.h" +#include "../../GSVector.h" #include "GSVertex.h" #include "GSTexture.h" #include diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index 4226422792..5825d522d7 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRenderer.h" #if defined(__unix__) || defined(__APPLE__) #include diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.h b/pcsx2/GS/Renderers/Common/GSRenderer.h index 00a5e44136..29d86d7249 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.h +++ b/pcsx2/GS/Renderers/Common/GSRenderer.h @@ -21,10 +21,10 @@ #pragma once -#include "GSdx.h" -#include "Window/GSWnd.h" -#include "GSState.h" -#include "GSCapture.h" +#include "../../GS.h" +#include "../../Window/GSWnd.h" +#include "../../GSState.h" +#include "../../GSCapture.h" class GSRenderer : public GSState { diff --git a/pcsx2/GS/Renderers/Common/GSTexture.cpp b/pcsx2/GS/Renderers/Common/GSTexture.cpp index bc9aa85586..c7501d2136 100644 --- a/pcsx2/GS/Renderers/Common/GSTexture.cpp +++ b/pcsx2/GS/Renderers/Common/GSTexture.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTexture.h" GSTexture::GSTexture() diff --git a/pcsx2/GS/Renderers/Common/GSTexture.h b/pcsx2/GS/Renderers/Common/GSTexture.h index a7dfadcff7..e7babda86a 100644 --- a/pcsx2/GS/Renderers/Common/GSTexture.h +++ b/pcsx2/GS/Renderers/Common/GSTexture.h @@ -21,7 +21,7 @@ #pragma once -#include "GSVector.h" +#include "../../GSVector.h" class GSTexture { diff --git a/pcsx2/GS/Renderers/Common/GSVertex.h b/pcsx2/GS/Renderers/Common/GSVertex.h index cea0126b49..c1150c36a8 100644 --- a/pcsx2/GS/Renderers/Common/GSVertex.h +++ b/pcsx2/GS/Renderers/Common/GSVertex.h @@ -21,10 +21,10 @@ #pragma once -#include "GS.h" -#include "GSVector.h" -#include "Renderers/HW/GSVertexHW.h" -#include "Renderers/SW/GSVertexSW.h" +#include "../../GS.h" +#include "../../GSVector.h" +#include "../HW/GSVertexHW.h" +#include "../SW/GSVertexSW.h" #pragma pack(push, 1) diff --git a/pcsx2/GS/Renderers/Common/GSVertexTrace.cpp b/pcsx2/GS/Renderers/Common/GSVertexTrace.cpp index d34f28cd9c..5f4cbc2d7a 100644 --- a/pcsx2/GS/Renderers/Common/GSVertexTrace.cpp +++ b/pcsx2/GS/Renderers/Common/GSVertexTrace.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSVertexTrace.h" #include "GSUtil.h" #include "GSState.h" diff --git a/pcsx2/GS/Renderers/Common/GSVertexTrace.h b/pcsx2/GS/Renderers/Common/GSVertexTrace.h index 83104d88ca..6f73ac5e91 100644 --- a/pcsx2/GS/Renderers/Common/GSVertexTrace.h +++ b/pcsx2/GS/Renderers/Common/GSVertexTrace.h @@ -21,10 +21,10 @@ #pragma once -#include "GSDrawingContext.h" +#include "../../GSDrawingContext.h" #include "GSVertex.h" -#include "Renderers/SW/GSVertexSW.h" -#include "Renderers/HW/GSVertexHW.h" +#include "../SW/GSVertexSW.h" +#include "../HW/GSVertexHW.h" #include "GSFunctionMap.h" class GSState; diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index 1d05689700..e77792d9f5 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GSDevice11.h" #include "GSUtil.h" diff --git a/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp b/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp index 7a0befb1c5..c8b40dc8d8 100644 --- a/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRendererDX11.h" GSRendererDX11::GSRendererDX11() diff --git a/pcsx2/GS/Renderers/DX11/GSTexture11.cpp b/pcsx2/GS/Renderers/DX11/GSTexture11.cpp index c0e5e445c4..351f5e176a 100644 --- a/pcsx2/GS/Renderers/DX11/GSTexture11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSTexture11.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTexture11.h" #include "GSPng.h" diff --git a/pcsx2/GS/Renderers/DX11/GSTextureFX11.cpp b/pcsx2/GS/Renderers/DX11/GSTextureFX11.cpp index c7fe2f64e5..0d901d9512 100644 --- a/pcsx2/GS/Renderers/DX11/GSTextureFX11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSTextureFX11.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDevice11.h" #include "resource.h" #include "GSTables.h" diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index c8c8350146..40e10ce76f 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSState.h" #include "GSdx.h" diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 50cd120d2c..8f8fbd2bc3 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRendererHW.h" const float GSRendererHW::SSR_UV_TOLERANCE = 1e-3f; diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.h b/pcsx2/GS/Renderers/HW/GSRendererHW.h index 2e85e04039..5729a87cd8 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.h +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.h @@ -22,8 +22,8 @@ #pragma once #include "GSTextureCache.h" -#include "Renderers/Common/GSFunctionMap.h" -#include "GSState.h" +#include "../Common/GSFunctionMap.h" +#include "../../GSState.h" class GSRendererHW : public GSRenderer { diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index c1f92b9265..1dbb2925b7 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTextureCache.h" #include "GSRendererHW.h" #include "GSUtil.h" diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.h b/pcsx2/GS/Renderers/HW/GSTextureCache.h index dba99b27fd..bcfe9ca712 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.h +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.h @@ -21,9 +21,9 @@ #pragma once -#include "Renderers/Common/GSRenderer.h" -#include "Renderers/Common/GSFastList.h" -#include "Renderers/Common/GSDirtyRect.h" +#include "../Common/GSRenderer.h" +#include "../Common/GSFastList.h" +#include "../Common/GSDirtyRect.h" class GSTextureCache { diff --git a/pcsx2/GS/Renderers/HW/GSVertexHW.h b/pcsx2/GS/Renderers/HW/GSVertexHW.h index 262e23a0ad..46c8242e41 100644 --- a/pcsx2/GS/Renderers/HW/GSVertexHW.h +++ b/pcsx2/GS/Renderers/HW/GSVertexHW.h @@ -21,8 +21,8 @@ #pragma once -#include "GS.h" -#include "GSVector.h" +#include "../../GS.h" +#include "../../GSVector.h" #pragma pack(push, 1) diff --git a/pcsx2/GS/Renderers/Null/GSDeviceNull.cpp b/pcsx2/GS/Renderers/Null/GSDeviceNull.cpp index 6bac6a3080..e43013b958 100644 --- a/pcsx2/GS/Renderers/Null/GSDeviceNull.cpp +++ b/pcsx2/GS/Renderers/Null/GSDeviceNull.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDeviceNull.h" bool GSDeviceNull::Create(const std::shared_ptr& wnd) diff --git a/pcsx2/GS/Renderers/Null/GSDeviceNull.h b/pcsx2/GS/Renderers/Null/GSDeviceNull.h index 6d2584b849..4aa27d0838 100644 --- a/pcsx2/GS/Renderers/Null/GSDeviceNull.h +++ b/pcsx2/GS/Renderers/Null/GSDeviceNull.h @@ -21,7 +21,7 @@ #pragma once -#include "Renderers/Common/GSDevice.h" +#include "../Common/GSDevice.h" #include "GSTextureNull.h" class GSDeviceNull : public GSDevice diff --git a/pcsx2/GS/Renderers/Null/GSRendererNull.cpp b/pcsx2/GS/Renderers/Null/GSRendererNull.cpp index 19b8e88471..5023ffa18d 100644 --- a/pcsx2/GS/Renderers/Null/GSRendererNull.cpp +++ b/pcsx2/GS/Renderers/Null/GSRendererNull.cpp @@ -19,5 +19,5 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRendererNull.h" diff --git a/pcsx2/GS/Renderers/Null/GSRendererNull.h b/pcsx2/GS/Renderers/Null/GSRendererNull.h index 78fe0fc265..1fd4ff0c4a 100644 --- a/pcsx2/GS/Renderers/Null/GSRendererNull.h +++ b/pcsx2/GS/Renderers/Null/GSRendererNull.h @@ -21,7 +21,7 @@ #pragma once -#include "Renderers/Common/GSRenderer.h" +#include "../Common/GSRenderer.h" class GSRendererNull : public GSRenderer { diff --git a/pcsx2/GS/Renderers/Null/GSTextureNull.cpp b/pcsx2/GS/Renderers/Null/GSTextureNull.cpp index 8a372573d8..749077c2f5 100644 --- a/pcsx2/GS/Renderers/Null/GSTextureNull.cpp +++ b/pcsx2/GS/Renderers/Null/GSTextureNull.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTextureNull.h" GSTextureNull::GSTextureNull() diff --git a/pcsx2/GS/Renderers/Null/GSTextureNull.h b/pcsx2/GS/Renderers/Null/GSTextureNull.h index 82aa2de8d4..3699b97239 100644 --- a/pcsx2/GS/Renderers/Null/GSTextureNull.h +++ b/pcsx2/GS/Renderers/Null/GSTextureNull.h @@ -21,7 +21,7 @@ #pragma once -#include "Renderers/Common/GSTexture.h" +#include "../Common/GSTexture.h" class GSTextureNull : public GSTexture { diff --git a/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp b/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp index 315ca7896a..f0220fdf11 100644 --- a/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GLLoader.cpp @@ -18,7 +18,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GLLoader.h" #include "GSdx.h" #include "GS.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GLState.cpp b/pcsx2/GS/Renderers/OpenGL/GLState.cpp index d3c1f14fe2..326a3b8a64 100644 --- a/pcsx2/GS/Renderers/OpenGL/GLState.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GLState.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GLState.h" namespace GLState diff --git a/pcsx2/GS/Renderers/OpenGL/GLState.h b/pcsx2/GS/Renderers/OpenGL/GLState.h index 3befbf75ad..b412c26f42 100644 --- a/pcsx2/GS/Renderers/OpenGL/GLState.h +++ b/pcsx2/GS/Renderers/OpenGL/GLState.h @@ -21,8 +21,8 @@ #pragma once -#include "GSdx.h" -#include "GSVector.h" +#include "../../GS.h" +#include "../../GSVector.h" namespace GLState { diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index d96409b321..87f8a4169f 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSState.h" #include "GSDeviceOGL.h" #include "GLState.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.h b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.h index 06319480b2..2c232d1422 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.h +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.h @@ -21,9 +21,9 @@ #pragma once -#include "Renderers/Common/GSDevice.h" +#include "../Common/GSDevice.h" #include "GSTextureOGL.h" -#include "GSdx.h" +#include "../../GS.h" #include "GSVertexArrayOGL.h" #include "GSUniformBufferOGL.h" #include "GSShaderOGL.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp index c9f4453f6f..984bf1ce9f 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRendererOGL.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.h b/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.h index 7010f74dc6..694beb32f1 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.h +++ b/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.h @@ -21,9 +21,9 @@ #pragma once -#include "Renderers/HW/GSRendererHW.h" +#include "../HW/GSRendererHW.h" #include "GSTextureCacheOGL.h" -#include "Renderers/HW/GSVertexHW.h" +#include "../HW/GSVertexHW.h" class GSRendererOGL final : public GSRendererHW { diff --git a/pcsx2/GS/Renderers/OpenGL/GSShaderOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSShaderOGL.cpp index 80eebc7674..afb7e0068e 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSShaderOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSShaderOGL.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSShaderOGL.h" #include "GLState.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.cpp index dcf8a3e5cb..cfd92ec2db 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.cpp @@ -20,7 +20,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTextureCacheOGL.h" GSTextureCacheOGL::GSTextureCacheOGL(GSRenderer* r) diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.h b/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.h index 19085d9fb5..8944e58838 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.h +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureCacheOGL.h @@ -22,7 +22,7 @@ #pragma once -#include "Renderers/HW/GSTextureCache.h" +#include "../HW/GSTextureCache.h" #include "GSDeviceOGL.h" class GSTextureCacheOGL final : public GSTextureCache diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp index 55a4a69b4f..6c05d50b82 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include #include "GSTextureOGL.h" #include "GLState.h" diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h index 466b194dcb..3d1fd2cadf 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h @@ -21,7 +21,7 @@ #pragma once -#include "Renderers/Common/GSTexture.h" +#include "../Common/GSTexture.h" namespace PboPool { diff --git a/pcsx2/GS/Renderers/OpenGL/GSVertexArrayOGL.h b/pcsx2/GS/Renderers/OpenGL/GSVertexArrayOGL.h index 7d86d8cdfa..34eba5d973 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSVertexArrayOGL.h +++ b/pcsx2/GS/Renderers/OpenGL/GSVertexArrayOGL.h @@ -21,7 +21,7 @@ #pragma once -#include "config.h" +#include "../../config.h" #ifdef ENABLE_OGL_DEBUG_MEM_BW extern uint64 g_vertex_upload_byte; diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanline.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanline.cpp index 7abe96e578..d1a04672f8 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanline.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanline.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanline.h" #include "GSTextureCacheSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanline.h b/pcsx2/GS/Renderers/SW/GSDrawScanline.h index bf02c34048..305ecf528f 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanline.h +++ b/pcsx2/GS/Renderers/SW/GSDrawScanline.h @@ -21,7 +21,7 @@ #pragma once -#include "GSState.h" +#include "../../GSState.h" #include "GSRasterizer.h" #include "GSScanlineEnvironment.h" #include "GSSetupPrimCodeGenerator.h" diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.cpp index c71774d24e..07e187d3a6 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #if _M_SSE >= 0x501 diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.h b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.h index 4fc037a433..29ece94214 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.h +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.h @@ -22,8 +22,8 @@ #pragma once #include "GSScanlineEnvironment.h" -#include "Renderers/Common/GSFunctionMap.h" -#include "GSUtil.h" +#include "../Common/GSFunctionMap.h" +#include "../../GSUtil.h" using namespace Xbyak; diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx.cpp index 7669580ca4..3fcaf59f0b 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx2.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx2.cpp index 1389d802da..a83907bf5b 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx2.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx2.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.cpp index fa893de4b3..31ba623367 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #if _M_SSE < 0x501 && (defined(_M_AMD64) || defined(_WIN64)) diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx.cpp index b81cf13f52..49cf9c219c 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx2.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx2.cpp index cd1dd29d67..a34a03f792 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx2.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx2.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.cpp b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.cpp index fbaab96677..1a49c6e4f7 100644 --- a/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.cpp +++ b/pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSDrawScanlineCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSRasterizer.cpp b/pcsx2/GS/Renderers/SW/GSRasterizer.cpp index ab545fc5ec..948f19d41b 100644 --- a/pcsx2/GS/Renderers/SW/GSRasterizer.cpp +++ b/pcsx2/GS/Renderers/SW/GSRasterizer.cpp @@ -21,7 +21,7 @@ // TODO: JIT Draw* (flags: depth, texture, color (+iip), scissor) -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRasterizer.h" int GSRasterizerData::s_counter = 0; diff --git a/pcsx2/GS/Renderers/SW/GSRasterizer.h b/pcsx2/GS/Renderers/SW/GSRasterizer.h index c7822726ee..894726ec04 100644 --- a/pcsx2/GS/Renderers/SW/GSRasterizer.h +++ b/pcsx2/GS/Renderers/SW/GSRasterizer.h @@ -22,11 +22,11 @@ #pragma once #include "GS.h" -#include "Renderers/SW/GSVertexSW.h" -#include "Renderers/Common/GSFunctionMap.h" -#include "GSAlignedClass.h" -#include "GSPerfMon.h" -#include "GSThread_CXX11.h" +#include "GSVertexSW.h" +#include "../Common/GSFunctionMap.h" +#include "../../GSAlignedClass.h" +#include "../../GSPerfMon.h" +#include "../../GSThread_CXX11.h" class alignas(32) GSRasterizerData : public GSAlignedClass<32> { diff --git a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp index bbe1e161d4..f1d33741cf 100644 --- a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSRendererSW.h" #define LOG 0 diff --git a/pcsx2/GS/Renderers/SW/GSRendererSW.h b/pcsx2/GS/Renderers/SW/GSRendererSW.h index edfe2532c0..271359a7e2 100644 --- a/pcsx2/GS/Renderers/SW/GSRendererSW.h +++ b/pcsx2/GS/Renderers/SW/GSRendererSW.h @@ -21,8 +21,8 @@ #pragma once -#include "Renderers/SW/GSTextureCacheSW.h" -#include "Renderers/SW/GSDrawScanline.h" +#include "GSTextureCacheSW.h" +#include "GSDrawScanline.h" class GSRendererSW : public GSRenderer { diff --git a/pcsx2/GS/Renderers/SW/GSScanlineEnvironment.h b/pcsx2/GS/Renderers/SW/GSScanlineEnvironment.h index 1d10eba496..c9f26b3cbe 100644 --- a/pcsx2/GS/Renderers/SW/GSScanlineEnvironment.h +++ b/pcsx2/GS/Renderers/SW/GSScanlineEnvironment.h @@ -21,8 +21,8 @@ #pragma once -#include "GSLocalMemory.h" -#include "GSVector.h" +#include "../../GSLocalMemory.h" +#include "../../GSVector.h" union GSScanlineSelector { diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.cpp index 56544f80a9..dc7b7d3d21 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" using namespace Xbyak; diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.h b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.h index 59c03d934b..0a9d793ea0 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.h +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.h @@ -21,9 +21,9 @@ #pragma once -#include "Renderers/SW/GSScanlineEnvironment.h" -#include "Renderers/Common/GSFunctionMap.h" -#include "GSUtil.h" +#include "GSScanlineEnvironment.h" +#include "../Common/GSFunctionMap.h" +#include "../../GSUtil.h" class GSSetupPrimCodeGenerator : public GSCodeGenerator { diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx.cpp index ca418e9436..b69fb12328 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx.cpp @@ -20,7 +20,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx2.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx2.cpp index 5823a7304e..ab3d82b143 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx2.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx2.cpp @@ -20,7 +20,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.cpp index bb6e2f1224..619a935c96 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx.cpp index 669e7ee924..b307a65358 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx2.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx2.cpp index e34d8bfb97..3a38cd76aa 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx2.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx2.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.cpp b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.cpp index eaafd3a836..d4006482c1 100644 --- a/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.cpp +++ b/pcsx2/GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetupPrimCodeGenerator.h" #include "GSVertexSW.h" diff --git a/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp b/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp index da1cca63a3..5c32adb9f8 100644 --- a/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSTextureCacheSW.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTextureCacheSW.h" GSTextureCacheSW::GSTextureCacheSW(GSState* state) diff --git a/pcsx2/GS/Renderers/SW/GSTextureCacheSW.h b/pcsx2/GS/Renderers/SW/GSTextureCacheSW.h index 7d7df71cc6..1e9e886302 100644 --- a/pcsx2/GS/Renderers/SW/GSTextureCacheSW.h +++ b/pcsx2/GS/Renderers/SW/GSTextureCacheSW.h @@ -21,8 +21,8 @@ #pragma once -#include "Renderers/Common/GSRenderer.h" -#include "Renderers/Common/GSFastList.h" +#include "../Common/GSRenderer.h" +#include "../Common/GSFastList.h" class GSTextureCacheSW { diff --git a/pcsx2/GS/Renderers/SW/GSTextureSW.cpp b/pcsx2/GS/Renderers/SW/GSTextureSW.cpp index ea003be42a..9e06ae9fac 100644 --- a/pcsx2/GS/Renderers/SW/GSTextureSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSTextureSW.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSTextureSW.h" #include "GSPng.h" diff --git a/pcsx2/GS/Renderers/SW/GSVertexSW.cpp b/pcsx2/GS/Renderers/SW/GSVertexSW.cpp index 2b286741f7..e320febf46 100644 --- a/pcsx2/GS/Renderers/SW/GSVertexSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSVertexSW.cpp @@ -19,5 +19,5 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSVertexSW.h" \ No newline at end of file diff --git a/pcsx2/GS/Renderers/SW/GSVertexSW.h b/pcsx2/GS/Renderers/SW/GSVertexSW.h index 9b7dba7aeb..84bc23d453 100644 --- a/pcsx2/GS/Renderers/SW/GSVertexSW.h +++ b/pcsx2/GS/Renderers/SW/GSVertexSW.h @@ -21,7 +21,7 @@ #pragma once -#include "GSVector.h" +#include "../../GSVector.h" struct alignas(32) GSVertexSW { diff --git a/pcsx2/GS/Window/GSCaptureDlg.cpp b/pcsx2/GS/Window/GSCaptureDlg.cpp index e59b3815ae..9fd6cbe148 100644 --- a/pcsx2/GS/Window/GSCaptureDlg.cpp +++ b/pcsx2/GS/Window/GSCaptureDlg.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GSCaptureDlg.h" diff --git a/pcsx2/GS/Window/GSLinuxDialog.cpp b/pcsx2/GS/Window/GSLinuxDialog.cpp index 23b8c3f7da..da1b0bc6a2 100644 --- a/pcsx2/GS/Window/GSLinuxDialog.cpp +++ b/pcsx2/GS/Window/GSLinuxDialog.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include #include "GS.h" #include "GSdx.h" diff --git a/pcsx2/GS/Window/GSSetting.cpp b/pcsx2/GS/Window/GSSetting.cpp index 63377bcd6a..52dc7b11ce 100644 --- a/pcsx2/GS/Window/GSSetting.cpp +++ b/pcsx2/GS/Window/GSSetting.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSSetting.h" #ifdef _WIN32 #include "resource.h" diff --git a/pcsx2/GS/Window/GSSetting.h b/pcsx2/GS/Window/GSSetting.h index 76120feda6..d05bf82e08 100644 --- a/pcsx2/GS/Window/GSSetting.h +++ b/pcsx2/GS/Window/GSSetting.h @@ -21,7 +21,7 @@ #pragma once -#include "stdafx.h" +#include "PrecompiledHeader.h" struct GSSetting { diff --git a/pcsx2/GS/Window/GSSettingsDlg.cpp b/pcsx2/GS/Window/GSSettingsDlg.cpp index c1e7009ef7..8c68d33da8 100644 --- a/pcsx2/GS/Window/GSSettingsDlg.cpp +++ b/pcsx2/GS/Window/GSSettingsDlg.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSdx.h" #include "GSSettingsDlg.h" #include "GSUtil.h" diff --git a/pcsx2/GS/Window/GSWnd.cpp b/pcsx2/GS/Window/GSWnd.cpp index 310aa213fb..de436f1a60 100644 --- a/pcsx2/GS/Window/GSWnd.cpp +++ b/pcsx2/GS/Window/GSWnd.cpp @@ -20,7 +20,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSWnd.h" void GSWndGL::PopulateGlFunction() diff --git a/pcsx2/GS/Window/GSWnd.h b/pcsx2/GS/Window/GSWnd.h index 2cac87016f..80c090bead 100644 --- a/pcsx2/GS/Window/GSWnd.h +++ b/pcsx2/GS/Window/GSWnd.h @@ -21,9 +21,9 @@ #pragma once -#include "stdafx.h" -#include "GSdx.h" -#include "GSVector.h" +#include "PrecompiledHeader.h" +#include "../GS.h" +#include "../GSVector.h" class GSWnd { diff --git a/pcsx2/GS/Window/GSWndDX.cpp b/pcsx2/GS/Window/GSWndDX.cpp index 6f877e6384..8495606c6e 100644 --- a/pcsx2/GS/Window/GSWndDX.cpp +++ b/pcsx2/GS/Window/GSWndDX.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSWndDX.h" #ifdef _WIN32 diff --git a/pcsx2/GS/Window/GSWndDX.h b/pcsx2/GS/Window/GSWndDX.h index 674fae4e0e..9fe2d2d63f 100644 --- a/pcsx2/GS/Window/GSWndDX.h +++ b/pcsx2/GS/Window/GSWndDX.h @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSWnd.h" #ifdef _WIN32 diff --git a/pcsx2/GS/Window/GSWndEGL.cpp b/pcsx2/GS/Window/GSWndEGL.cpp index 94bc89e108..89a7b51328 100644 --- a/pcsx2/GS/Window/GSWndEGL.cpp +++ b/pcsx2/GS/Window/GSWndEGL.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSWndEGL.h" #if defined(__unix__) diff --git a/pcsx2/GS/Window/GSWndWGL.cpp b/pcsx2/GS/Window/GSWndWGL.cpp index 745073f6a4..946ed42c74 100644 --- a/pcsx2/GS/Window/GSWndWGL.cpp +++ b/pcsx2/GS/Window/GSWndWGL.cpp @@ -19,7 +19,7 @@ * */ -#include "stdafx.h" +#include "PrecompiledHeader.h" #include "GSWndWGL.h" #ifdef _WIN32 diff --git a/pcsx2/GS/stdafx.cpp b/pcsx2/GS/stdafx.cpp deleted file mode 100644 index d245310e23..0000000000 --- a/pcsx2/GS/stdafx.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (C) 2007-2009 Gabest - * http://www.gabest.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -// stdafx.cpp : source file that includes just the standard includes -// GSdx.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file - -std::string format(const char* fmt, ...) -{ - va_list args; - - va_start(args, fmt); - int size = vsnprintf(nullptr, 0, fmt, args) + 1; - va_end(args); - - assert(size > 0); - std::vector buffer(std::max(1, size)); - - va_start(args, fmt); - vsnprintf(buffer.data(), size, fmt, args); - va_end(args); - - return {buffer.data()}; -} - -// Helper path to dump texture -#ifdef _WIN32 -const std::string root_sw("c:\\temp1\\_"); -const std::string root_hw("c:\\temp2\\_"); -#else -#ifdef _M_AMD64 -const std::string root_sw("/tmp/GS_SW_dump64/"); -const std::string root_hw("/tmp/GS_HW_dump64/"); -#else -const std::string root_sw("/tmp/GS_SW_dump32/"); -const std::string root_hw("/tmp/GS_HW_dump32/"); -#endif -#endif - -#ifdef _WIN32 - -void* vmalloc(size_t size, bool code) -{ - return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, code ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE); -} - -void vmfree(void* ptr, size_t size) -{ - VirtualFree(ptr, 0, MEM_RELEASE); -} - -static HANDLE s_fh = NULL; -static uint8* s_Next[8]; - -void* fifo_alloc(size_t size, size_t repeat) -{ - ASSERT(s_fh == NULL); - - if (repeat >= countof(s_Next)) - { - fprintf(stderr, "Memory mapping overflow (%zu >= %u)\n", repeat, countof(s_Next)); - return vmalloc(size * repeat, false); // Fallback to default vmalloc - } - - s_fh = CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, 0, size, nullptr); - DWORD errorID = ::GetLastError(); - if (s_fh == NULL) - { - fprintf(stderr, "Failed to reserve memory. WIN API ERROR:%u\n", errorID); - return vmalloc(size * repeat, false); // Fallback to default vmalloc - } - - int mmap_segment_failed = 0; - void* fifo = MapViewOfFile(s_fh, FILE_MAP_ALL_ACCESS, 0, 0, size); - for (size_t i = 1; i < repeat; i++) - { - void* base = (uint8*)fifo + size * i; - s_Next[i] = (uint8*)MapViewOfFileEx(s_fh, FILE_MAP_ALL_ACCESS, 0, 0, size, base); - errorID = ::GetLastError(); - if (s_Next[i] != base) - { - mmap_segment_failed++; - if (mmap_segment_failed > 4) - { - fprintf(stderr, "Memory mapping failed after %d attempts, aborting. WIN API ERROR:%u\n", mmap_segment_failed, errorID); - fifo_free(fifo, size, repeat); - return vmalloc(size * repeat, false); // Fallback to default vmalloc - } - do - { - UnmapViewOfFile(s_Next[i]); - s_Next[i] = 0; - } while (--i > 0); - - fifo = MapViewOfFile(s_fh, FILE_MAP_ALL_ACCESS, 0, 0, size); - } - } - - return fifo; -} - -void fifo_free(void* ptr, size_t size, size_t repeat) -{ - ASSERT(s_fh != NULL); - - if (s_fh == NULL) - { - if (ptr != NULL) - vmfree(ptr, size); - return; - } - - UnmapViewOfFile(ptr); - - for (size_t i = 1; i < countof(s_Next); i++) - { - if (s_Next[i] != 0) - { - UnmapViewOfFile(s_Next[i]); - s_Next[i] = 0; - } - } - - CloseHandle(s_fh); - s_fh = NULL; -} - -#else - -#include -#include - -void* vmalloc(size_t size, bool code) -{ - size_t mask = getpagesize() - 1; - - size = (size + mask) & ~mask; - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANONYMOUS; - - if (code) - { - prot |= PROT_EXEC; -#if defined(_M_AMD64) && !defined(__APPLE__) - // macOS doesn't allow any mappings in the first 4GB of address space - flags |= MAP_32BIT; -#endif - } - - return mmap(NULL, size, prot, flags, -1, 0); -} - -void vmfree(void* ptr, size_t size) -{ - size_t mask = getpagesize() - 1; - - size = (size + mask) & ~mask; - - munmap(ptr, size); -} - -static int s_shm_fd = -1; - -void* fifo_alloc(size_t size, size_t repeat) -{ - ASSERT(s_shm_fd == -1); - - const char* file_name = "/GSDX.mem"; - s_shm_fd = shm_open(file_name, O_RDWR | O_CREAT | O_EXCL, 0600); - if (s_shm_fd != -1) - { - shm_unlink(file_name); // file is deleted but descriptor is still open - } - else - { - fprintf(stderr, "Failed to open %s due to %s\n", file_name, strerror(errno)); - return nullptr; - } - - if (ftruncate(s_shm_fd, repeat * size) < 0) - fprintf(stderr, "Failed to reserve memory due to %s\n", strerror(errno)); - - void* fifo = mmap(nullptr, size * repeat, PROT_READ | PROT_WRITE, MAP_SHARED, s_shm_fd, 0); - - for (size_t i = 1; i < repeat; i++) - { - void* base = (uint8*)fifo + size * i; - uint8* next = (uint8*)mmap(base, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, s_shm_fd, 0); - if (next != base) - fprintf(stderr, "Fail to mmap contiguous segment\n"); - } - - return fifo; -} - -void fifo_free(void* ptr, size_t size, size_t repeat) -{ - ASSERT(s_shm_fd >= 0); - - if (s_shm_fd < 0) - return; - - munmap(ptr, size * repeat); - - close(s_shm_fd); - s_shm_fd = -1; -} - -#endif diff --git a/pcsx2/GS/stdafx.h b/pcsx2/GS/stdafx.h deleted file mode 100644 index 72858b278b..0000000000 --- a/pcsx2/GS/stdafx.h +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (C) 2007-2009 Gabest - * http://www.gabest.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently - -#pragma once - -#include "config.h" -#include "Pcsx2Types.h" - -#ifdef _WIN32 - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#else - -#include - -#endif - -#ifdef __x86_64__ -#define _M_AMD64 -#endif - -// put these into vc9/common7/ide/usertype.dat to have them highlighted - -typedef unsigned char uint8; -typedef signed char int8; -typedef unsigned short uint16; -typedef signed short int16; -typedef unsigned int uint32; -typedef signed int int32; -typedef unsigned long long uint64; -typedef signed long long int64; - -// xbyak compatibilities -typedef int64 sint64; -#define MIE_INTEGER_TYPE_DEFINED -#define XBYAK_ENABLE_OMITTED_OPERAND - -// stdc - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 4) -#include -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -// Don't un-indent our ifdefs -// clang-format off - -#ifdef _WIN32 - - // Note use GL/glcorearb.h on the future - // Requirements: - // * Update GSWndWGL::GetProcAddress to query 1.0 and 1.1 symbols - // * define all ENABLE_GL_VERSION_1_* - #include - #include - #include - #include "Renderers/OpenGL/GLLoader.h" - - #define DIRECTORY_SEPARATOR '\\' - -#else - - // Note use GL/glcorearb.h on the future - // Requirements: - // * Drop GLX that still include gl.h... - // EGL/OGL status on AMD GPU pro driver is unknown - // * define all ENABLE_GL_VERSION_1_* - #include - #include - #include "Renderers/OpenGL/GLLoader.h" - - #include // mkdir - - #define DIRECTORY_SEPARATOR '/' - -#endif - -#ifdef _MSC_VER - - #define EXPORT_C_(type) extern "C" type __stdcall - #define EXPORT_C EXPORT_C_(void) - - #define ALIGN_STACK(n) alignas(n) int dummy__; - -#else - - #ifndef __fastcall - #define __fastcall __attribute__((fastcall)) - #endif - - #define EXPORT_C_(type) extern "C" __attribute__((stdcall, externally_visible, visibility("default"))) type - #define EXPORT_C EXPORT_C_(void) - - #ifdef __GNUC__ - // GCC removes the variable as dead code and generates some warnings. - // Stack is automatically realigned due to SSE/AVX operations - #define ALIGN_STACK(n) (void)0; - - #else - - // TODO Check clang behavior - #define ALIGN_STACK(n) alignas(n) int dummy__; - - #endif - - -#endif - -#define countof(a) (sizeof(a) / sizeof(a[0])) - -#ifndef RESTRICT - - #ifdef __INTEL_COMPILER - - #define RESTRICT restrict - - #elif defined(_MSC_VER) - - #define RESTRICT __restrict - - #elif defined(__GNUC__) - - #define RESTRICT __restrict__ - - #else - - #define RESTRICT - - #endif - -#endif - -#define ASSERT assert - -/* -#ifdef _M_AMD64 - // Yeah let use mips naming ;) - #ifdef _WIN64 - #define a0 rcx - #define a1 rdx - #define a2 r8 - #define a3 r9 - #define t0 rdi - #define t1 rsi - #else - #define a0 rdi - #define a1 rsi - #define a2 rdx - #define a3 rcx - #define t0 r8 - #define t1 r9 - #endif -#endif -*/ - -// sse -#if defined(__GNUC__) - -// Convert gcc see define into GSdx (windows) define -#if defined(__AVX2__) - #if defined(__x86_64__) - #define _M_SSE 0x500 // TODO - #else - #define _M_SSE 0x501 - #endif -#elif defined(__AVX__) - #define _M_SSE 0x500 -#elif defined(__SSE4_1__) - #define _M_SSE 0x401 -#endif - -#endif - -#if !defined(_M_SSE) && (!defined(_WIN32) || defined(_M_AMD64) || defined(_M_IX86_FP) && _M_IX86_FP >= 2) - - #define _M_SSE 0x401 - -#endif - -#include -#include - -#ifndef _MM_DENORMALS_ARE_ZERO -#define _MM_DENORMALS_ARE_ZERO 0x0040 -#endif - -#define MXCSR (_MM_DENORMALS_ARE_ZERO | _MM_MASK_MASK | _MM_ROUND_NEAREST | _MM_FLUSH_ZERO_ON) - -#define _MM_TRANSPOSE4_SI128(row0, row1, row2, row3) \ -{ \ - __m128 tmp0 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0x44); \ - __m128 tmp2 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0xEE); \ - __m128 tmp1 = _mm_shuffle_ps(_mm_castsi128_ps(row2), _mm_castsi128_ps(row3), 0x44); \ - __m128 tmp3 = _mm_shuffle_ps(_mm_castsi128_ps(row2), _mm_castsi128_ps(row3), 0xEE); \ - (row0) = _mm_castps_si128(_mm_shuffle_ps(tmp0, tmp1, 0x88)); \ - (row1) = _mm_castps_si128(_mm_shuffle_ps(tmp0, tmp1, 0xDD)); \ - (row2) = _mm_castps_si128(_mm_shuffle_ps(tmp2, tmp3, 0x88)); \ - (row3) = _mm_castps_si128(_mm_shuffle_ps(tmp2, tmp3, 0xDD)); \ -} - -#include -#include - -#if _M_SSE >= 0x500 - - #include - -#endif - -#undef min -#undef max -#undef abs - -#if !defined(_MSC_VER) - // http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?view=markup - - __forceinline int _BitScanForward(unsigned long* const Index, const unsigned long Mask) - { -#if defined(__GCC_ASM_FLAG_OUTPUTS__) && 0 - // Need GCC6 to test the code validity - int flag; - __asm__("bsfl %k[Mask], %k[Index]" : [Index] "=r" (*Index), "=@ccz" (flag) : [Mask] "mr" (Mask)); - return flag; -#else - __asm__("bsfl %k[Mask], %k[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask) : "cc"); - return Mask ? 1 : 0; -#endif - } - - #ifdef __GNUC__ - - // gcc 4.8 define __rdtsc but unfortunately the compiler crash... - // The redefine allow to skip the gcc __rdtsc version -- Gregory - #define __rdtsc _lnx_rdtsc - //__forceinline unsigned long long __rdtsc() - __forceinline unsigned long long _lnx_rdtsc() - { - #if defined(__amd64__) || defined(__x86_64__) - unsigned long long low, high; - __asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high)); - return low | (high << 32); - #else - unsigned long long retval; - __asm__ __volatile__("rdtsc" : "=A"(retval)); - return retval; - #endif - } - - #endif - -#endif - -extern std::string format(const char* fmt, ...); - -extern void* vmalloc(size_t size, bool code); -extern void vmfree(void* ptr, size_t size); - -extern void* fifo_alloc(size_t size, size_t repeat); -extern void fifo_free(void* ptr, size_t size, size_t repeat); - -#ifdef ENABLE_VTUNE - - #include "jitprofiling.h" - - #ifdef _WIN32 - - #pragma comment(lib, "jitprofiling.lib") - - #endif - -#endif - -// Note: GL messages are present in common code, so in all renderers. - -#define GL_INSERT(type, code, sev, ...) \ - do \ - if (glDebugMessageInsert) glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, type, code, sev, -1, format(__VA_ARGS__).c_str()); \ - while(0); - -#if defined(_DEBUG) -# define GL_CACHE(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xFEAD, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) -#else -# define GL_CACHE(...) (void)(0); -#endif - -#if defined(ENABLE_TRACE_REG) && defined(_DEBUG) -# define GL_REG(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xB0B0, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) -#else -# define GL_REG(...) (void)(0); -#endif - -#if defined(ENABLE_EXTRA_LOG) && defined(_DEBUG) -# define GL_DBG(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xD0D0, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) -#else -# define GL_DBG(...) (void)(0); -#endif - -#if defined(ENABLE_OGL_DEBUG) - struct GLAutoPop - { - ~GLAutoPop() - { - if (glPopDebugGroup) - glPopDebugGroup(); - } - }; - - #define GL_PUSH_(...) do if (glPushDebugGroup) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0); - #define GL_PUSH(...) do if (glPushDebugGroup) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0); GLAutoPop gl_auto_pop; - #define GL_POP() do if (glPopDebugGroup) glPopDebugGroup(); while(0); - #define GL_INS(...) GL_INSERT(GL_DEBUG_TYPE_ERROR, 0xDEAD, GL_DEBUG_SEVERITY_MEDIUM, __VA_ARGS__) - #define GL_PERF(...) GL_INSERT(GL_DEBUG_TYPE_PERFORMANCE, 0xFEE1, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__) -#else - #define GL_PUSH_(...) (void)(0); - #define GL_PUSH(...) (void)(0); - #define GL_POP() (void)(0); - #define GL_INS(...) (void)(0); - #define GL_PERF(...) (void)(0); -#endif - -// Helper path to dump texture -extern const std::string root_sw; -extern const std::string root_hw; - -#ifndef __has_attribute -# define __has_attribute(x) 0 -#endif - -#ifdef __cpp_constinit -# define CONSTINIT constinit -#elif __has_attribute(require_constant_initialization) -# define CONSTINIT __attribute__((require_constant_initialization)) -#else -# define CONSTINIT -#endif