Skip to content

Commit 4890e8d

Browse files
committed
a
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
1 parent f9cf83e commit 4890e8d

File tree

2 files changed

+5
-82
lines changed

2 files changed

+5
-82
lines changed

.github/workflows/main.yml

+1-81
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,6 @@ env:
1313
RUST_BACKTRACE: full
1414

1515
jobs:
16-
Build:
17-
name: ${{ format('{0} {1}', matrix.platform.target, matrix.features)}}
18-
runs-on: ${{ matrix.platform.os }}
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
platform:
23-
- { target: aarch64-apple-darwin, os: macos-14, test: true }
24-
- { target: x86_64-apple-darwin, os: macos-13, test: true }
25-
- { target: x86_64-unknown-linux-gnu, os: ubuntu-24.04, test: true }
26-
- { target: x86_64-pc-windows-msvc, os: windows-latest, test: true }
27-
- { target: i686-pc-windows-msvc, os: windows-latest, test: false }
28-
- { target: aarch64-pc-windows-msvc, os: windows-latest, test: false }
29-
- {
30-
target: aarch64-unknown-linux-ohos,
31-
os: ubuntu-24.04,
32-
test: false,
33-
}
34-
- { target: arm-linux-androideabi, os: ubuntu-24.04, test: false }
35-
features:
36-
[
37-
"",
38-
"chains sm-raw-window-handle-06",
39-
"chains sm-raw-window-handle-05",
40-
]
41-
include:
42-
- features: "sm-x11 sm-wayland-default"
43-
platform:
44-
{ target: x86_64-unknown-linux-gnu, os: ubuntu-24.04, test: true }
45-
- features: "chains sm-angle-builtin"
46-
platform:
47-
{ target: x86_64-pc-windows-msvc, os: windows-latest, test: true }
48-
- features: "chains sm-no-wgl sm-angle-builtin"
49-
platform:
50-
{ target: x86_64-pc-windows-msvc, os: windows-latest, test: true }
51-
steps:
52-
- uses: actions/checkout@v4
53-
- name: Install dependencies (Linux)
54-
if: startsWith(matrix.platform.os, 'ubuntu')
55-
run: |
56-
sudo apt update
57-
sudo apt install gcc libxxf86vm-dev libosmesa6-dev libgles2-mesa-dev xvfb weston -y
58-
- name: Install rust
59-
id: toolchain
60-
uses: dtolnay/rust-toolchain@1.81.0
61-
with:
62-
targets: ${{ matrix.platform.target }}
63-
- name: Build
64-
run: |
65-
cargo build --features "${{ matrix.features }}" --target ${{ matrix.platform.target }}
66-
- name: Test
67-
if: ${{ matrix.platform.test && startsWith(matrix.platform.os, 'ubuntu') }}
68-
run: |
69-
weston --no-config --socket=wl-test-env --backend=headless &
70-
WAYLAND_DISPLAY=wl-test-env xvfb-run cargo test --features "${{ matrix.features }}" --target ${{ matrix.platform.target }}
71-
- name: Test
72-
if: ${{ matrix.platform.test && !startsWith(matrix.platform.os, 'ubuntu') }}
73-
run: |
74-
cargo test --features "${{ matrix.features }}" --target ${{ matrix.platform.target }}
75-
7616
android-test:
7717
name: ${{ format('x86_64-linux-android {0}', matrix.features)}}
7818
runs-on: ubuntu-24.04
@@ -115,24 +55,4 @@ jobs:
11555
script: |
11656
cargo dinghy all-platforms
11757
cargo dinghy all-devices
118-
cargo dinghy -p auto-android-x86_64-api30 --env RUST_BACKTRACE=${{ env.RUST_BACKTRACE }} test --features "${{ matrix.features }}" -- --test-threads 1
119-
120-
Format:
121-
name: Run `rustfmt`
122-
runs-on: ubuntu-24.04
123-
steps:
124-
- uses: actions/checkout@v4
125-
- uses: mkroening/rust-toolchain-toml@main
126-
- run: cargo fmt --check
127-
build_result:
128-
name: Result
129-
runs-on: ubuntu-24.04
130-
needs: ["Build", "android-test", "Format"]
131-
if: always()
132-
steps:
133-
- name: Mark the job as successful
134-
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
135-
run: exit 0
136-
- name: Mark the job as unsuccessful
137-
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
138-
run: exit 1
58+
cargo dinghy -p auto-android-x86_64-api30 --env RUST_BACKTRACE=${{ env.RUST_BACKTRACE }} test --features "${{ matrix.features }}" -- --test-threads 1 --nocapture

src/platform/egl/context.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,17 @@ impl Device {
121121
Ok(())
122122
})?;
123123

124+
println!("{:?}", context::get_proc_address("glGetString"));
125+
let gl = Gl::from_loader_function(context::get_proc_address);
126+
124127
// Wrap up the EGL context.
125128
let context = Context {
126129
egl_context,
127130
id: *next_context_id,
128131
pbuffer,
129132
framebuffer: Framebuffer::None,
130133
context_is_owned: true,
131-
gl: Gl::from_loader_function(context::get_proc_address),
134+
gl,
132135
};
133136
next_context_id.0 += 1;
134137
Ok(context)

0 commit comments

Comments
 (0)