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 <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5851>
This commit is contained in:

committed by
Marge Bot

parent
3fe87a5836
commit
b8df1c43d2
@@ -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) {
|
||||
|
Reference in New Issue
Block a user