diff options
author | Timur Kristóf <[email protected]> | 2019-03-07 08:19:02 +0100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-03-08 00:39:45 +0000 |
commit | b0c214cceeada1e5d4afa89b1ce819c79d8b8c5b (patch) | |
tree | 000d3881c75d981bfaac29b5d6781000fefe1783 | |
parent | 1664de5924aa6d761be21afdee411654121515d1 (diff) |
radeonsi/nir: Only set window_space_position for vertex shaders.
By mistake, this was previously set for all shaders.
It is a vertex shader property so only makes sense to
set it for vertex shaders.
Signed-Off-By: Timur Kristóf <[email protected]>
Reviewed-By: Timothy Arceri <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 0ead9348a56..5fc1df250aa 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -343,8 +343,10 @@ void si_nir_scan_shader(const struct nir_shader *nir, info->properties[TGSI_PROPERTY_NEXT_SHADER] = pipe_shader_type_from_mesa(nir->info.next_stage); - info->properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION] = - nir->info.vs.window_space_position; + if (nir->info.stage == MESA_SHADER_VERTEX) { + info->properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION] = + nir->info.vs.window_space_position; + } if (nir->info.stage == MESA_SHADER_TESS_CTRL) { info->properties[TGSI_PROPERTY_TCS_VERTICES_OUT] = |