From 8bddabbf534815448b8f8aa7ed9c6d93290d27d0 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 1 May 2023 13:03:00 +0200 Subject: [PATCH] r600/sfn: assign window_space_position in shader state This fixes a few tests out of the nin-tests test suite. Fixes: 79ca456b4837 ("r600/sfn: rewrite NIR backend") Signed-off-by: Gert Wollny Part-of: (cherry picked from commit f092f548cb8202614c86b47ecd8906d16628ce24) --- .pick_status.json | 2 +- src/gallium/drivers/r600/sfn/sfn_nir.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 3b6aaece3e8..97fe66e04cb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -580,7 +580,7 @@ "description": "r600/sfn: assign window_space_position in shader state", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "79ca456b4837b3bc21cf9ef3c03c505c4b4909f6" }, diff --git a/src/gallium/drivers/r600/sfn/sfn_nir.cpp b/src/gallium/drivers/r600/sfn/sfn_nir.cpp index d3c12ef0a07..9ccb070d15a 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir.cpp @@ -1058,6 +1058,11 @@ 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_GEOMETRY) { r600::sfn_log << r600::SfnLog::shader_info << "Geometry shader, create copy shader\n";