r600/sfn: assign window_space_position in shader state
authorGert Wollny <gert.wollny@collabora.com>
Mon, 1 May 2023 11:03:00 +0000 (13:03 +0200)
committerGert Wollny <gert.wollny@collabora.com>
Mon, 1 May 2023 12:37:19 +0000 (14:37 +0200)
This fixes a few tests out of the nin-tests test suite.

Fixes: 79ca456b4837 ("r600/sfn: rewrite NIR backend")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22778>

src/gallium/drivers/r600/sfn/sfn_nir.cpp

index 285da2a..f35a62f 100644 (file)
@@ -1084,6 +1084,10 @@ r600_shader_from_nir(struct r600_context *rctx,
       return -1;
    }
 
+   if (sh->info.stage == MESA_SHADER_VERTEX) {
+      pipeshader->shader.vs_position_window_space =
+            sh->info.vs.window_space_position;
+   }
 
    if (sh->info.stage == MESA_SHADER_FRAGMENT)
       pipeshader->shader.ps_conservative_z =