mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 19:50:13 +02:00
Make use of DirectXMath XM_ALIGNED_STRUCT macro
This commit is contained in:
parent
f3bad9f318
commit
fd13c32036
@ -104,7 +104,7 @@ namespace
|
||||
if (!DetermineEncoderSettings(result.format, pfEncode, blocksize, cflags))
|
||||
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
|
||||
|
||||
__declspec(align(16)) XMVECTOR temp[16];
|
||||
XM_ALIGNED_DATA(16) XMVECTOR temp[16];
|
||||
const uint8_t *pSrc = image.pixels;
|
||||
const uint8_t *pEnd = image.pixels + image.slicePitch;
|
||||
const size_t rowPitch = image.rowPitch;
|
||||
@ -263,7 +263,7 @@ namespace
|
||||
assert(bytesLeft > 0);
|
||||
size_t bytesToRead = std::min<size_t>(rowPitch, size_t(bytesLeft));
|
||||
|
||||
__declspec(align(16)) XMVECTOR temp[16];
|
||||
XM_ALIGNED_DATA(16) XMVECTOR temp[16];
|
||||
if (!_LoadScanline(&temp[0], pw, pSrc, bytesToRead, format))
|
||||
fail = true;
|
||||
|
||||
@ -441,7 +441,7 @@ namespace
|
||||
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
__declspec(align(16)) XMVECTOR temp[16];
|
||||
XM_ALIGNED_DATA(16) XMVECTOR temp[16];
|
||||
const uint8_t *pSrc = cImage.pixels;
|
||||
const size_t rowPitch = result.rowPitch;
|
||||
for (size_t h = 0; h < cImage.height; h += 4)
|
||||
@ -534,7 +534,7 @@ namespace DirectX
|
||||
// Scan blocks for non-opaque alpha
|
||||
static const XMVECTORF32 threshold = { { { 0.99f, 0.99f, 0.99f, 0.99f } } };
|
||||
|
||||
__declspec(align(16)) XMVECTOR temp[16];
|
||||
XM_ALIGNED_DATA(16) XMVECTOR temp[16];
|
||||
const uint8_t *pPixels = cImage.pixels;
|
||||
for (size_t h = 0; h < cImage.height; h += 4)
|
||||
{
|
||||
|
@ -119,6 +119,10 @@
|
||||
|
||||
#include <DirectXPackedVector.h>
|
||||
|
||||
#if (DIRECTX_MATH_VERSION < 315)
|
||||
#define XM_ALIGNED_DATA(x) __declspec(align(x))
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#include <Ole2.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user