-
Notifications
You must be signed in to change notification settings - Fork 152
ComputeVertexCacheMissRate
Chuck Walbourn edited this page Jan 21, 2022
·
4 revisions
DirectXMesh |
---|
Returns the average cache miss ratio (ACMR) and average triangle vertex resuse (ATVR) for the post-transform vertex cache.
void ComputeVertexCacheMissRate(
const uint16_t* indices, size_t nFaces, size_t nVerts,
size_t cacheSize, float& acmr, float& atvr );
void ComputeVertexCacheMissRate(
const uint32_t* indices, size_t nFaces, size_t nVerts,
size_t cacheSize, float& acmr, float& atvr );
Pass OPTFACES_V_DEFAULT
as the vertexCache to evaluate the 'device independent' optimization for OptimizeFaces.
The resulting acmr and atvr are returned as out parameters. They are set to -1.f if there was an error with the input values.
uint16_t g_fmCubeIndices16[ 12*3 ] =
{
3,1,0,
2,1,3,
6,4,5,
7,4,6,
11,9,8,
10,9,11,
14,12,13,
15,12,14,
19,17,16,
18,17,19,
22,20,21,
23,20,22
};
float acmr, atvr;
ComputeVertexCacheMissRate( cubeIndices, 12, 24, OPTFACES_V_DEFAULT, acmr, atvr );
// acmr is 2.f, atvr is 1.f
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- x86
- x64
- ARM64
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- GCC 10.5, 11.4, 12.3
- MinGW 12.2, 13.2
- CMake 3.20
DirectX Tool Kit for DirectX 11