Страница:
ComputeVertexCacheMissRate
Страницы
AttributeSort
Clean
CompactVB
ComputeCullData
ComputeInputLayout
ComputeMeshlets
ComputeNormals
ComputeSubsets
ComputeTangentFrame
ComputeVertexCacheMissRate
ConcatenateMesh
ConvertPointRepsToAdjacency
DirectXMesh
FinalizeIB
FinalizeVB
FinalizeVBAndPointReps
FlexibleVertexFormat
FormatUtilities
GenerateAdjacencyAndPointReps
GenerateGSAdjacency
Geometry formats
Home
IsValid
Meshconvert
OptimizeFaces
OptimizeFacesLRU
OptimizeVertices
ReorderIB
ReorderIBAndAdjacency
Resources
Utilities
VBO
VBReader
VBWriter
Validate
WaveFrontReader
WeldVertices
4
ComputeVertexCacheMissRate
Chuck Walbourn редактировал(а) эту страницу 2022-01-20 17:34:24 -08:00
Содержание
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 );
Parameters
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.
Example
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
Further reading
For Use
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Windows 7 Service Pack 1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
Architecture
- x86
- x64
- ARM64
For Development
- 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
Related Projects
DirectX Tool Kit for DirectX 11
DirectX Tool Kit for DirectX 12
Tools
See also
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.