mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #2972 from lioncash/align
General: Replace GC_ALIGN macros with alignas
This commit is contained in:
@ -26,9 +26,9 @@ static const int TEXTURE_KILL_THRESHOLD = 60;
|
||||
static const int TEXTURE_POOL_KILL_THRESHOLD = 3;
|
||||
static const int FRAMECOUNT_INVALID = 0;
|
||||
|
||||
TextureCache *g_texture_cache;
|
||||
TextureCache* g_texture_cache;
|
||||
|
||||
GC_ALIGNED16(u8 *TextureCache::temp) = nullptr;
|
||||
alignas(16) u8* TextureCache::temp = nullptr;
|
||||
size_t TextureCache::temp_size;
|
||||
|
||||
TextureCache::TexCache TextureCache::textures_by_address;
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
protected:
|
||||
TextureCache();
|
||||
|
||||
static GC_ALIGNED16(u8 *temp);
|
||||
alignas(16) static u8* temp;
|
||||
static size_t temp_size;
|
||||
|
||||
private:
|
||||
|
@ -12,7 +12,7 @@ enum
|
||||
TMEM_SIZE = 1024 * 1024,
|
||||
TMEM_LINE_SIZE = 32,
|
||||
};
|
||||
extern GC_ALIGNED16(u8 texMem[TMEM_SIZE]);
|
||||
alignas(16) extern u8 texMem[TMEM_SIZE];
|
||||
|
||||
enum TextureFormat
|
||||
{
|
||||
|
@ -5,7 +5,9 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
#include "VideoCommon/LookUpTables.h"
|
||||
#include "VideoCommon/sfont.inc"
|
||||
@ -16,7 +18,7 @@ static bool TexFmt_Overlay_Center = false;
|
||||
|
||||
// TRAM
|
||||
// STATE_TO_SAVE
|
||||
GC_ALIGNED16(u8 texMem[TMEM_SIZE]);
|
||||
alignas(16) u8 texMem[TMEM_SIZE];
|
||||
|
||||
int TexDecoder_GetTexelSizeInNibbles(int format)
|
||||
{
|
||||
|
@ -1065,8 +1065,8 @@ void _TexDecoder_DecodeImpl(u32 * dst, const u8 * src, int width, int height, in
|
||||
const __m128i dxt = _mm_loadu_si128((__m128i *)(src + sizeof(struct DXTBlock) * 2 * xStep));
|
||||
|
||||
// Copy the 2-bit indices from each DXT block:
|
||||
GC_ALIGNED16( u32 dxttmp[4] );
|
||||
_mm_store_si128((__m128i *)dxttmp, dxt);
|
||||
alignas(16) u32 dxttmp[4];
|
||||
_mm_store_si128((__m128i*)dxttmp, dxt);
|
||||
|
||||
u32 dxt0sel = dxttmp[1];
|
||||
u32 dxt1sel = dxttmp[3];
|
||||
@ -1204,10 +1204,10 @@ void _TexDecoder_DecodeImpl(u32 * dst, const u8 * src, int width, int height, in
|
||||
u32 *dst32 = ( dst + (y + z*4) * width + x );
|
||||
|
||||
// Copy the colors here:
|
||||
GC_ALIGNED16( u32 colors0[4] );
|
||||
GC_ALIGNED16( u32 colors1[4] );
|
||||
_mm_store_si128((__m128i *)colors0, mmcolors0);
|
||||
_mm_store_si128((__m128i *)colors1, mmcolors1);
|
||||
alignas(16) u32 colors0[4];
|
||||
alignas(16) u32 colors1[4];
|
||||
_mm_store_si128((__m128i*)colors0, mmcolors0);
|
||||
_mm_store_si128((__m128i*)colors1, mmcolors1);
|
||||
|
||||
// Row 0:
|
||||
dst32[(width * 0) + 0] = colors0[(dxt0sel >> ((0*8)+6)) & 3];
|
||||
|
@ -21,7 +21,7 @@ ARM64Reg stride_reg = X11;
|
||||
ARM64Reg arraybase_reg = X10;
|
||||
ARM64Reg scale_reg = X9;
|
||||
|
||||
static const float GC_ALIGNED16(scale_factors[]) =
|
||||
alignas(16) static const float scale_factors[] =
|
||||
{
|
||||
1.0 / (1ULL << 0), 1.0 / (1ULL << 1), 1.0 / (1ULL << 2), 1.0 / (1ULL << 3),
|
||||
1.0 / (1ULL << 4), 1.0 / (1ULL << 5), 1.0 / (1ULL << 6), 1.0 / (1ULL << 7),
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
#include "VideoCommon/XFMemory.h"
|
||||
|
||||
static float GC_ALIGNED16(g_fProjectionMatrix[16]);
|
||||
alignas(16) static float g_fProjectionMatrix[16];
|
||||
|
||||
// track changes
|
||||
static bool bTexMatricesChanged[2], bPosNormalMatrixChanged, bProjectionChanged, bViewportChanged;
|
||||
|
Reference in New Issue
Block a user