Misc: Move GS preprocessor defs to main PCSX2 file

This commit is contained in:
TellowKrinkle 2021-08-29 16:43:59 -05:00 committed by tellowkrinkle
parent d2c1a4a7fb
commit 7435f76609
4 changed files with 38 additions and 37 deletions

View File

@ -15,6 +15,8 @@
#pragma once #pragma once
// clang-format off
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#define __linux__ #define __linux__
#endif #endif
@ -197,3 +199,37 @@ static const int __pagesize = PCSX2_PAGESIZE;
#define __ri __releaseinline #define __ri __releaseinline
#define __fi __forceinline #define __fi __forceinline
#define __fc __fastcall #define __fc __fastcall
// Makes sure that if anyone includes xbyak, it doesn't do anything bad
#define MIE_INTEGER_TYPE_DEFINED
#define XBYAK_ENABLE_OMITTED_OPERAND
#ifdef __x86_64__
#define _M_AMD64
#endif
#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
#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 ASSERT assert

View File

@ -41,10 +41,6 @@
#endif #endif
#ifdef __x86_64__
#define _M_AMD64
#endif
#include "Renderers/OpenGL/GLLoader.h" #include "Renderers/OpenGL/GLLoader.h"
#ifdef _WIN32 #ifdef _WIN32

View File

@ -19,9 +19,9 @@
#pragma once #pragma once
#ifdef _WIN32 #ifdef _WIN32
# define gsforceinline __forceinline #define gsforceinline __forceinline
#else #else
# define gsforceinline __forceinline __inline__ #define gsforceinline __forceinline __inline__
#endif #endif
enum Align_Mode enum Align_Mode

View File

@ -25,26 +25,11 @@ typedef unsigned long long uint64;
typedef signed long long int64; typedef signed long long int64;
typedef signed long long sint64; typedef signed long long sint64;
// Makes sure that if anyone includes xbyak, it doesn't do anything bad
#define MIE_INTEGER_TYPE_DEFINED
#define XBYAK_ENABLE_OMITTED_OPERAND
#include <cfloat> #include <cfloat>
// clang-format off // clang-format off
#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
#ifdef _WIN32 #ifdef _WIN32
inline std::string convert_utf16_to_utf8(const std::wstring& utf16_string) inline std::string convert_utf16_to_utf8(const std::wstring& utf16_string)
{ {
@ -88,19 +73,3 @@ inline FILE* px_fopen(const std::string& filename, const std::string& mode)
extern void* vmalloc(size_t size, bool code); extern void* vmalloc(size_t size, bool code);
extern void vmfree(void* ptr, size_t size); extern void vmfree(void* ptr, size_t size);
#define countof(a) (sizeof(a) / sizeof(a[0]))
#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 ASSERT assert