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

Require a tutorial demonstrate how to integrate this driver to Vulkan applications #171

Open
shrinktofit opened this issue Nov 7, 2018 · 6 comments
Labels

Comments

@shrinktofit
Copy link

shrinktofit commented Nov 7, 2018

I have successfully ran the LunarG/VulkanSmples according to readme. Next I wish to use it in my vulkan application but I don't know how to. I use lunarG SDK and it by default load my graphic card's vulkan driver.

@kvark
Copy link
Member

kvark commented Nov 7, 2018

Here are the steps:

  1. build libportability_icd, e.g. cd libportability_icd && cargo build --features metal
  2. make sure to have a good ICD definition. We have a few in-repo, e.g. portability-win-debug, and we want those for all configuration in the end. If there isn't one for your platform/config, just copy an existing one and modify the path, if needed.
  3. run your app with VULKAN_ICD_FILENAMES=<path_to_your_ICD.json>

@kvark kvark added the question label Nov 7, 2018
@shrinktofit
Copy link
Author

shrinktofit commented Nov 8, 2018

Here are the steps:

  1. build libportability_icd, e.g. cd libportability_icd && cargo build --features metal
  2. make sure to have a good ICD definition. We have a few in-repo, e.g. portability-win-debug, and we want those for all configuration in the end. If there isn't one for your platform/config, just copy an existing one and modify the path, if needed.
  3. run your app with VULKAN_ICD_FILENAMES=<path_to_your_ICD.json>

@kvark I modified metal to vulkan and VULKAN_ICD_FILENAMES to VK_ICD_FILENAMES

My steps:

  • cargo build --manifest-path libportability/Cargo.toml --features vulkan
  • cd libportability_icd && cargo build --features vulkan
  • setup the enviroment variable VK_ICD_FILENAMES=<path-to-the-portability-win-debug.json>(I use windows 10 so I didn't modify that file)

I ran my application, it successfully load the portability_icd.dll. But a stackoverflow is produced during call vkCreateInstance, I trace the call stack and I found in LunarG SDK's loader/loader.c file, the vkCreateInstance's loader_create_instance_chain() invocation line is continuously called:
image

@grovesNL
Copy link
Collaborator

grovesNL commented Nov 8, 2018

@shrinktofit I think there is an open issue about loading portability with --features vulkan at the moment (LunarG/VulkanSamples#162) that needs to be resolved.

Are you trying to test portability for use with DirectX 12 or something else? You could try --features dx12 instead (if you have it installed).

@shrinktofit
Copy link
Author

shrinktofit commented Nov 8, 2018

I think I misunderstood the feature option...

It represent "which backend is choosen to implement the vulkan", not "do you want to implement vulkan or metal or dx12", right? Hah...

@grovesNL
Copy link
Collaborator

grovesNL commented Nov 8, 2018

That's right 😄

@kvark
Copy link
Member

kvark commented Nov 8, 2018

@shrinktofit would you want to try out dx12 as @grovesNL suggested? Otherwise the issue can be closed.

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

No branches or pull requests

3 participants