Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRI error when running NRDSample #23

Open
edrumwri opened this issue Jan 22, 2025 · 1 comment
Open

NRI error when running NRDSample #23

edrumwri opened this issue Jan 22, 2025 · 1 comment

Comments

@edrumwri
Copy link

Apologies if I should be posting under the NRI repo instead, but it seems like this is the right place. This error happens under commit b520f2 on Ubuntu 24. Since NRDSample is supposed to be the "quick start" for NRD, I'd like to not personally dive into debugging the NRDSample issue just to see how NRD works; hopefully there is something simple I can be pointed to in order to make this work.

Error is below:

Loading scene 'Cubes.gltf'...
Loading texture 'black.png'...
Loading texture 'white.png'...
Loading texture 'checkerboard0.dds'...
Loading texture 'flatnormal.png'...
Loading texture 'scrambling_ranking_128x128_2d_4spp.png'...
Loading texture 'sobol_256_4d.png'...
Loading texture 'T_Brick_Beige_D.dds'...
Loading texture 'T_Brick_Beige_R.dds'...
Loading texture 'T_Brick_Beige_N.dds'...
Loading texture 'T_Brick_Cinder_D.dds'...
Loading texture 'T_Brick_Cinder_R.dds'...
Loading texture 'T_Brick_Cinder_N.dds'...
Loading texture 'T_Brick_Concrete_D.dds'...
Loading texture 'T_Brick_Concrete_R.dds'...
Loading texture 'T_Brick_Concrete_N.dds'...
Loading texture 'T_Brick_Yellow_D.dds'...
Loading texture 'T_Brick_Yellow_R.dds'...
Loading texture 'T_Brick_Yellow_N.dds'...
Loading texture 'T_Tile_White_D.dds'...
Loading texture 'T_Tile_White_R.dds'...
Loading texture 'T_Tile_White_N.dds'...
Loading scene 'ShaderBalls.gltf'...
Loading texture 'T_Tile_White_D.dds'...
Loading texture 'T_Tile_White_R.dds'...
Loading texture 'T_Tile_White_N.dds'...
Loading texture 'white.png'...
Loading texture 'roughness0_metalness1.png'...
Loading texture 'black.png'...
Loading texture 'roughness0_metalness0.png'...
Loading texture 'flat_normal.png'...
Loading texture 'gold.png'...
Loading texture 'gold_mat.png'...
Loading texture 'green.png'...
Loading texture 'T_Brick_Concrete_R.dds'...
Loading texture 'T_Brick_Concrete_N.dds'...
Loading texture 'T_Brick_Yellow_D.dds'...
Loading texture 'T_Brick_Yellow_R.dds'...
Loading texture 'T_Brick_Yellow_N.dds'...
Loading texture 'red.png'...
Loading texture 'roughness1_metalness0.png'...
Loading texture 'T_Brick_Beige_N.dds'...
Loading texture 'T_Concrete_Shimizu_D.dds'...
Loading texture 'T_Concrete_Shimizu_R.dds'...
Loading texture 'T_Concrete_Shimizu_N.dds'...
nri::ERROR (SwapChainVK.hpp:128) - VK::NVIDIA GeForce RTX 4090 - Create: swapChainDesc.textureNum is out of [3, 8] range
@dzhdanNV
Copy link
Collaborator

NRD sample uses pretty standard swapChainDesc.textureNum = SWAP_CHAIN_TEXTURE_NUM; (2).

While your Linux setup has [3; 8] limitations. This message comes from this code in NRI:

        bool isTextureNumValid = textureNum >= sc.surfaceCapabilities.minImageCount && (textureNum <= sc.surfaceCapabilities.maxImageCount || sc.surfaceCapabilities.maxImageCount == 0);
        RETURN_ON_FAILURE(&m_Device, isTextureNumValid, Result::INVALID_ARGUMENT, "swapChainDesc.textureNum is out of [%u, %u] range", sc.surfaceCapabilities.minImageCount,
            sc.surfaceCapabilities.maxImageCount);

Solution: change SWAP_CHAIN_TEXTURE_NUM to 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants