Build and run on AMD RDNA4 / RADV (Linux, -DUSE_DLSS=OFF) - #33
Open
ZJLi2013 wants to merge 3 commits into
Open
Conversation
The src/*.* glob unconditionally pulled in src/dlss_*.cpp, which require the NGX headers, so USE_DLSS=OFF still failed to build on platforms without the NVIDIA NGX SDK (e.g. AMD/RADV). Exclude the DLSS sources from the glob (they are already added explicitly in the USE_DLSS CMake block). Also, gaussian_splatting_ui.cpp read m_dlss.isEnabled() at 4 sites outside the USE_DLSS guards, but m_dlss only exists under USE_DLSS -> compile error. Add a small isDlssEnabled() helper that returns false when DLSS is compiled out and use it at those sites. Co-authored-by: Cursor <cursoragent@cursor.com>
Projects authored on Windows store asset paths with backslash separators (e.g. "data\scene\cloud.ply"). On POSIX, std::filesystem treats '\' as a regular filename character, so the asset fails to resolve and the scene loads empty (blank render) with no error. Normalize separators to '/' in makeAbsolutePath(); '/' is also accepted on Windows, keeping projects portable. Co-authored-by: Cursor <cursoragent@cursor.com>
Passing --saveImage as a bare command-line argument (outside a benchmark SEQUENCE) runs the save at parse time, before any frame is rendered. The G-buffers are created lazily on the first onResize(), so getAllDumpableBuffers() dereferenced not-yet-created color images and crashed with a SIGSEGV. Return an empty buffer list when the G-buffer size is still 0x0 so callers no-op instead of crashing. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
hello @ZJLi2013 , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I tried
vk_gaussian_splattingon AMD hardware (Radeon AI PRO R9700, RDNA4/gfx1201, RADV / Mesa 25.2.8, no NVIDIA runtime) and hit three small, unrelated issues that blocked a clean build and headless run on Linux without DLSS. This PR fixes all three; with them the raster, hardware ray tracing, and hybrid pipelines all build and render on RADV (vkCreateRayTracingPipelinesKHRsucceeds). The changes are platform-agnostic and do not alter behavior whenUSE_DLSSis enabled.The work is split into three focused commits so they can be reviewed (or cherry-picked) independently.
Tested on: base
dfb3c79(nvpro_core2eb7c2f2), LunarG Vulkan SDK 1.4.350.1, Ubuntu, headless,-DUSE_DLSS=OFF -DDISABLE_DEFAULT_SCENE=ON.Changes
1. Build with
-DUSE_DLSS=OFF(no NVIDIA NGX SDK)Two things break the build without the NGX SDK even with DLSS disabled:
file(GLOB SOURCE_FILES src/*.*)unconditionally picks upsrc/dlss_*.cpp(which include NGX headers). These files are already added explicitly in theif(USE_DLSS)block, so the glob only ever double-adds them — excluding them from the glob is safe:m_dlssis declared only under#if defined(USE_DLSS), butgaussian_splatting_ui.cppreadsm_dlss.isEnabled()at four sites outside the guards → compile error. Added a smallisDlssEnabled()helper that returnsfalsewhen compiled without DLSS, and used it at those sites:2. Portable asset paths in
.vkgsprojectsSample projects store asset paths with Windows backslashes (e.g.
data\teleportour\Winter-Garden-view2.ply). On POSIX,std::filesystemtreats\as a normal filename character, so assets fail to resolve and the scene loads empty (blank render, no error). Normalizing separators to/in the single choke pointmakeAbsolutePath()fixes it and stays valid on Windows too:3. Headless
--saveImagebefore the first framePassing
--saveImage <file>as a bare command-line argument (outside a benchmarkSEQUENCE) crashes with SIGSEGV: the save runs at parse time, before any frame is rendered, and the G-buffers are created lazily on the firstonResize(), sogetAllDumpableBuffers()dereferences not-yet-created color images. Returning an empty list when the G-buffer is still0x0makes it fail gracefully (theSEQUENCE-based path is unchanged):If you'd prefer this to defer the save until after the first frame rather than no-op, I'm happy to adjust — that felt like a larger behavior change than this minimal guard.
Testing
-DUSE_DLSS=OFF -DDISABLE_DEFAULT_SCENE=ONon RADV/Mesa 25.2.8 (RDNA4), LunarG SDK 1.4.350.1..vkgssample project (15.3M-gaussian splat + OBJ meshes) loads and renders after the path fix.USE_DLSS, the glob filter is a no-op (those sources are added explicitly), and the path /saveImagefixes are platform-agnostic.