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 } } };
|
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 vControl = _mm_load_si128( reinterpret_cast<const __m128i *>(&elem[0]) );
|
||||||
|
|
||||||
__m128i vSelect = _mm_cmpgt_epi32( vControl, three );
|
__m128i vSelect = _mm_cmpgt_epi32( vControl, three );
|
||||||
|
@ -13,9 +13,12 @@
|
|||||||
#error FMA4 not supported on ARM platform
|
#error FMA4 not supported on ARM platform
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <DirectXMath.h>
|
||||||
#include <ammintrin.h>
|
#include <ammintrin.h>
|
||||||
|
|
||||||
#include <DirectXMath.h>
|
#ifdef __GNUC__
|
||||||
|
#include <x86intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace DirectX
|
namespace DirectX
|
||||||
{
|
{
|
||||||
|
@ -1933,7 +1933,7 @@ namespace DirectX
|
|||||||
// separate math routine it would be reloaded.
|
// separate math routine it would be reloaded.
|
||||||
|
|
||||||
#ifndef XMGLOBALCONST
|
#ifndef XMGLOBALCONST
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__) && !defined(__MINGW32__)
|
||||||
#define XMGLOBALCONST extern const __attribute__((weak))
|
#define XMGLOBALCONST extern const __attribute__((weak))
|
||||||
#else
|
#else
|
||||||
#define XMGLOBALCONST extern const __declspec(selectany)
|
#define XMGLOBALCONST extern const __declspec(selectany)
|
||||||
|
@ -7,13 +7,17 @@
|
|||||||
// http://go.microsoft.com/fwlink/p/?LinkId=262885
|
// 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
|
// 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
|
// C4265 class has virtual functions, but destructor is not virtual
|
||||||
// C4626 assignment operator was implicitly defined as deleted
|
// C4626 assignment operator was implicitly defined as deleted
|
||||||
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
|
// 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>
|
#include <d3d11_1.h>
|
||||||
|
#pragma warning(pop)
|
||||||
|
|
||||||
#include "DirectXSH.h"
|
#include "DirectXSH.h"
|
||||||
|
|
||||||
@ -38,7 +42,7 @@ namespace
|
|||||||
{
|
{
|
||||||
struct aligned_deleter { void operator()(void* p) { _aligned_free(p); } };
|
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
|
// 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
|
// 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
|
// 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
|
// C4265 class has virtual functions, but destructor is not virtual
|
||||||
// C4626 assignment operator was implicitly defined as deleted
|
// C4626 assignment operator was implicitly defined as deleted
|
||||||
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
|
// 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); } };
|
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
|
// This code is lifted from DirectXTex http://go.microsoft.com/fwlink/?LinkId=248926
|
||||||
|
Loading…
Reference in New Issue
Block a user