You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ET-VK] Replace dynamic UBO indexing with safe_idx across shaders
The Adreno 740 GPU driver crashes (SIGSEGV in vkCreateComputePipelines)
when GLSL shaders dynamically index a UBO-backed ivec4/ivec3 with a
specialization-constant-derived value. This was causing the skin
segmentation model to crash during pipeline creation on Samsung S23.
Fix all instances across 18 shader files by replacing patterns like
`meta.sizes[packed_dim]` with `safe_idx(meta.sizes, packed_dim)`, which
uses an if/else chain that the driver resolves at pipeline creation time.
Changes:
- Add safe_idx(ivec3) overload to indexing.glslh
- Fix transfer_texture.glsl, slice.glslh, select.glslh (transfer ops)
- Fix nchw_to_int8x4_buffer.glsl, full_texture.glsl (staging/utility)
- Fix gather, split, index_tensor, where, expand, pad, repeat, arange
texture shaders (1-line fixes each)
- Fix softmax.glsl, reduce.glsl, reduce2d.glsl, var_texture3d.glsl
(reduction shaders with multiple fixes + added indexing.glslh include)
- Remove unused ShaderNameUtils.h include from Slice.cpp
Differential Revision: [D98220450](https://our.internmc.facebook.com/intern/diff/D98220450/)
ghstack-source-id: 357844383
Pull Request resolved: #18512
0 commit comments