mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-09 22:20:08 +00:00
Additional code review feedback
This commit is contained in:
parent
d925b421de
commit
d0f5215608
@ -94,7 +94,7 @@ inline XMVECTOR XM_CALLCONV XMVectorPermute( FXMVECTOR V1, FXMVECTOR V2, uint32_
|
||||
|
||||
static const XMVECTORU32 three = { { { 3, 3, 3, 3 } } };
|
||||
|
||||
__declspec(align(16)) unsigned int elem[4] = { PermuteX, PermuteY, PermuteZ, PermuteW };
|
||||
XM_ALIGNED_DATA(16) unsigned int elem[4] = { PermuteX, PermuteY, PermuteZ, PermuteW };
|
||||
__m128i vControl = _mm_load_si128( reinterpret_cast<const __m128i *>(&elem[0]) );
|
||||
|
||||
__m128i vSelect = _mm_cmpgt_epi32( vControl, three );
|
||||
|
@ -13,9 +13,12 @@
|
||||
#error FMA4 not supported on ARM platform
|
||||
#endif
|
||||
|
||||
#include <DirectXMath.h>
|
||||
#include <ammintrin.h>
|
||||
|
||||
#include <DirectXMath.h>
|
||||
#ifdef __GNUC__
|
||||
#include <x86intrin.h>
|
||||
#endif
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
|
@ -1933,7 +1933,7 @@ namespace DirectX
|
||||
// separate math routine it would be reloaded.
|
||||
|
||||
#ifndef XMGLOBALCONST
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) && !defined(__MINGW32__)
|
||||
#define XMGLOBALCONST extern const __attribute__((weak))
|
||||
#else
|
||||
#define XMGLOBALCONST extern const __declspec(selectany)
|
||||
|
@ -7,13 +7,17 @@
|
||||
// http://go.microsoft.com/fwlink/p/?LinkId=262885
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#pragma warning( disable : 4616 4619 4265 4626 5039 )
|
||||
#pragma warning( disable : 4616 4619 4061 4265 4626 5039 )
|
||||
// C4616/C4619 #pragma warning warnings
|
||||
// C4061 numerator 'identifier' in switch of enum 'enumeration' is not explicitly handled by a case label
|
||||
// C4265 class has virtual functions, but destructor is not virtual
|
||||
// C4626 assignment operator was implicitly defined as deleted
|
||||
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4365)
|
||||
#include <d3d11_1.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include "DirectXSH.h"
|
||||
|
||||
@ -38,7 +42,7 @@ namespace
|
||||
{
|
||||
struct aligned_deleter { void operator()(void* p) { _aligned_free(p); } };
|
||||
|
||||
typedef std::unique_ptr<DirectX::XMVECTOR, aligned_deleter> ScopedAlignedArrayXMVECTOR;
|
||||
using ScopedAlignedArrayXMVECTOR = std::unique_ptr<DirectX::XMVECTOR, aligned_deleter>;
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// This code is lifted from DirectXTex http://go.microsoft.com/fwlink/?LinkId=248926
|
||||
|
@ -7,8 +7,9 @@
|
||||
// http://go.microsoft.com/fwlink/p/?LinkId=262885
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#pragma warning( disable : 4616 4619 4265 4626 5039 )
|
||||
#pragma warning( disable : 4616 4619 4061 4265 4626 5039 )
|
||||
// C4616/C4619 #pragma warning warnings
|
||||
// C4061 numerator 'identifier' in switch of enum 'enumeration' is not explicitly handled by a case label
|
||||
// C4265 class has virtual functions, but destructor is not virtual
|
||||
// C4626 assignment operator was implicitly defined as deleted
|
||||
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
|
||||
@ -38,7 +39,7 @@ namespace
|
||||
{
|
||||
struct aligned_deleter { void operator()(void* p) { _aligned_free(p); } };
|
||||
|
||||
typedef std::unique_ptr<DirectX::XMVECTOR, aligned_deleter> ScopedAlignedArrayXMVECTOR;
|
||||
using ScopedAlignedArrayXMVECTOR = std::unique_ptr<DirectX::XMVECTOR, aligned_deleter>;
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// This code is lifted from DirectXTex http://go.microsoft.com/fwlink/?LinkId=248926
|
||||
|
Loading…
Reference in New Issue
Block a user