r600/sfn: assign window_space_position in shader state

This fixes a few tests out of the nin-tests test suite.

Fixes: 79ca456b48 ("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>
(cherry picked from commit f092f548cb)
This commit is contained in:
Gert Wollny 2023-05-01 13:03:00 +02:00 committed by Eric Engestrom
parent 45540ed389
commit 8bddabbf53
2 changed files with 6 additions and 1 deletions

View file

@ -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"
},

View file

@ -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";