This reverts commit 32d4a67017ecf4af75a9bfde885526550a6534ba thus fixing T81002 again.
And in order not to break T81212 (again) a different fix was implemented.
Setting 1.0 to gl_Position.z in a shader is not a conventional solution.
This limits the use of this shader by preventing some state from working.
Also, recently a proposal was discussed to remove 2D shaders that have a 3D counterpart (See D15836).
Since GPU_SHADER_2D_IMAGE has this special behavior, it cannot be replaced by GPU_SHADER_3D_IMAGE.