Module: Mesa
Branch: master
Commit: b8df1c43d24a73740ddd8702d480eded11287b3f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8df1c43d24a73740ddd8702d480eded11287b3f

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Jul  8 12:43:23 2020 -0400

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5851>

---

 src/compiler/nir/nir_lower_clip_halfz.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_lower_clip_halfz.c 
b/src/compiler/nir/nir_lower_clip_halfz.c
index 13b7a5b8f1e..6db1910362f 100644
--- a/src/compiler/nir/nir_lower_clip_halfz.c
+++ b/src/compiler/nir/nir_lower_clip_halfz.c
@@ -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) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to