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

Ability to Force the Use of wgpu-only Through Feature Flag #123

Open
deadash opened this issue Oct 26, 2023 · 4 comments
Open

Ability to Force the Use of wgpu-only Through Feature Flag #123

deadash opened this issue Oct 26, 2023 · 4 comments

Comments

@deadash
Copy link

deadash commented Oct 26, 2023

Description:

On riscv64 platforms, we are able to successfully compile and run wgpu. However, due to issues with the compilation of tiny_skia, we are unable to utilize it fully.

Steps to Reproduce:

  1. Clone the repository on a riscv64 machine.
  2. Run the build command specific to wgpu.
  3. Observe that while wgpu compiles successfully, the build fails due to tiny_skia.

Expected Behavior:

The build should succeed and we should be able to run wgpu-only functionality on riscv64.

Actual Behavior:

The build fails due to tiny_skia compilation issues, preventing us from using wgpu-only functionality.

Additional Information:

It would be beneficial to have a feature flag that allows us to force the use of wgpu-only, bypassing the tiny_skia dependency.

Possible Solution:

Introduce a feature flag that when enabled, excludes tiny_skia from the build process, allowing for wgpu-only operation.

@deadash
Copy link
Author

deadash commented Oct 26, 2023

Upon investigation, the reason tiny_skia is not usable is that it has a dependency on softbuffer. By default, softbuffer has the following features enabled: ["kms", "x11", "x11-dlopen", "wayland", "wayland-dlopen"].

The kms feature, in turn, depends on drm, which requires the use_bindgen feature to be enabled for successful compilation. This is the root cause of the issue we are facing.

Is there a way to enforce the use of wgpu only, bypassing the problematic tiny_skia dependency, particularly on the riscv64 architecture?

@panekj
Copy link
Collaborator

panekj commented Oct 26, 2023

Why can't you just build it with tiny_skia?

@panekj
Copy link
Collaborator

panekj commented Oct 26, 2023

This should be fixed once Smithay/drm-rs#176 lands

otherwise adding dependency with bindgen feature fixes that as well

[dependencies]
drm-sys = { version = "*", features = ["use_bindgen"] }

@ids1024
Copy link

ids1024 commented Oct 27, 2023

Ah, this isn't something I considered when we merged the kms backend in softbuffer.

Using softbuffer with default-features = false to leave out the kms feature would be reasonable. It isn't very useful yet since kms support isn't merged in winit yet (rust-windowing/winit#2795).

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

3 participants