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

Win/Linux: Ship vk_swiftshader.dll vulkan-1.dll vk_swiftshader_icd.json for M91+ #3176

Closed
magreenblatt opened this issue Sep 2, 2021 · 20 comments
Labels
Distribution Related to binary distribution enhancement Enhancement request linux Linux platform

Comments

@magreenblatt
Copy link
Collaborator

Original report by Yonggang Luo (Bitbucket: lygstate, GitHub: lygstate).


The new version chrome have the following vulkan software render shipped

2021/08/28  04:38         4,590,424 vk_swiftshader.dll
2021/08/28  04:10               106 vk_swiftshader_icd.json
2021/08/28  04:38           728,920 vulkan-1.dll

@magreenblatt
Copy link
Collaborator Author

Related Chromium change: https://crrev.com/ded0a1bc46

@magreenblatt
Copy link
Collaborator Author

  • changed title from "Ship vk_swiftshader.dll vulkan-1.dll vk_swiftshader_icd.json for chrome 92 and upper" to "Win/Linux: Ship vk_swiftshader.dll vulkan-1.dll vk_swiftshader_icd.json for M92+"
  • changed component from "Unclassified" to "Distribution"

@magreenblatt
Copy link
Collaborator Author

The change was also merged to Chromium M91.

@magreenblatt
Copy link
Collaborator Author

  • changed title from "Win/Linux: Ship vk_swiftshader.dll vulkan-1.dll vk_swiftshader_icd.json for M92+" to "Win/Linux: Ship vk_swiftshader.dll vulkan-1.dll vk_swiftshader_icd.json for M91+"

@magreenblatt
Copy link
Collaborator Author

From https://bugs.chromium.org/p/chromium/issues/detail?id=1060139#c77 (M92+):

Currently, Chrome uses legacy SwiftShader GL as the WebGL fallback when
a hardware GPU isn't usable for the purpuse of rendering WebGL content.

As we're in the process of changing legacy SwiftShader GL to SwANGLE,
this CL adds a new flag which allows using SwANGLE for WebGL only.

To clarify, current switches with legacy SwiftShader GL:
Software GL: --use-gl=swiftshader
Software WebGL only: --use-gl=swiftshader-webgl

With SwANGLE, the new switches will be:
Software GL: --use-gl=angle --use-angle=swiftshader
Software WebGL only: --use-gl=angle --use-angle=swiftshader-webgl

I would guess the intention is to stop shipping the “swiftshader” directory, but the timeframe for that is unclear.

@magreenblatt
Copy link
Collaborator Author

Based on the logic in GetRequestedGLImplementation it should use whichever software impl is available, preferring the new angle impl by default.

@magreenblatt
Copy link
Collaborator Author

I’m inclined to wait on shipping these new files until swiftshader is deprecated/removed. If anyone will need these files sooner please explain the reason. Thanks.

@magreenblatt
Copy link
Collaborator Author

Original comment by Alex Maitland (Bitbucket: a-maitland).


Based on the logic in GetRequestedGLImplementation it should use whichever software impl is available, preferring the new angle impl by default.

Possibly an instance where this isn’t working as expected at https://magpcss.org/ceforum/viewtopic.php?f=18&t=18661

@magreenblatt
Copy link
Collaborator Author

Thanks for the link. It may be worth a look at why the fallback logic in Chromium isn’t working.

@magreenblatt
Copy link
Collaborator Author

Original comment by Alex Maitland (Bitbucket: a-maitland).


Another log file with vulkan errors at cefsharp/CefSharp#3833 (not clear yet if they are related to the issue reported).

The required files appear to be generated as part of an official release build. Is there a reason to defer shipping them?

@magreenblatt
Copy link
Collaborator Author

Is there a reason to defer shipping them?

Not really, beyond the (prior) belief that they were redundant with the swiftshader libraries. I don’t really like shipping two rather large sets of optional binaries that do mostly the same thing. Perhaps we can just stop shipping swiftshader now, instead of waiting.

@magreenblatt
Copy link
Collaborator Author

Looks like we’ll need to ship these new binaries with M94+ because some content now fails to render via software that rendered previously (circa M91).

@magreenblatt
Copy link
Collaborator Author

Original comment by Dmitry Azaraev (Bitbucket: dmitry-azaraev, GitHub: dmitry-azaraev).


I’m migrated to CEF 93 and start to ship vk_swiftshader.dll, vk_swiftshader_icd.json, vulkan-1.dll because CEF with --disable-gpu switch works, but WebGL effectively is not (like described in this issue). Chrome 94 still ship all of this binaries, so this would be easier and fair to ship this things regardless to how them used in practice. [Peoples who require hardware GPU always can exclude this from distribution, as deploy optimization, but rest of users never know what and how GPU fallback work.]

Diff below looks like enough to ship them:

diff --git tools/make_distrib.py tools/make_distrib.py
index [838bc1834 (bb)](https://bitbucket.org/chromiumembedded/cef/commits/838bc1834)..a5f37a30d [100644 (bb)](https://bitbucket.org/chromiumembedded/cef/commits/100644)
--- tools/make_distrib.py
+++ tools/make_distrib.py
@@ -862,6 +862,9 @@ if platform == 'windows':
       {'path': 'v8_context_snapshot.bin', 'conditional': True},
       {'path': 'swiftshader\\libEGL.dll'},
       {'path': 'swiftshader\\libGLESv2.dll'},
+      {'path': 'vk_swiftshader.dll'},
+      {'path': 'vk_swiftshader_icd.json'},
+      {'path': 'vulkan-1.dll'},
   ]
   # yapf: enable
 

@magreenblatt
Copy link
Collaborator Author

Distribute binaries for SwANGLE support (fixes issue #3176)

Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.

→ <<cset 582e0a0ab78a (bb)>>

@magreenblatt
Copy link
Collaborator Author

  • changed state from "new" to "resolved"

@magreenblatt
Copy link
Collaborator Author

Distribute binaries for SwANGLE support (fixes issue #3176)

Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.

→ <<cset d6c534308b3b (bb)>>

@magreenblatt
Copy link
Collaborator Author

Distribute binaries for SwANGLE support (fixes issue #3176)

Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.

→ <<cset 10b22a327d96 (bb)>>

@magreenblatt
Copy link
Collaborator Author

I’ve updated the README.txt for Windows but it’s hard to verify the documented behaviors. Please report any discrepancies that are discovered.

@magreenblatt
Copy link
Collaborator Author

Legacy swiftshader binaries (swiftshader/* on Win/Linux and libswiftshader_*.dylib in MacOS) have been removed in M102 (this commit).

@magreenblatt
Copy link
Collaborator Author

Update to Chromium version 102.0.4997.0 (#990845)

→ <<cset 916360e2e580 (bb)>>

robincarlisle pushed a commit to robincarlisle/cef that referenced this issue Apr 28, 2023
…#3176)

Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.
robincarlisle pushed a commit to robincarlisle/cef that referenced this issue Apr 28, 2023
- Windows: SDK version 10.0.20348.0 is now required.
- MacOS: SDK version 12.3 (Xcode 13.3) is now required.
- Legacy swiftshader binaries (`swiftshader/*` on Win/Linux and
  `libswiftshader_*.dylib` on MacOS) have been removed (see issue chromiumembedded#3176).
filipnavara pushed a commit to emclient/cef that referenced this issue Dec 26, 2023
…#3176)

Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.
filipnavara pushed a commit to emclient/cef that referenced this issue Dec 26, 2023
…#3176)

Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Distribution Related to binary distribution enhancement Enhancement request linux Linux platform
Projects
None yet
Development

No branches or pull requests

1 participant