-
-
Notifications
You must be signed in to change notification settings - Fork 2
gui: a window the driver refused opens with a software renderer shipped beside it on Windows #109
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0296fee
gui: the OpenGL binding is carried as a copy that imports no opengl32…
donislawdev 3fe4ff0
gui: a window the driver refused is tried again with the software ren…
donislawdev 5868ee3
legal: the registry gains a third class, for what ships beside a bina…
donislawdev 0421833
ci: the release puts the software renderer beside the window, signs i…
donislawdev 6ddf725
git: a Python bytecode cache reached a commit, and none may again
donislawdev 64042d5
guard: the window build's fetch of the renderer is asked for as a cal…
donislawdev 210b33d
docs: the readme, the changelog and the security policy say the Windo…
donislawdev d1f2b16
gui: the flag on a system the renderer does not ship for says so, rat…
donislawdev cada25a
ci: the dependency gate is told about the copy of the OpenGL binding
donislawdev ecc6dfe
gui: three things the first CI run found that no local subset reads
donislawdev f832068
gui: eleven things an outside review of the pull request named, each …
donislawdev 6ce35df
gui: six things the second outside review of the pull request named, …
donislawdev 67a5c3d
guard: the forgiveness canary carries the approved spawn twice, the s…
donislawdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| version=26.2.0 | ||
| archive=mesa3d-26.2.0-release-msvc.7z | ||
| sha256=dcb2719ef346dab5b609fcb193a5f13cfc4b0502e3f4de1ad43d349477402f47 | ||
| file=x64/libgallium_wgl.dll 1a2e49cd5fdb1a857d98117ab04240d723b57da5dffe6d07f5386f42014557c1 | ||
| file=x64/opengl32.dll 33b217ed7947b48684baa987914475898a2b4d7d64cce96b078216c67a633582 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| #!/usr/bin/env bash | ||
| # Puts the software renderer beside the window binary, for the Windows | ||
| # archive: the two files of Mesa's llvmpipe that the window loads when the | ||
| # graphics driver offers no OpenGL 2.1. | ||
| # | ||
| # Usage: fetch_software_renderer.sh <directory the window binary is in> | ||
| # | ||
| # The release of pal1000/mesa-dist-win to take them from, the SHA-256 of that | ||
| # release's archive, and the two files with their own sums, come from | ||
| # .github/mesa-dist-win and nowhere else. The same version and sums stand in | ||
| # internal/legal/companions.go, which is what the notices and the bill of | ||
| # materials are rendered from, and a guard holds the two files equal - so a | ||
| # bump here without the review there is refused before it is built. | ||
| # | ||
| # The archive's sum is checked BEFORE anything is unpacked. A download that | ||
| # does not match is an archive nobody reviewed, and unpacking it first would | ||
| # put two files nobody reviewed next to a program that loads them by path. | ||
| # | ||
| # Exactly two files, taken from one directory of the archive, into one | ||
| # directory beside the program. The names are the ones the window looks for - | ||
| # see internal/gui/software.go - and the guard above holds these to the | ||
| # registry as well, so a renamed file cannot ship under the old name. | ||
| set -euo pipefail | ||
|
|
||
| into="${1:?usage: fetch_software_renderer.sh <directory>}" | ||
| pin=".github/mesa-dist-win" | ||
|
|
||
| version="$(grep '^version=' "${pin}" | cut -d= -f2-)" | ||
| archive="$(grep '^archive=' "${pin}" | cut -d= -f2-)" | ||
| sha256="$(grep '^sha256=' "${pin}" | cut -d= -f2-)" | ||
| for value in "${version}" "${archive}" "${sha256}"; do | ||
| if [ -z "${value}" ]; then | ||
| echo "fetch_software_renderer: ${pin} does not name the version, the archive and the sum" >&2 | ||
| exit 1 | ||
| fi | ||
| done | ||
|
|
||
| # Beside the target rather than under /tmp: on one machine /tmp was a | ||
| # directory this user could write and not read back, and a download that | ||
| # cannot be summed is a download that cannot be trusted. | ||
| mkdir -p "${into}" | ||
| fetched="$(mktemp -d "${into}/.software-renderer.XXXXXX")" | ||
| curl --silent --show-error --fail --location --retry 3 \ | ||
| --output "${fetched}/${archive}" \ | ||
| "https://github.com/pal1000/mesa-dist-win/releases/download/${version}/${archive}" | ||
| (cd "${fetched}" && echo "${sha256} ${archive}" | sha256sum -c -) | ||
|
|
||
| # The files, each with its own sum, from the same pin. The archive's sum | ||
| # already covers them, and this is the half a person can check against the | ||
| # notices without downloading seventy megabytes: the notices name these two | ||
| # sums, and so does the registry the notices are rendered from. | ||
| mkdir -p "${into}/opengl" | ||
| grep '^file=' "${pin}" | cut -d= -f2- | while read -r inside sum; do | ||
| 7z e -bso0 -o"${into}/opengl" "${fetched}/${archive}" "${inside}" | ||
| (cd "${into}/opengl" && echo "${sum} $(basename "${inside}")" | sha256sum -c -) | ||
| done | ||
| rm -rf "${fetched}" | ||
|
|
||
| # Two files and no more, or the archive is not what the notices describe. | ||
| count="$(find "${into}/opengl" -type f | wc -l | tr -d ' ')" | ||
| if [ "${count}" != "2" ]; then | ||
| echo "fetch_software_renderer: expected two files under opengl and found ${count}" >&2 | ||
| exit 1 | ||
| fi | ||
| ls -l "${into}/opengl" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.