17
17
#error DirectX Math requires C++
18
18
#endif
19
19
20
- #define DIRECTX_MATH_VERSION 307
20
+ #define DIRECTX_MATH_VERSION 308
21
21
22
22
23
23
#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) && (!_MANAGED) && (!_M_CEE) && (!defined(_M_IX86_FP) || (_M_IX86_FP > 1)) && !defined(_XM_NO_INTRINSICS_) && !defined(_XM_VECTORCALL_)
32
32
#define XM_CALLCONV __fastcall
33
33
#endif
34
34
35
+ #if defined(_MSC_VER) && (_MSC_VER < 1800)
36
+ #define XM_CTOR_DEFAULT {}
37
+ #else
38
+ #define XM_CTOR_DEFAULT =default ;
39
+ #endif
40
+
35
41
36
42
37
43
#if !defined(_XM_ARM_NEON_INTRINSICS_) && !defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_)
117
123
118
124
#if defined(_XM_NO_MOVNT_)
119
125
#define XM_STREAM_PS ( p, a ) _mm_store_ps( p, a )
126
+ #define XM_SFENCE ()
120
127
#else
121
128
#define XM_STREAM_PS ( p, a ) _mm_stream_ps( p, a )
129
+ #define XM_SFENCE () _mm_sfence()
122
130
#endif
123
131
124
132
#define XM_PERMUTE_PS ( v, c ) _mm_shuffle_ps( v, v, c )
@@ -413,7 +421,7 @@ __declspec(align(16)) struct XMMATRIX
413
421
XMVECTOR r[4 ];
414
422
#endif
415
423
416
- XMMATRIX () {}
424
+ XMMATRIX () XM_CTOR_DEFAULT
417
425
XMMATRIX (FXMVECTOR R0, FXMVECTOR R1, FXMVECTOR R2, CXMVECTOR R3) { r[0 ] = R0; r[1 ] = R1; r[2 ] = R2; r[3 ] = R3; }
418
426
XMMATRIX (float m00, float m01, float m02, float m03,
419
427
float m10, float m11, float m12, float m13,
@@ -453,7 +461,7 @@ struct XMFLOAT2
453
461
float x;
454
462
float y;
455
463
456
- XMFLOAT2 () {}
464
+ XMFLOAT2 () XM_CTOR_DEFAULT
457
465
XMFLOAT2 (float _x, float _y) : x(_x), y(_y) {}
458
466
explicit XMFLOAT2 (_In_reads_(2 ) const float *pArray) : x(pArray[0 ]), y(pArray[1 ]) {}
459
467
@@ -463,7 +471,7 @@ struct XMFLOAT2
463
471
// 2D Vector; 32 bit floating point components aligned on a 16 byte boundary
464
472
__declspec (align(16 )) struct XMFLOAT2A : public XMFLOAT2
465
473
{
466
- XMFLOAT2A () : XMFLOAT2 () {}
474
+ XMFLOAT2A () XM_CTOR_DEFAULT
467
475
XMFLOAT2A (float _x, float _y) : XMFLOAT2 (_x, _y) {}
468
476
explicit XMFLOAT2A (_In_reads_ (2 ) const float *pArray) : XMFLOAT2 (pArray) {}
469
477
@@ -477,7 +485,7 @@ struct XMINT2
477
485
int32_t x;
478
486
int32_t y;
479
487
480
- XMINT2 () {}
488
+ XMINT2 () XM_CTOR_DEFAULT
481
489
XMINT2 (int32_t _x, int32_t _y) : x(_x), y(_y) {}
482
490
explicit XMINT2 (_In_reads_(2 ) const int32_t *pArray) : x(pArray[0 ]), y(pArray[1 ]) {}
483
491
@@ -490,7 +498,7 @@ struct XMUINT2
490
498
uint32_t x;
491
499
uint32_t y;
492
500
493
- XMUINT2 () {}
501
+ XMUINT2 () XM_CTOR_DEFAULT
494
502
XMUINT2 (uint32_t _x, uint32_t _y) : x(_x), y(_y) {}
495
503
explicit XMUINT2 (_In_reads_(2 ) const uint32_t *pArray) : x(pArray[0 ]), y(pArray[1 ]) {}
496
504
@@ -505,7 +513,7 @@ struct XMFLOAT3
505
513
float y;
506
514
float z;
507
515
508
- XMFLOAT3 () {}
516
+ XMFLOAT3 () XM_CTOR_DEFAULT
509
517
XMFLOAT3 (float _x, float _y, float _z) : x(_x), y(_y), z(_z) {}
510
518
explicit XMFLOAT3 (_In_reads_(3 ) const float *pArray) : x(pArray[0 ]), y(pArray[1 ]), z(pArray[2 ]) {}
511
519
@@ -515,7 +523,7 @@ struct XMFLOAT3
515
523
// 3D Vector; 32 bit floating point components aligned on a 16 byte boundary
516
524
__declspec (align(16 )) struct XMFLOAT3A : public XMFLOAT3
517
525
{
518
- XMFLOAT3A () : XMFLOAT3 () {}
526
+ XMFLOAT3A () XM_CTOR_DEFAULT
519
527
XMFLOAT3A (float _x, float _y, float _z) : XMFLOAT3 (_x, _y, _z) {}
520
528
explicit XMFLOAT3A (_In_reads_ (3 ) const float *pArray) : XMFLOAT3 (pArray) {}
521
529
@@ -530,7 +538,7 @@ struct XMINT3
530
538
int32_t y;
531
539
int32_t z;
532
540
533
- XMINT3 () {}
541
+ XMINT3 () XM_CTOR_DEFAULT
534
542
XMINT3 (int32_t _x, int32_t _y, int32_t _z) : x(_x), y(_y), z(_z) {}
535
543
explicit XMINT3 (_In_reads_(3 ) const int32_t *pArray) : x(pArray[0 ]), y(pArray[1 ]), z(pArray[2 ]) {}
536
544
@@ -544,7 +552,7 @@ struct XMUINT3
544
552
uint32_t y;
545
553
uint32_t z;
546
554
547
- XMUINT3 () {}
555
+ XMUINT3 () XM_CTOR_DEFAULT
548
556
XMUINT3 (uint32_t _x, uint32_t _y, uint32_t _z) : x(_x), y(_y), z(_z) {}
549
557
explicit XMUINT3 (_In_reads_(3 ) const uint32_t *pArray) : x(pArray[0 ]), y(pArray[1 ]), z(pArray[2 ]) {}
550
558
@@ -560,7 +568,7 @@ struct XMFLOAT4
560
568
float z;
561
569
float w;
562
570
563
- XMFLOAT4 () {}
571
+ XMFLOAT4 () XM_CTOR_DEFAULT
564
572
XMFLOAT4 (float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) {}
565
573
explicit XMFLOAT4 (_In_reads_(4 ) const float *pArray) : x(pArray[0 ]), y(pArray[1 ]), z(pArray[2 ]), w(pArray[3 ]) {}
566
574
@@ -570,7 +578,7 @@ struct XMFLOAT4
570
578
// 4D Vector; 32 bit floating point components aligned on a 16 byte boundary
571
579
__declspec (align(16 )) struct XMFLOAT4A : public XMFLOAT4
572
580
{
573
- XMFLOAT4A () : XMFLOAT4 () {}
581
+ XMFLOAT4A () XM_CTOR_DEFAULT
574
582
XMFLOAT4A (float _x, float _y, float _z, float _w) : XMFLOAT4 (_x, _y, _z, _w) {}
575
583
explicit XMFLOAT4A (_In_reads_ (4 ) const float *pArray) : XMFLOAT4 (pArray) {}
576
584
@@ -586,7 +594,7 @@ struct XMINT4
586
594
int32_t z;
587
595
int32_t w;
588
596
589
- XMINT4 () {}
597
+ XMINT4 () XM_CTOR_DEFAULT
590
598
XMINT4 (int32_t _x, int32_t _y, int32_t _z, int32_t _w) : x(_x), y(_y), z(_z), w(_w) {}
591
599
explicit XMINT4 (_In_reads_(4 ) const int32_t *pArray) : x(pArray[0 ]), y(pArray[1 ]), z(pArray[2 ]), w(pArray[3 ]) {}
592
600
@@ -601,7 +609,7 @@ struct XMUINT4
601
609
uint32_t z;
602
610
uint32_t w;
603
611
604
- XMUINT4 () {}
612
+ XMUINT4 () XM_CTOR_DEFAULT
605
613
XMUINT4 (uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) : x(_x), y(_y), z(_z), w(_w) {}
606
614
explicit XMUINT4 (_In_reads_(4 ) const uint32_t *pArray) : x(pArray[0 ]), y(pArray[1 ]), z(pArray[2 ]), w(pArray[3 ]) {}
607
615
@@ -623,7 +631,7 @@ struct XMFLOAT3X3
623
631
float m[3 ][3 ];
624
632
};
625
633
626
- XMFLOAT3X3 () {}
634
+ XMFLOAT3X3 () XM_CTOR_DEFAULT
627
635
XMFLOAT3X3 (float m00, float m01, float m02,
628
636
float m10, float m11, float m12,
629
637
float m20, float m21, float m22);
@@ -651,7 +659,7 @@ struct XMFLOAT4X3
651
659
float m[4 ][3 ];
652
660
};
653
661
654
- XMFLOAT4X3 () {}
662
+ XMFLOAT4X3 () XM_CTOR_DEFAULT
655
663
XMFLOAT4X3 (float m00, float m01, float m02,
656
664
float m10, float m11, float m12,
657
665
float m20, float m21, float m22,
@@ -668,7 +676,7 @@ struct XMFLOAT4X3
668
676
// 4x3 Matrix: 32 bit floating point components aligned on a 16 byte boundary
669
677
__declspec (align(16 )) struct XMFLOAT4X3A : public XMFLOAT4X3
670
678
{
671
- XMFLOAT4X3A () : XMFLOAT4X3 () {}
679
+ XMFLOAT4X3A () XM_CTOR_DEFAULT
672
680
XMFLOAT4X3A (float m00, float m01, float m02,
673
681
float m10, float m11, float m12,
674
682
float m20, float m21, float m22,
@@ -698,7 +706,7 @@ struct XMFLOAT4X4
698
706
float m[4 ][4 ];
699
707
};
700
708
701
- XMFLOAT4X4 () {}
709
+ XMFLOAT4X4 () XM_CTOR_DEFAULT
702
710
XMFLOAT4X4 (float m00, float m01, float m02, float m03,
703
711
float m10, float m11, float m12, float m13,
704
712
float m20, float m21, float m22, float m23,
@@ -714,7 +722,7 @@ struct XMFLOAT4X4
714
722
// 4x4 Matrix: 32 bit floating point components aligned on a 16 byte boundary
715
723
__declspec (align(16 )) struct XMFLOAT4X4A : public XMFLOAT4X4
716
724
{
717
- XMFLOAT4X4A () : XMFLOAT4X4 () {}
725
+ XMFLOAT4X4A () XM_CTOR_DEFAULT
718
726
XMFLOAT4X4A (float m00, float m01, float m02, float m03,
719
727
float m10, float m11, float m12, float m13,
720
728
float m20, float m21, float m22, float m23,
@@ -1672,6 +1680,7 @@ XMGLOBALCONST XMVECTORF32 g_XMNegIdentityR2 = {0.0f, 0.0f,-1.0f, 0.0f};
1672
1680
XMGLOBALCONST XMVECTORF32 g_XMNegIdentityR3 = {0 .0f , 0 .0f , 0 .0f ,-1 .0f };
1673
1681
XMGLOBALCONST XMVECTORU32 g_XMNegativeZero = {0x80000000 , 0x80000000 , 0x80000000 , 0x80000000 };
1674
1682
XMGLOBALCONST XMVECTORU32 g_XMNegate3 = {0x80000000 , 0x80000000 , 0x80000000 , 0x00000000 };
1683
+ XMGLOBALCONST XMVECTORU32 g_XMMaskXY = {0xFFFFFFFF , 0xFFFFFFFF , 0x00000000 , 0x00000000 };
1675
1684
XMGLOBALCONST XMVECTORU32 g_XMMask3 = {0xFFFFFFFF , 0xFFFFFFFF , 0xFFFFFFFF , 0x00000000 };
1676
1685
XMGLOBALCONST XMVECTORU32 g_XMMaskX = {0xFFFFFFFF , 0x00000000 , 0x00000000 , 0x00000000 };
1677
1686
XMGLOBALCONST XMVECTORU32 g_XMMaskY = {0x00000000 , 0xFFFFFFFF , 0x00000000 , 0x00000000 };
@@ -1779,6 +1788,12 @@ XMGLOBALCONST XMVECTORF32 g_XMLogEst6 = {+0.057148f, +0.057148f, +0.05
1779
1788
XMGLOBALCONST XMVECTORF32 g_XMLogEst7 = {-0 .010578f , -0 .010578f , -0 .010578f , -0 .010578f };
1780
1789
XMGLOBALCONST XMVECTORF32 g_XMLgE = {+1 .442695f , +1 .442695f , +1 .442695f , +1 .442695f };
1781
1790
XMGLOBALCONST XMVECTORF32 g_XMInvLgE = {+6 .93147182e-1f , +6 .93147182e-1f , +6 .93147182e-1f , +6 .93147182e-1f };
1791
+ XMGLOBALCONST XMVECTORF32 g_UByteMax = {255 .0f , 255 .0f , 255 .0f , 255 .0f };
1792
+ XMGLOBALCONST XMVECTORF32 g_ByteMin = {-127 .0f , -127 .0f , -127 .0f , -127 .0f };
1793
+ XMGLOBALCONST XMVECTORF32 g_ByteMax = {127 .0f , 127 .0f , 127 .0f , 127 .0f };
1794
+ XMGLOBALCONST XMVECTORF32 g_ShortMin = {-32767 .0f , -32767 .0f , -32767 .0f , -32767 .0f };
1795
+ XMGLOBALCONST XMVECTORF32 g_ShortMax = {32767 .0f , 32767 .0f , 32767 .0f , 32767 .0f };
1796
+ XMGLOBALCONST XMVECTORF32 g_UShortMax = {65535 .0f , 65535 .0f , 65535 .0f , 65535 .0f };
1782
1797
1783
1798
/* ***************************************************************************
1784
1799
*
0 commit comments