Skip to content

Commit

Permalink
xrRender: use C++11 alignas instead of ALIGN macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Aug 11, 2017
1 parent 1077e04 commit 2d8294e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Layers/xrRender/R_Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class ECORE_API CBackend
u32 vb_stride;

// Pixel/Vertex constants
ALIGN(16) R_constants constants;
alignas(16) R_constants constants;
R_constant_table* ctable;

// Shaders/State
Expand Down
12 changes: 4 additions & 8 deletions src/Layers/xrRenderDX9/dx9r_constants_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
template <class T, u32 limit>
class R_constant_cache
{
private:
ALIGN(16) svector<T, limit> array;
alignas(16) svector<T, limit> array;
u32 lo, hi;

public:
Expand Down Expand Up @@ -35,13 +34,11 @@ class R_constant_array
typedef R_constant_cache<Ivector4, 16> t_i;
typedef R_constant_cache<BOOL, 16> t_b;

public:
ALIGN(16) t_f c_f;
alignas(16) t_f c_f;
// ALIGN(16) t_i c_i;
// ALIGN(16) t_b c_b;
BOOL b_dirty;

public:
t_f& get_array_f() { return c_f; }
// t_i& get_array_i () { return c_i; }
// t_b& get_array_b () { return c_b; }
Expand Down Expand Up @@ -140,12 +137,11 @@ class R_constant_array
class ECORE_API R_constants
{
public:
ALIGN(16) R_constant_array a_pixel;
ALIGN(16) R_constant_array a_vertex;
alignas(16) R_constant_array a_pixel;
alignas(16) R_constant_array a_vertex;

void flush_cache();

public:
// fp, non-array versions
ICF void set(R_constant* C, const Fmatrix& A)
{
Expand Down

0 comments on commit 2d8294e

Please sign in to comment.