the final output of gl_Position needs this transform, and geometry shaders
must write this value for stream 0 if rasterization is enabled
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5851>
void
nir_lower_clip_halfz(nir_shader *shader)
{
- if (shader->info.stage != MESA_SHADER_VERTEX)
+ if (shader->info.stage != MESA_SHADER_VERTEX &&
+ shader->info.stage != MESA_SHADER_GEOMETRY)
return;
nir_foreach_function(function, shader) {