I am not sure whether it is a driver bug but following happens:
compute-shader.glsl:
#version 320 es
precision mediump float;
layout(local_size_x = 16, local_size_y = 8, local_size_z = 1) in;
layout(rgba8ui, binding = 0) writeonly uniform mediump uimage2D image;
layout(binding = 1) uniform mediump usampler3D grid;
void main() {
    uint i = gl_GlobalInvocationID.y;
    uint j = gl_GlobalInvocationID.x;
    uvec4 val = texture(grid, vec3(float(i)/480.0,float(j)/640.0,0.5));
    imageStore(image, ivec2(j,i), val);
}
The color channels of val are completely scrambled: 
- alpha = blue
 - red = red
 - green = alpha
 - blue = green
 
main.cpp:
    glActiveTexture(GL_TEXTURE1);
    glEnable(GL_TEXTURE_3D);
    glBindTexture(GL_TEXTURE_3D, grid_tex_id);
    glTexStorage3D(GL_TEXTURE_3D, 1, GL_RGBA8, 256, 256, 256);
    glTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, 256, 256, 256, GL_RGBA, GL_UNSIGNED_BYTE, grid.data);
    glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
Is there any reasonable explanation for this? Note: I do not want to use the hack val.ragb (if that even exists).