Commit b8df1c43 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot

nir: allow nir_lower_clip_halfz to run in geometry shaders

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's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!5851>
parent 3fe87a58
......@@ -56,7 +56,8 @@ lower_pos_write(nir_builder *b, struct nir_instr *instr)
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment