Skip to content

Latest commit

 

History

History
137 lines (117 loc) · 6.91 KB

coverage.md

File metadata and controls

137 lines (117 loc) · 6.91 KB

Coverage

Measured at commit 4f0f48c on 2026-11-07: NRI v191 with 21 patches, the Base payload, on Windows with VK and D3D12 on NVIDIA GeForce RTX 4070 SUPER. Tests: 693 total, 544 passed, 0 failed, 149 skipped.

These figures describe that commit only. pwsh tools/coverage.ps1 -Check, which the coverage workflow runs on every change to the binding, its tests, the patches or NRI, fails once any of them differs from it. Generated by pwsh tools/coverage.ps1; do not edit.

  • Bound surface: NRI's functions (every function-pointer field of the interface tables NRI fills, and every flat export) that SharpNRI's own code calls, and the fields of NRI's native structs that SharpNRI's idiomatic API reaches: a struct the public API takes or returns is exposed with all its fields; a struct the binding builds from its own managed forms counts only the fields binding code reads or writes; a data layout no NRI function takes (indirect arguments, instances, query results) counts through its public type. The raw tables and NriApi reach everything and are not counted. Read from the built assemblies (IL and PDB).
  • Test coverage: the lines of SharpNRI's hand-written C# that the test suite executes, child processes included; the generated L0 (dotnet/Native) is not counted. It depends on what the machine can run: CI's software adapters skip about half the tests.

Bound surface

Surface Bound Total % Call site run by the tests
NRI functions 252 252 100.0% 251 (99.6%)
Native struct fields 1646 1647 99.9%
Table Functions Bound Run by the tests
CoreInterface 118 118 118
DescriptorHeapInterface 5 5 5
flat exports 19 19 19
HelperInterface 4 4 4
ImguiInterface 4 4 4
LowLatencyInterface 4 4 4
MeshShaderInterface 2 2 2
RayTracingInterface 34 34 34
StreamerInterface 10 10 10
SwapChainInterface 7 7 7
UpscalerInterface 5 5 4
VideoInterface 18 18 18
WrapperD3D12Interface 7 7 7
WrapperVKInterface 15 15 15

Unbound functions: none.

Unbound fields: DeviceCreationDesc.enableD3D11CommandBufferEmulation.

Data layouts, counted through their public type: BottomLevelAabb, DispatchRaysIndirectDesc, DrawBaseDesc, DrawIndexedBaseDesc, MicromapTriangle, PipelineStatisticsDesc, TopLevelInstance, TransformMatrix.

Bound, but no test runs the call

NRI functions whose call sites in the binding never executed during the suite. The C# method is the binding's wrapper; the line is where it calls NRI.

Table NRI function Binding call site
UpscalerInterface GetUpscalerProps NriUpscalerExtension.GetUpscalerProps (dotnet/Extensions/NriUpscalerExtension.cs:395)

Test coverage

Area Lines Covered % Branches Taken %
descs/ (managed desc forms) 31 31 100.0% 0 0 -
L1 dotnet/Interop 212 207 97.6% 98 76 77.6%
L2 dotnet/Core 1154 1154 100.0% 400 367 91.8%
L3 dotnet/Extensions 1155 1130 97.8% 331 267 80.7%
testing/ (SharpNRI.Testing) 89 78 87.6% 58 37 63.8%
Total 2641 2600 98.4% 887 747 84.2%

Methods no test runs

Hand-written methods with lines, none of which executed. Property accessors appear as get_ / set_.

File Class Methods
dotnet/Extensions/NriUpscalerExtension.cs NriUpscalerExtension GetUpscalerProps
dotnet/Interop/NriObject.cs NriObject .cctor (lambda)
testing/NriTestDevice.cs NriTestDevice AdapterFor (lambda)

Files

File Lines Covered % Branches %
dotnet/Extensions/NriMeshShaderExtension.cs 14 12 85.7% 50.0%
testing/NriTestDevice.cs 89 78 87.6% 63.8%
dotnet/Extensions/NriUpscalerExtension.cs 118 107 90.7% 68.1%
dotnet/Extensions/NriLowLatencyExtension.cs 22 20 90.9% 50.0%
dotnet/Interop/MessageBridge.cs 35 32 91.4% 60.0%
dotnet/Extensions/NriDescriptorHeapExtension.cs 33 31 93.9% 83.3%
dotnet/Extensions/NriImguiExtension.cs 37 35 94.6% 50.0%
dotnet/Interop/AllocatorBridge.cs 45 43 95.6% 65.4%
dotnet/Extensions/NriSwapChainExtension.cs 69 67 97.1% 83.3%
dotnet/Extensions/NriStreamerExtension.cs 93 91 97.8% 91.7%
dotnet/Extensions/NriWrapperVKExtension.cs 81 80 98.8% 90.0%
dotnet/Extensions/NriVideoExtension.cs 369 368 99.7% 80.2%
descs/NriPipelineLayoutDesc.cs 16 16 100.0% -
descs/NriQueueFamilyD3D12Desc.cs 1 1 100.0% -
descs/NriVideoDescs.cs 6 6 100.0% -
descs/NriWindow.cs 8 8 100.0% -
dotnet/Core/Nri.cs 27 27 100.0% 50.0%
dotnet/Core/NriAdapter.cs 25 25 100.0% 66.7%
dotnet/Core/NriBuffer.cs 33 33 100.0% 83.3%
dotnet/Core/NriCommandAllocator.cs 11 11 100.0% -
dotnet/Core/NriCommandBuffer.cs 178 178 100.0% 100.0%
dotnet/Core/NriDescriptor.cs 8 8 100.0% -
dotnet/Core/NriDescriptorPool.cs 68 68 100.0% 90.0%
dotnet/Core/NriDevice.Create.cs 100 100 100.0% 100.0%
dotnet/Core/NriDevice.cs 135 135 100.0% 92.9%
dotnet/Core/NriDevice.Extensions.cs 60 60 100.0% 82.5%
dotnet/Core/NriDevice.RayTracing.cs 6 6 100.0% 100.0%
dotnet/Core/NriDevice.Wrapped.cs 101 101 100.0% 93.5%
dotnet/Core/NriDeviceOptions.cs 3 3 100.0% -
dotnet/Core/NriFence.cs 16 16 100.0% 100.0%
dotnet/Core/NriMemory.cs 27 27 100.0% 91.7%
dotnet/Core/NriPipeline.cs 128 128 100.0% 85.7%
dotnet/Core/NriPipelineLayout.cs 44 44 100.0% 91.7%
dotnet/Core/NriQueryPool.cs 10 10 100.0% -
dotnet/Core/NriQueue.cs 115 115 100.0% 97.7%
dotnet/Core/NriSharedHandle.cs 22 22 100.0% 100.0%
dotnet/Core/NriTexture.cs 37 37 100.0% 83.3%
dotnet/Extensions/NriRayTracingExtension.cs 267 267 100.0% 84.1%
dotnet/Extensions/NriWrapperD3D12Extension.cs 52 52 100.0% 75.0%
dotnet/Interop/InterfaceTable.cs 14 14 100.0% 100.0%
dotnet/Interop/NriException.cs 19 19 100.0% 100.0%
dotnet/Interop/NriObject.cs 26 26 100.0% 83.3%
dotnet/Interop/ScratchArena.cs 34 34 100.0% 100.0%
dotnet/Interop/Utf8.cs 39 39 100.0% 83.3%