GPUOpen-LibrariesAndSDKs / Capsaicin

AMD ARR team rendering framework
MIT License
363 stars 32 forks source link

Compiled `scene_viewer.exe` does not work unless run from root directory #1

Closed Calinou closed 5 months ago

Calinou commented 1 year ago

OS: Windows 11 Compiler: Visual Studio 2022, CMake 3.26.3

I cloned this repository with --recursive and ran cmake -S ./ -B ./build -A x64 then cmake --build ./build --config RelWithDebInfo as instructed in getting_started.md. The scene_viewer.exe binary compiled successfully, but running it by double-clicking it spawns a window that closes immediately. Running --help shows a list of CLI arguments (including a functional --list-scenes), so the binary isn't broken.

I was able to resolve the issue by running build\bin\RelWithDebInfo\scene_viewer.exe from the cloned repository root. Ideally, scene_viewer.exe should automatically scan up to 3 folders upwards[^1] so that you can double-click it and it'll just work 🙂

[^1]: Other buildsystems generated by CMake may not nest the binary so much as the MSVC one.

maoliver-amd commented 1 year ago

Thank you for reporting this. We have fixed this internally and will release it as part of a small maintenance update or the next version.

Vikvaryas commented 1 year ago

I have the exact same issue but running from root is not helping.

Debug output : "D3D12 ERROR: ID3D12Device::CreateCommandSignature: D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS can't be used in a command signature unless the device supports D3D12_RAYTRACING_TIER_1_1+. [ STATE_CREATION ERROR #743: CREATECOMMANDSIGNATURE_INVALID] "

I'm using an RTX 3050 Ti, and I have enabled hardware acceleration for the executable in Windows. Still not working.

EDIT :Nevermind, its fixed. I was on a laptop with AMD iGPU that didnt support D3D12 RT 1.1 but had a Nvidia dGPU that did support D3D12 RT 1.1. The gfx.h file was coded in a way that always forced scene_viewer to run the AMD gpu if it found it. I changed it so Nvidia had a priority and I'm able to run the scene_viewer.exe now.

maoliver-amd commented 5 months ago

The latest verion 1.1 is now available with a variety of new features and bug fixes (including this one). This issue should be resolved in 1.1 so im closing it accordingly. If you still have any issue then feel free to reopen or post a new issue.