Skip to content

v170

Choose a tag to compare

@dzhdanNV dzhdanNV released this 02 Jun 06:39
· 683 commits to main since this release

v170:

HIGHLIGHTS:

  • Core: added ALLOW_UPDATE_AFTER_SET support (a must have VK UPDATE_AFTER_BIND feature)
  • Core: dynamic vertex stride (moved from VertexStreamDesc to CmdSetVertexBuffers)
  • Core: added ability to create multiple different structured buffer views for a single buffer
  • Core: added CmdZeroBuffer, working with a resource (not a descriptor), implemented using copies (like vkCmdFillBuffer)
  • Core: fixed multisampling
  • Core: PlaneBits improvements
  • VK: storage format decoration clarifications
  • Imgui: added extension NRIImgui for comfortable ImGui rendering (CMake option NRI_ENABLE_IMGUI_EXTENSION, no ImGui dependency)
  • Streamer: simplified and improved (with breaking changes)
  • RayTracing: opacity micromap support (DXR 1.2 + VK EXT, not NVAPI)
  • RayTracing: numerous improvements (with breaking changes)
  • numerous improvements and bug fixes, including thread safety (samples work on NVIDIA, AMD, INTEL and APPLE)

BREAKING CHANGES:

  • Core: NRICompatibility.hlsli renamed to NRI.hlsl
  • Core: CmdClearStorageBuffer and CmdClearStorageTexture merged into CmdClearStorage
  • Core: CmdSetVertexBuffers arguments grouped into VertexBufferDesc for comfortable use (added stride, which was removed from VertexStreamDesc)
  • Core: changed order of buffer/texture and memory in [Buffer/Texture]MemoryBindingDesc to avoid confusion what offset is for
  • Core: bools in PipelineLayoutDesc are grouped into PipelineLayoutBits flags
  • Core: DeviceDesc fields grouped into structs: aaaBbb => aaa.bbb (mostly)
  • Core: DeviceDesc::isAaaSupported => features.aaa
  • Core: DeviceDesc::isShaderAaaSupported => shaderFeatures.aaa
  • Streamer: breaking changes (easy to follow)
  • Wrappers: nriCreateDeviceFromVkDevice renamed to nriCreateDeviceFromVKDevice to match the style
  • SwapChain: AcquireNextSwapChainTexture renamed to AcquireNextTexture (can return OUT_OF_DATE in VK)
  • SwapChain: breaking changes to respect explicit synchronization between SwapChain textures and rendering (explained usage, see samples)
  • RayTracing: breaking changes (easy to follow)
  • DeviceCreation: shaderExtRegister => d3dShaderExtRegister

DETAILS:

  • Core: added Result::INVALID_AGILITY_SDK, explained Result values
  • Core: added comments Threadsafe: yes/no/?, clarified implicit expectations
  • Core: added comments for buffer and texture usage bits
  • Core: added comments clarifying R, W, RW access
  • Core: added specialized AccessBits::SCRATCH_BUFFER flag (which can be used with StageBits::ACCELERATION_STRUCTURE)
  • Core: added planeBits to TextureRegionDesc
  • Core: added NRI_FORMAT(format) macro to NRI.hlsl, explained usage
  • Core: added CmdZeroBuffer (copy based, matches vkCmdFillBuffer)
  • Core: added structureStride to BufferViewDesc to allow passing individual structure strides per buffer view (instead of using the predefined one at a buffer creation time)
  • Core: added C (in addition to C++) detection to NRI.hlsl
  • Core: added ALLOW_UPDATE_AFTER_SET flag for PipelineLayout, DescriptorPool and DescriptorRange (no breaking changes, descriptors/data already assumed static while set at execute without this addition)
  • Core: added UpdateAfterSet limits to DeviceDesc (can be significantly greater than non-UpdateAfterSet limits)
  • Core: added tiers.resourceBinding to DeviceDesc
  • Core: added SHADER_BINDING_TABLE to AccessBits since it's a separate access flag in VK
  • Core: added features.pipelineStatistics to DeviceDesc since it can be unsupported on some platforms
  • Core: added availability macro to each extension (unlocks some programmatic magic)
  • Core: clarified AccelerationStructure compatible vertex formats in the main header
  • Core: clarified Map/Unmap usage (for modern GAPIs these functions do not invoke any GAPI calls)
  • Core: clarified CmdClearStorage
  • Core: relaxed AbortExecution, which is not called in some cases (see Result comments)
  • Core: regrouped AccessBits and Layout (no functional changes)
  • Core: grouped unreadable wall of fields in DeviceDesc into structs (lots of 1:1 breaking changes)
  • Core: fixed incorrect videoMemorySize detection for other adapters (not DESCRETE and not INTEGRATED)
  • Core: improved AdapterDesc sorting algorithm
  • Core: matched logic for nriEnumerateAdapters across GAPIs (simplification)
  • Core: made ShadingRateCombiner::KEEP the 1st in enum to match VK default behavior if not provided
  • Core: explained usage of structureStride
  • Core: reduced DeviceDesc size
  • Core: major & minor versions merged into just version
  • Imgui: added new extension
  • Helper: fixed UploadData alignment issues after removing hardcoded embedded alignment
  • Helper: improved UploadData performance
  • Helper: filtered out redundant barriers in DataUpload
  • Helper: fixed FormatProps::isSigned for SNORM formats
  • Streamer: fixed alignment issues- Streamer: fixed multi-threaded access
  • Streamer: added dynamicBufferSize to StreamerDesc to allow static allocation of the dynamic buffer (and disable re-allocation)
  • Streamer: utilized more flexible ResourceAllocator extension
  • Streamer: removed AddUpdateRequest-CopyStreamerUpdateRequests combo with the requirement to keep CPU memory in-between, now Stream[Buffer/Texture]Data immediately streams data and returns buffer-offset pair for immediate use
  • Upscaler: fixed multi-threaded access (actually it's a lie since most of underlying SDKs are single-threaded)
  • Upscaler: optimized descriptor sets updates for NIS
  • Wrappers: minor improvements for D3D, added acceleration structure flags
  • SwapChain: removed incorrectly used internal sempahores, added explicit ones (explained usage)
  • RayTracing: added opacity micromap support (DXR 1.2 or VK KHR extension, not NVAPI)
  • RayTracing: added enableD3D12RayTracingValidation to DeviceCreationDesc
  • RayTracing: added optional optimizedSize for AccelerationStructure and Micromap needed for copy and compaction
  • RayTracing: extended query type to query current and compacted sizes of AccelerationStructures and Micromaps
  • RayTracing: lots of under the hood improvements
  • DeviceCreation: added d3dZeroBufferSize needed for CmdZeroBuffer implementation (may be improved for D3D12)
  • ResourceAllocator: added basic memory leaks reporting in DEBUG mode
  • D3D11/D3D12/VK: fixed multi-threaded access to DescriptorPool and CommandAllocator
  • D3D11/D3D12/VK: reduced size of SwapChain
  • D3D11/D3D12/VK: reduced size of DescriptorSet to 32-40 bytes and eliminated dynamic memory allocations
  • D3D11/D3D12/VK: all DescriptorSet get allocated once during DescriptorPool creation
  • D3D12: re-enabled message D3D12_MESSAGE_ID_COMMAND_LIST_STATIC_DESCRIPTOR_RESOURCE_DIMENSION_MISMATCH for AgilitySDK (since modern validation does understand AS used outside of RayGen shaders)
  • D3D12: added planeBits handling in enhanced barriers
  • D3D12: added auto handling of MSAA- (4Mb) and non-MSAA (64 Kb) memory heap alignment (MSAA textures transparently go into a special MemoryType)
  • D3D12: added tight alignment support (https://devblogs.microsoft.com/directx/agility-sdk-1-716-0-preview-tight-alignment/)
  • D3D12: added missing locks for command signatures creation
  • D3D12: relaxed GetSubresourceIndex calculations (same results, no asserts)
  • D3D12: fixed NRI_AGILITY_SDK_DIR usage
  • D3D12: fixed COLOR_ATTACHMENT descriptor creation for an MSAA texture
  • D3D12: hooked up message callback mechanism (if supported)
  • D3D12: fixed incorrect rayTracingShaderGroupIdentifierSize and rayTracingShaderTableMaxStride
  • D3D12: fixed WriteShaderGroupIdentifiers
  • D3D12: implemented persistent mapping to reach parity with VK
  • D3D12: improved D3D12_HEAP_TYPE_CUSTOM support
  • D3D12: properly queried ray tracing position fetch feature
  • D3D12: fixed query type for devices not supporting mesh shaders
  • D3D12: hooked up structureStride from BufferViewDesc
  • D3D12: implemented DEVICE_UPLOAD to HOST_UPLOAD fallback for ResourceAllocator
  • D3D12: reduced size of DescriptorD3D12
  • D3D12: fixed StageBits::ACCELERATION_STRUCTURE flag by adding missing D3D12_BARRIER_SYNC_EMIT_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO flag
  • D3D12: unregistered callbacks in Device destructor (could lead to crashes)
  • D3D12: fixed not working WriteAccelerationStructuresSizes and CopyQueries (for acceleration structure sizes)
  • D3D12: improved code around QueryPool internal buffer used for acceleration structure sizes
  • D3D12: added optional support for optimized clear values (PR #142)
  • D3D12/VK: added forgotten acceleration structure flags here and there
  • D3D12/VK: respected allowed 0 values in TextureDesc passed to AllocateTexture
  • D3D12/VK: reported message ID in message callbacks
  • D3D12/D3D11: disabled misused ForcedSampleCount (no analog in VK)
  • D3D12/D3D11: properly queried shader clock feature
  • VK: fixed uploadBufferTextureSliceAlignment calculation
  • VK: added missing VkRayTracingPipelineInterfaceCreateInfoKHR for ray tracing pipeline creation
  • VK: silently clamp SwapChainDesc::textureNum to the supported range, returned by GetPhysicalDeviceSurfaceCapabilities2KHR
  • VK: improved surface formats sorting in SwapChain
  • VK: fixed VK_USE_PLATFORM_X macro usage
  • VK: fixed wrong BottomLevelGeometryDesc conversion
  • VK: fixed inability to use NULL for VertexInputDesc
  • VK: increased device creation robustness if some queue families are not supported
  • VK: getting rid of some deprecated names
  • VK: added proper VK memory flags for host visible memory for VMA
  • VK: properly muted some informational messages caused during vkCreateInstance
  • VK: removed storage read/write without format error suppression
  • VK: clarified NRI_FORMAT usage (unknown is allowed, except some mobile devices)
  • VK: added storageReadWithoutFormat and storageWriteWithoutFormat shader features to DeviceDesc
  • D3D11: allowed disobeying of the spec to allow to create multiple different structured views for a single buffer by utilizing RAW buffers under the hood (D3D11_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH error message is silently suppressed, since the solution works). This behavior is only enabled if a buffer has been created with structureStride = 4. Other sizes (>4) follow the spec and initialize a structured buffer as usual. In other words SB views are treated as RAW if a RAW functionality has been requested during creation
  • D3D11: fixed D3D11_MAPPED_SUBRESOURCE data usage, if pitch is 0 on some HW (but why?)
  • D3D11: fixed GetData usage in QueryPool (must be wait on)
  • NONE: simplified code
  • Validation: return 0-initialized object pointers on errors
  • Validation: various improvements
  • CMake: NRI_ENABLE_AGILITY_SDK_SUPPORT made visible in the parent project
  • CMake: Agility SDK version made CACHE STRING to become in CMake-GUI (like other options)
  • CMake: fixed path to Agility SDK
  • CMake: fixed detection of wayland-client.h
  • CMake: NRI.hlsl added to Include folder
  • CMake: removed unnecessary SSE4.1 flag
  • CMake: updated to v3.30
  • CMake: switched to URL instead of GIT_REPOSITORY almost everywhere to avoid getting .git folders
  • CMake: original archives get removed after deployment to respect disk space
  • CMake: added X11/Wayland availability auto-detection
  • Actions: greatly reduced tasks time
  • updated ShaderMake removing the requirement to install latest and greatest Windows SDK (AgilitySDK is auto downloaded by NRI, DXC is auto downloaded by ShaderMake)
  • added a lot of missing NRI_CALL
  • lots of changes to respect nri:: usage (not needed in .hpp files)
  • resolved some TODOs
  • improved validation
  • improved docs
  • improved robustness
  • updated README
  • polishing