I don't know for sure that it's not possible but I haven't seen a way to do this. I'll speculate that since uniforms can get optimized out at the linking stage, it makes sense that you can't (or rather, that the effort to include and implement an interface hasn't been made) query the individual shader and see what variables are "active".
As you say, you can get a list of active uniforms for the entire program:
glGetProgramiv(program, GL_ACTIVE_UNIFORMS, &n)
for (i = 0..n)
glGetActiveUniform(program, i, ...)
But AFAIK there is no way to find which stage references them, and more to the point, which stages they are active in (for the former you could do some code parsing to guess).
The only thing that comes close is with uniform blocks, which aren't available in OpenGL ES2.0:
glGetProgramiv(program, GL_ACTIVE_UNIFORM_BLOCKS, &n)
for (i = 0..n)
glGetActiveUniformBlockiv(program, i, ...)
Where you can query
GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
,
GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER
,
GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
,