mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-24 21:20:13 +00:00
Updated links
parent
3c5b522e44
commit
0b86b45d64
@ -3,41 +3,41 @@ These extensions are for use in 'guarded codepaths' where at runtime you would c
|
||||
> These optimizations are included with DirectXMath 3.09 or later if you build with ``/arch:AVX`` and/or ``/arch:AVX2`` since such binaries do not have 'guarded codepaths'. Be sure to call ``XMVerifyCPUSupport`` early to validate that your system supports the required instruction sets.
|
||||
|
||||
# SSE3
|
||||
``DirectXMathSSE3.h`` contains function variants for the [SSE3](http://en.wikipedia.org/wiki/SSE3) instruction set.
|
||||
``DirectXMathSSE3.h`` contains function variants for the [SSE3](http://wikipedia.org/wiki/SSE3) instruction set.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-sse3-and-ssse3/)
|
||||
|
||||
# SSSE3
|
||||
``DirectXMathBE.h`` contains a vector endian-swap function which makes use of the [SSSE3](http://en.wikipedia.org/wiki/SSSE3) instruction set.
|
||||
``DirectXMathBE.h`` contains a vector endian-swap function which makes use of the [SSSE3](http://wikipedia.org/wiki/SSSE3) instruction set.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-sse3-and-ssse3/)
|
||||
|
||||
# SSE4
|
||||
``DirectXMathSSE4.h`` contains a function variants for the [SSE4](http://en.wikipedia.org/wiki/SSE4), specifically SSE 4.1, instruction set.
|
||||
``DirectXMathSSE4.h`` contains a function variants for the [SSE4](http://wikipedia.org/wiki/SSE4), specifically SSE 4.1, instruction set.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-sse4-1-and-sse4-2/)
|
||||
|
||||
# AVX
|
||||
``DirectXMathAVX.h`` contains function variants for the [AVX](http://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instruction set.
|
||||
``DirectXMathAVX.h`` contains function variants for the [AVX](http://wikipedia.org/wiki/Advanced_Vector_Extensions) instruction set.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-avx/)
|
||||
|
||||
# AVX2
|
||||
``DirectXMathAVX2.h`` contains function variants for the [AVX](http://en.wikipedia.org/wiki/Advanced_Vector_Extensions) version 2 instruction set.
|
||||
``DirectXMathAVX2.h`` contains function variants for the [AVX](http://wikipedia.org/wiki/Advanced_Vector_Extensions) version 2 instruction set.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-avx2/)
|
||||
|
||||
# F16C
|
||||
``DirectXMathF16C.h`` contains function variants for the [F16C](http://en.wikipedia.org/wiki/F16C) instruction set, which is also required for AVX2.
|
||||
``DirectXMathF16C.h`` contains function variants for the [F16C](http://wikipedia.org/wiki/F16C) instruction set, which is also required for AVX2.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-f16c-and-fma/)
|
||||
|
||||
# FMA3
|
||||
``DirectXMathFMA3.h`` contains function variants for the Intel [FMA3](http://en.wikipedia.org/wiki/FMA_instruction_set) instruction set, which is also required for AVX2.
|
||||
``DirectXMathFMA3.h`` contains function variants for the Intel [FMA3](http://wikipedia.org/wiki/FMA_instruction_set) instruction set, which is also required for AVX2.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-f16c-and-fma/)
|
||||
|
||||
# FMA4
|
||||
``DirectXMathFMA4.h`` contains function variants for the AMD-specific [FMA4](http://en.wikipedia.org/wiki/FMA_instruction_set) instruction set.
|
||||
``DirectXMathFMA4.h`` contains function variants for the AMD-specific [FMA4](http://wikipedia.org/wiki/FMA_instruction_set) instruction set.
|
||||
|
||||
See [this post](https://walbourn.github.io/directxmath-f16c-and-fma/)
|
||||
|
2
FFT.md
2
FFT.md
@ -25,5 +25,5 @@ For FFTs with a number of samples less than or equal to 16 use [[FFT16]], [[FFT8
|
||||
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
||||
This performs a [split-radix FFT](https://en.wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
This performs a [split-radix FFT](https://wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
|
||||
|
2
FFT16.md
2
FFT16.md
@ -14,4 +14,4 @@ Fast Fourier Transform with sixteen samples.
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
||||
This performs a [split-radix FFT](https://en.wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
This performs a [split-radix FFT](https://wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
|
2
FFT4.md
2
FFT4.md
@ -15,4 +15,4 @@ Fast Fourier Transform with four samples.
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
||||
This performs a [split-radix FFT](https://en.wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
This performs a [split-radix FFT](https://wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
|
2
FFT8.md
2
FFT8.md
@ -14,4 +14,4 @@ Fast Fourier Transform with eight samples.
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
||||
This performs a [split-radix FFT](https://en.wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
||||
This performs a [split-radix FFT](https://wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2.
|
@ -13,7 +13,7 @@ Arranges Fast Fourier Transform function output by order of increasing frequency
|
||||
[in] The log base 2 of the FFT length in samples. uLog2Length must be greater than or equal to 2.
|
||||
|
||||
# Remarks
|
||||
The FFT functions generate output in bit-reversed order (the FFT uses a [split-radix FFT](https://en.wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2, which impacts the bit-reversal pattern). Use FFTUnswizzle to rearrange FFT function output into order of increasing frequency.
|
||||
The FFT functions generate output in bit-reversed order (the FFT uses a [split-radix FFT](https://wikipedia.org/wiki/Split-radix_FFT_algorithm), radix 4 and 2, which impacts the bit-reversal pattern). Use FFTUnswizzle to rearrange FFT function output into order of increasing frequency.
|
||||
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
||||
|
16
Home.md
16
Home.md
@ -31,7 +31,7 @@ using namespace DirectX;
|
||||
```
|
||||
|
||||
# Documentation
|
||||
The DirectXMath library is documented on [Microsoft Docs](https://docs.microsoft.com/en-us/windows/desktop/dxmath/directxmath-portal).
|
||||
The DirectXMath library is documented on [Microsoft Docs](https://docs.microsoft.com/windows/win32/dxmath/directxmath-portal).
|
||||
|
||||
> You can file PRs directly against the Microsoft Docs via the *Edit* button. The table-of-contents, overviews, and class descriptions are hosted on GitHub [win32](https://github.com/MicrosoftDocs/win32/tree/docs/desktop-src/dxmath), while the function reference is hosted on GitHub [sdk-api](https://github.com/MicrosoftDocs/sdk-api/tree/docs/sdk-api-src/content/directxmath).
|
||||
|
||||
@ -51,7 +51,7 @@ vcpkg install directxmath
|
||||
|
||||
> As an all inline header, there is no library. You still need to install it for each build triplet you use. ``arm``, ``arm64``, ``x86``, ``x64``, ``windows``, ``windows-static``, ``windows-static-md``, and ``uwp`` triplets are supported.
|
||||
|
||||
For [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10), use:
|
||||
For [Windows Subsystem for Linux](https://docs.microsoft.com/windows/wsl/install-win10), use:
|
||||
|
||||
```
|
||||
./vcpkg install directxmath:x64-linux
|
||||
@ -74,9 +74,9 @@ See [this blog series](https://walbourn.github.io/directxmath-sse-sse2-and-arm-n
|
||||
|
||||
## Architecture switch
|
||||
|
||||
If you build with ``/arch:AVX`` (``-mavx`` or ``-mf16c`` on clang/LLVM) such that your binary requires Intel [Advanced Vector Extensions](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions), DirectXMath 3.09 or later will make use of SSE3, SSE4.1, and AVX instructions.
|
||||
If you build with ``/arch:AVX`` (``-mavx`` or ``-mf16c`` on clang/LLVM) such that your binary requires Intel [Advanced Vector Extensions](https://wikipedia.org/wiki/Advanced_Vector_Extensions), DirectXMath 3.09 or later will make use of SSE3, SSE4.1, and AVX instructions.
|
||||
|
||||
> The primary benefit of building with ``/arch:AVX`` is the use of the [VEX prefix](https://en.wikipedia.org/wiki/VEX_prefix) in all generated SSE instructions.
|
||||
> The primary benefit of building with ``/arch:AVX`` is the use of the [VEX prefix](https://wikipedia.org/wiki/VEX_prefix) in all generated SSE instructions.
|
||||
|
||||
If you build with ``/arch:AVX2`` (``-mavx2`` on clang/LLVM) such that your binary requires Intel Advanced Vector Extensions 2, DirectXMath 3.09 or later will make use of SSE3, SSE4.1, AVX, and F16C instructions.
|
||||
|
||||
@ -88,9 +88,9 @@ The DirectXMath library is all inline and uses only Visual C++ intrinsics. There
|
||||
|
||||
# Migrating code
|
||||
|
||||
Details on moving from XNAMath to DirectXMath are covered in [Code Migration from the XNA Math Library](https://docs.microsoft.com/en-us/windows/desktop/dxmath/pg-xnamath-migration).
|
||||
Details on moving from XNAMath to DirectXMath are covered in [Code Migration from the XNA Math Library](https://docs.microsoft.com/windows/win32/dxmath/pg-xnamath-migration).
|
||||
|
||||
Moving from the legacy D3DX9/D3DX10 D3DXMath is covered in [Working with D3DXMath](https://docs.microsoft.com/en-us/windows/desktop/dxmath/pg-xnamath-migration-d3dx).
|
||||
Moving from the legacy D3DX9/D3DX10 D3DXMath is covered in [Working with D3DXMath](https://docs.microsoft.com/windows/win32/dxmath/pg-xnamath-migration-d3dx).
|
||||
|
||||
# Math conventions
|
||||
|
||||
@ -100,7 +100,7 @@ See [this blog post](https://seanmiddleditch.github.io/matrices-handedness-pre-a
|
||||
|
||||
# Calling convention
|
||||
|
||||
Be sure to read the [Microsoft Docs](https://docs.microsoft.com/en-us/windows/desktop/dxmath/pg-xnamath-internals#Call_Conventions) details on the calling convention types which are designed to deal with the various architectures and vector calling conventions. The best way to ensure you have them correct is to attempt to build your code with x86, x64, and ARM.
|
||||
Be sure to read the [Microsoft Docs](https://docs.microsoft.com/windows/win32/dxmath/pg-xnamath-internals#calling-conventions) details on the calling convention types which are designed to deal with the various architectures and vector calling conventions. The best way to ensure you have them correct is to attempt to build your code with x86, x64, and ARM.
|
||||
|
||||
# Language extensions
|
||||
|
||||
@ -108,7 +108,7 @@ DirectXMath is written using standard Intel-style intrinsics, which should be po
|
||||
|
||||
The DirectXMath library make use of two commonly implemented extensions to Standard C++:
|
||||
|
||||
* **anonymous structs**, which are widely supported and are part of the C11 standard. Note that the library also uses [anonymous unions](https://en.wikipedia.org/wiki/Union_type#Anonymous_union), but these are part of the C++ and C99 standard.
|
||||
* **anonymous structs**, which are widely supported and are part of the C11 standard. Note that the library also uses [anonymous unions](https://wikipedia.org/wiki/Union_type#Anonymous_union), but these are part of the C++ and C99 standard.
|
||||
* **#pragma once** rather than old-style #define based guards, but are [widely supported](https://en.m.wikipedia.org/wiki/Pragma_once)
|
||||
|
||||
> Because of these, DirectXMath is not compatible with Visual C++'s ``/Za`` switch which enforces ISO C89 / C++11. It does work with ``/permissive-``.
|
||||
|
26
SHMath.md
26
SHMath.md
@ -1,4 +1,4 @@
|
||||
This is an implementation of the original D3DXMath library [spherical harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics) math functions using DirectXMath.
|
||||
This is an implementation of the original D3DXMath library [spherical harmonics](https://wikipedia.org/wiki/Spherical_harmonics) math functions using DirectXMath.
|
||||
|
||||
See [this blog post](https://walbourn.github.io/spherical-harmonics-math/) for more information and details.
|
||||
|
||||
@ -6,40 +6,40 @@ See [this blog post](https://walbourn.github.io/spherical-harmonics-math/) for m
|
||||
All functions are in the C++ namespace ``DirectX``
|
||||
|
||||
## XMSHEvalDirection
|
||||
Evaluates the Spherical Harmonic basis functions. Equivalent to [D3DXSHEvalDirection](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205448.aspx) function.
|
||||
Evaluates the Spherical Harmonic basis functions. Equivalent to [D3DXSHEvalDirection](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshevaldirection) function.
|
||||
|
||||
## XMSHRotate
|
||||
Rotates SH vector by a rotation matrix. Equivalent to the [D3DXSHRotate](https://msdn.microsoft.com/en-us/library/windows/desktop/bb204992.aspx) function.
|
||||
Rotates SH vector by a rotation matrix. Equivalent to the [D3DXSHRotate](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-d3dxshrotate) function.
|
||||
|
||||
## XMSHRotateZ
|
||||
Rotates the SH vector in the Z axis by an angle. Equivalent to the [D3DXSHRotateZ](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205461.aspx) function.
|
||||
Rotates the SH vector in the Z axis by an angle. Equivalent to the [D3DXSHRotateZ](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshrotatez) function.
|
||||
|
||||
## XMSHAdd
|
||||
Adds two SH vectors. Equivalent to the [D3DXSHAdd](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205438.aspx) function.
|
||||
Adds two SH vectors. Equivalent to the [D3DXSHAdd](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshadd) function.
|
||||
|
||||
## XMSHScale
|
||||
Scales a SH vector. Equivalent to the [D3DXSHScale](https://msdn.microsoft.com/en-us/library/windows/desktop/bb204994.aspx) function.
|
||||
Scales a SH vector. Equivalent to the [D3DXSHScale](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-d3dxshscale) function.
|
||||
|
||||
## XMSHDot
|
||||
Computes the dot product of two SH vectors. Equivalent to the [D3DXSHDot](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205446.aspx) function.
|
||||
Computes the dot product of two SH vectors. Equivalent to the [D3DXSHDot](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshdot) function.
|
||||
|
||||
## XMSHMultiply, XMSHMultiply2/3/4/5/6
|
||||
Computes the product of two functions represented using SH. Equivalent to [D3DXSHMultiply2](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205454.aspx), [D3DXSHMultiply3](https://msdn.microsoft.com/en-us/library/windows/desktop/bb232906.aspx), [D3DXSHMultiply4](https://msdn.microsoft.com/en-us/library/windows/desktop/bb232907.aspx), [D3DXSHMultiply5](https://msdn.microsoft.com/en-us/library/windows/desktop/bb232908.aspx), and [D3DXSHMultiply6](https://msdn.microsoft.com/en-us/library/windows/desktop/bb232909.aspx).
|
||||
Computes the product of two functions represented using SH. Equivalent to [D3DXSHMultiply2](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshmultiply2), [D3DXSHMultiply3](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshmultiply3), [D3DXSHMultiply4](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshmultiply4), [D3DXSHMultiply5](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshmultiply5), and [D3DXSHMultiply6](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshmultiply6).
|
||||
|
||||
## XMSHEvalDirectionalLight
|
||||
Evaluates a directional light and returns spectral SH data. Equivalent to the [D3DXSHEvalDirectionalLight](https://msdn.microsoft.com/en-us/library/windows/desktop/bb204988.aspx) function.
|
||||
Evaluates a directional light and returns spectral SH data. Equivalent to the [D3DXSHEvalDirectionalLight](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-d3dxshevaldirectionallight) function.
|
||||
|
||||
## XMSHEvalSphericalLight
|
||||
Evaluates a spherical light and returns spectral SH data. Equivalent to the [D3DXEvalSphericalLight](https://msdn.microsoft.com/en-us/library/windows/desktop/bb205451.aspx) function.
|
||||
Evaluates a spherical light and returns spectral SH data. Equivalent to the [D3DXEvalSphericalLight](https://docs.microsoft.com/windows/win32/direct3d9/d3dxshevalsphericallight) function.
|
||||
|
||||
## XMSHEvalConeLight
|
||||
Evaluates a light that is a cone of constant intensity and returns spectral SH data. Equivalent to the [D3DXSHEvalConeLight](https://msdn.microsoft.com/en-us/library/windows/desktop/bb204986.aspx) function.
|
||||
Evaluates a light that is a cone of constant intensity and returns spectral SH data. Equivalent to the [D3DXSHEvalConeLight](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-d3dxshevalconelight) function.
|
||||
|
||||
## XMSHEvalHemisphereLight
|
||||
Evaluates a light that is a linear interpolant between two colors over the sphere. Equivalent to the [D3DXSHEvalHemisphereLight](https://msdn.microsoft.com/en-us/library/windows/desktop/bb204989.aspx) function.
|
||||
Evaluates a light that is a linear interpolant between two colors over the sphere. Equivalent to the [D3DXSHEvalHemisphereLight](https://docs.microsoft.com/windows/win32/direct3d10/d3d10-d3dxshevalhemispherelight) function.
|
||||
|
||||
## SHProjectCubeMap
|
||||
Projects a function represented in a cube map into spherical harmonics. Equivalent to the [D3DX11SHProjectCubeMap](https://msdn.microsoft.com/en-us/library/windows/desktop/ff476300.aspx) function.
|
||||
Projects a function represented in a cube map into spherical harmonics. Equivalent to the [D3DX11SHProjectCubeMap](https://docs.microsoft.com/windows/win32/direct3d11/d3dx11shprojectcubemap) function.
|
||||
|
||||
> For DirectX 11, you must do ``#include <d3d11.h>`` before ``#include <DirectXSH.h>``.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user