@@ -69,7 +69,7 @@ public static void main(String[] args) {
69
69
70
70
memPutInt (mesh .address () + ParShapesMesh .NPOINTS , uniqueVertices );
71
71
72
- System .out .println ("AFTER :" );
72
+ System .out .println ("\n AFTER :" );
73
73
System .out .println ("------" );
74
74
printStats (mesh );
75
75
@@ -84,14 +84,27 @@ private static void remap(FloatBuffer vertexBuffer, IntBuffer indexBuffer, Float
84
84
85
85
private static void printStats (ParShapesMesh mesh ) {
86
86
try (MemoryStack stack = stackPush ()) {
87
- MeshoptVertexCacheStatistics stats = meshopt_analyzeVertexCache (
87
+ MeshoptVertexCacheStatistics vcache = meshopt_analyzeVertexCache (
88
88
mesh .triangles (mesh .ntriangles () * 3 ),
89
89
mesh .npoints (),
90
- 16 , 0 , 0 ,
90
+ 32 , 32 , 32 , // NVIDIA
91
+ //14, 64, 128, // AMD
92
+ //128, 0, 0, // INTEL
91
93
MeshoptVertexCacheStatistics .malloc (stack )
92
94
);
93
- System .out .println ("ACMR: " + stats .acmr ());
94
- System .out .println ("ATVR: " + stats .atvr ());
95
+ System .out .println ("ACMR: " + vcache .acmr ());
96
+ System .out .println ("ATVR: " + vcache .atvr ());
97
+
98
+ MeshoptOverdrawStatistics overdraw = meshopt_analyzeOverdraw (
99
+ mesh .triangles (mesh .ntriangles () * 3 ),
100
+ mesh .points (mesh .npoints () * 3 ),
101
+ mesh .npoints (),
102
+ 3 * Float .BYTES ,
103
+ MeshoptOverdrawStatistics .malloc (stack )
104
+ );
105
+ System .out .println ("Overdraw: " + overdraw .overdraw ());
106
+ System .out .println ("Pixels covered: " + overdraw .pixels_covered ());
107
+ System .out .println ("Pixels shaded: " + overdraw .pixels_shaded ());
95
108
}
96
109
}
97
110
0 commit comments