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

Using same VkSampler for multiple layouts crashes validation layers. #8888

Open
Duttenheim opened this issue Nov 19, 2024 · 10 comments
Open
Assignees
Labels
Bug Something isn't working

Comments

@Duttenheim
Copy link

Duttenheim commented Nov 19, 2024

Environment:

  • OS: Windows
  • GPU and driver version: 7900 XTX
  • SDK or header version if building from repo: 1.3.296
  • Options enabled: VK_LAYER_KHRONOS_validation

Describe the Issue

Using the same VkSampler in multiple VkDescriptorSetLayoutBinding structs when creating a VkDescriptorSetLayout crashes the validation layer at some point. Letting each layout have its own sampler fixes the issue but produces other issues down the line.

Expected behavior

The issue didn't appear until I upgraded to 1.3.296 from 1.3.261. It also makes renderdoc crash the GPU (driver resets).

Valid Usage ID
None

Additional context
Can be reproduced by syncing main on https://github.com/gscept/nebula and running nebula-demo with validation layers enabled.

Callstack:

image

@spencer-lunarg
Copy link
Contributor

thanks for raising the issue and curious what is blowing up the hash util here

I am having a hard time building your repo case. I am I suppose to grab both https://github.com/gscept/nebula and then clone https://github.com/gscept/nebula-demo somewhere else? I tried to do fips fetch but it cloned everything in my parent directory

@Duttenheim
Copy link
Author

Duttenheim commented Nov 20, 2024

Hello Spencer!

Now when I think about it, it's probably better to not go directly to the engine but use nebula-demo only. Running fips fetch in it should get the engine itself and set you up. Fips downloads all dependencies to a folder a level above, so I suggest putting the repo in a folder first, so not pollute your filesystem. It does this to avoid having dependencies in version control.

You then need to run fips nebula set work <path> to your nebula-demo folder, and then fips nebula set toolkit <path> to the folder where fips downloaded the engine, so that should be one level up and then nebula. On my machine, it looks like this, Project directory is the path of set work and Nebula root directory is the path of set toolkit:

image

Then you need to run fips physx build vc15/vc16/vc17 debug/checked/release, fips anyfx setup and fips ultralight. After that, fips gen and finally fips build. That should compile the engine and you're ready to go.

When running nebula-demo, provide the -editor argument to start the editor. This should mirror the setup I'm using to get the issue.

Thanks,
Gustav

@spencer-lunarg
Copy link
Contributor

So I have tried a few times to get this to run and work. I could only get the debug build to build (and still had to make tweaks to bypass vc17 default warnings as errors)

I tried to run with a debugger and keep hitting various crashes/issues

I assume you did find an issue, but until I have more time to spend trying to reproduce, it will be hard to track this down, sorry

@spencer-lunarg spencer-lunarg self-assigned this Nov 22, 2024
@spencer-lunarg spencer-lunarg added the Bug Something isn't working label Nov 22, 2024
@Duttenheim
Copy link
Author

I understand. Nebula isn't by any means production ready so hitting snags when trying to build and run is to be expected. Is it possible to share the GPU and OS you were running on? It might help me figure out what goes wrong as well.

Thanks,
Gustav

@spencer-lunarg
Copy link
Contributor

So I have 3 machines

  • Ubuntu AMD
  • Ubuntu Intel
  • Windows NVIDIA 4060 (with AMD CPU in for integrated graphics)

@Duttenheim
Copy link
Author

Thanks a bunch!

We mainly test on Windows. A Windows machine running 4060 should work, assuming it manages to select the 4060 as the GPU. What is the nature of the error, is it missing DLLs, an assert, or just a hard crash?

If you go to fips-deploy/nebula-demo/win64-vstudio-(debug/release/checked)/logfiles, there should be a file there which might contain some useful information for me.

Thanks,
Gustav

@Duttenheim
Copy link
Author

Hello again,

We added bat file to help setup nebula for the first time. It should be sufficient to run setup.bat and build and run nebula-demo with -editor as a command line argument to get going.

I've downgraded to SDK 1.3.261 in the meantime.

Thanks
Gustav

@spencer-lunarg
Copy link
Contributor

So script worked (I edited it to use release instead of debug) and I got the editor to load

image

Here is the log files (the AMD one crashes without VVL)

I can see VVL going, but unfortunately I don't see any crashes with last 2 SDK version or ToT

Nebula demo_2024_11_26_23_48_19.txt
Nebula demo_2024_11_26_23_46_10.txt

@Duttenheim
Copy link
Author

Duttenheim commented Nov 27, 2024

Alright, I might've inadvertently fixed it with a bunch of other changes I did. I will grab the latest SDK and try again. Really appreciate you taking your time to look into this 🙂

Edit: I ran this again on my 7900XTX and I am still getting this issue with 1.3.296.

Thanks,
Gustav

@spencer-lunarg
Copy link
Contributor

one idea is to get an API dump (or GFXReconstruct trace that I can dump the API calls) up to the crash, I could try to view it

(make sure you add the API Dump layer before the validation layers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants