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

Fixed GLFW exception at startup #4061

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Conversation

Sanakan8472
Copy link
Contributor

GlfwWsiDriver::getInstanceExtensions was creating an std::vector with a size argument in the ctor but then used push_back instead of filling the pre-allocated elements, leading to a bunch of nullptr entries at the start that caused an exception later on when accessed.

`GlfwWsiDriver::getInstanceExtensions` was creating an `std::vector` with a size argument in the ctor but then used `push_back` instead of filling the pre-allocated elements, leading to a bunch of nullptr entries at the start that caused an exception later on when accessed.
Sanakan8472 added a commit to ezEngine/ezEngine that referenced this pull request Jun 7, 2024
* Add experimental support for DXVK-native on Linux

This allows compiling the DX11 renderer on Linux. The main goal is to make it easier to make renderer changes on Linux without having to boot Windows. To use:
1. Clone DXVK
1. Change `meson.build` to `lib_glfw = dependency('glfw3', required: false)` instead of just `'glfw'`.
1. Run `./package-native.sh master ~/libDXVK --no-package`
1. `export PKG_CONFIG_PATH="~/libDXVK/dxvk-native-master/usr/lib/pkgconfig"`
1. Enable `EZ_BUILD_EXPERIMENTAL_DXVK`

Note that you won't be able to run this without considerable effort so right now it's merely to make sure the code compiles:
1. There is no shader compiler so if you want to run DX11, you need to get a shader cache from a Windows machine or from the Windows CI build artifacts.
3. We conflict between two GLFW versions as EZ does not use the system version but DXVK does. You can delete our version and replace it with the system version but it's tedious.
4. For some reason you can't load two renderers at the same time under Linux. Sub-system init for DX11 is simply skipped. Can't figure out why.
5. Latest release of dxvk has a bug, so you need to apply at least this patch: doitsujin/dxvk#4061
6. You need to set the env var `DXVK_WSI_DRIVER=GLFW` before running any app.
Copy link
Contributor

@flibitijibibo flibitijibibo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this was my fault when I moved the instance extensions to the wsi backend, lgtm

@doitsujin doitsujin merged commit 2188caa into doitsujin:master Jun 10, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants