NVIDIAGameWorks / NRI

MIT License
176 stars 26 forks source link

NVIDIA RENDER INTERFACE (NRI)

Status

NRI is a low-level abstract render interface which currently supports three backends: D3D11, D3D12 and Vulkan (VK). NRI has been designed to support all (at least major) low level features of D3D12 and VK APIs, but at the same time to simplify usage and reduce the amount of code needed (especially compared with VK). NRI is written in C++, but supports both C++ and C interfaces.

Goals:

Non-goals:

Key features:

C/C++ INTERFACE DIFFERENCES

C++ C
nri::Interface NriInterface
nri::Enum::MEMBER NriEnum_MEMBER
nri::CONST NRI_CONST
nri::nriFunction nriFunction
nri::Function nriFunction
Reference & Pointer *

ENTITIES

NRI D3D11 D3D12 VK
Device ID3D11Device ID3D12Device VkDevice
CommandBuffer ID3D11DeviceContext (deferred) ID3D12CommandList VkCommandBuffer
CommandQueue ID3D11DeviceContext (immediate) ID3D12CommandQueue VkQueue
Fence ID3D11Fence ID3D12Fence VkSemaphore (timeline)
CommandAllocator N/A ID3D12CommandAllocator VkCommandPool
Buffer ID3D11Buffer ID3D12Resource VkBuffer
Texture ID3D11Texture ID3D12Resource VkImage
Memory N/A ID3D12Heap VkDeviceMemory
Descriptor ID3D11*View D3D12_CPU_DESCRIPTOR_HANDLE Vk*View or VkSampler
DescriptorSet N/A N/A VkDescriptorSet
DescriptorPool N/A ID3D12DescriptorHeap VkDescriptorPool
PipelineLayout N/A ID3D12RootSignature VkPipelineLayout
Pipeline ID3D11*Shader and ID3D11*State ID3D12StateObject VkPipeline
AccelerationStructure N/A ID3D12Resource VkAccelerationStructure

BUILD INSTRUCTIONS

Notes:

CMAKE OPTIONS

VK only:

D3D12 only:

AGILITY SDK

Overview and Download sections can be found here.

D3D12 backend uses Agility SDK to get access to most recent D3D12 features. As soon as these features become available in the OS, installation of Agility SDK will be deprecated.

Installation steps:

SAMPLES OVERVIEW

NRI samples can be found here.

Samples:

LICENSE

NRI is licensed under the MIT License. This project includes NVAPI software. All uses of NVAPI software are governed by the license terms specified here.