with_wininit example crashes on Mali-TKRX v1.r49p
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
When running the with_winit on a Mediatek 8196 SoC (Mali-TKRX
proprietary vulkan driver, v1.r49p) the GPU driver crashes with page
faults:
mali 48000000.gpu: Unhandled Page fault in AS1 at VA 0x00007FDFF1E04FC0
Reason: Memory is not mapped on the GPU
Enable bounds checks in the shaderruntime "fixes" this. See https://github.com/linebender/vello/commit/4c43da7c15368c652c1d21799fb2428aea2d3d53 ; I didn't send a MR as this is probably not the "right" fix.
For reference a full failing run looks like:
```
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_xlib_surface
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_xcb_surface
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_acquire_drm_display
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_direct_mode_display
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_physical_device_drm
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_get_display_properties2
[2026-02-21T14:51:18.952Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_swapchain_colorspace
[2026-02-21T14:51:18.957Z WARN wgpu_hal::gles::egl] No config found!
[2026-02-21T14:51:18.957Z WARN wgpu_hal::gles::egl] EGL says it can present to the window but not natively
[2026-02-21T14:51:18.963Z ERROR sctk_adwaita::config] XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
[2026-02-21T14:51:18.970Z WARN wgpu_hal::gles::egl] Re-initializing Gles context due to Wayland window
[2026-02-21T14:51:18.973Z WARN wgpu_hal::gles::egl] No config found!
[2026-02-21T14:51:18.973Z WARN wgpu_hal::gles::egl] EGL says it can present to the window but not natively
[2026-02-21T14:51:18.979Z WARN wgpu_core::instance] Missing downlevel flags: DownlevelFlags(SURFACE_VIEW_FORMATS)
The underlying API or device in use does not support enough features to be a fully compliant implementation of WebGPU. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to limit the features you use to the supported subset, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.
[2026-02-21T14:51:18.979Z WARN wgpu_core::instance] DownlevelCapabilities {
flags: DownlevelFlags(
COMPUTE_SHADERS | FRAGMENT_WRITABLE_STORAGE | INDIRECT_EXECUTION | BASE_VERTEX | READ_ONLY_DEPTH_STENCIL | NON_POWER_OF_TWO_MIPMAPPED_TEXTURES | CUBE_ARRAY_TEXTURES | COMPARISON_SAMPLERS | INDEPENDENT_BLEND | VERTEX_STORAGE | ANISOTROPIC_FILTERING | FRAGMENT_STORAGE | MULTISAMPLED_SHADING | DEPTH_TEXTURE_AND_BUFFER_COPIES | WEBGPU_TEXTURE_FORMAT_SUPPORT | BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED | UNRESTRICTED_INDEX_BUFFER | FULL_DRAW_INDEX_UINT32 | DEPTH_BIAS_CLAMP | VIEW_FORMATS | UNRESTRICTED_EXTERNAL_TEXTURE_COPIES | NONBLOCKING_QUERY_RESOLVE | SHADER_F16_IN_F32,
),
limits: DownlevelLimits,
shader_model: Sm5,
}
[2026-02-21T14:51:18.980Z WARN wgpu_hal::vulkan::adapter] VK_EXT_memory_budget is not available.
MTK Mali default new mem emr when 3758096384
Parsed svg Ghostscript_Tiger in 1.780597ms
Encoded svg Ghostscript_Tiger in 192.921µs
thread 'main' (16762) panicked at examples/with_winit/src/lib.rs:639:22:
failed to get surface texture: Other
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: >::window_event
4: core::ops::function::impls:: for &mut F>::call_mut
5: winit::platform_impl::linux::wayland::event_loop::EventLoop::pump_events
6: winit::platform_impl::linux::wayland::event_loop::EventLoop::run_on_demand
7: with_winit::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: queue 0xaaafdd315db0 destroyed while proxies still attached:
zwp_linux_surface_synchronization_v1#37 still attached
zwp_linux_explicit_synchronization_v1#38 still attached
zwp_linux_dmabuf_v1#35 still attached
[mali] ../egl/src/mali_egl_display.c:1872 eglp_check_display_valid_and_initialized_and_retain:EGL NOT INITIALIZED
[mali] ../egl/src/mali_egl_display.c:1872 eglp_check_display_valid_and_initialized_and_retain:EGL NOT INITIALIZED
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/with_winit/src/lib.rs around line 639 and compare the failing run with the linked bounds-check change. Investigate the Mali-TKRX page fault and determine the correct fix rather than assuming bounds checks are sufficient; done means the with_winit example no longer crashes on the reported driver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100