Mesa (master): radeonsi: assume that a VS without POSITION is LS

Marek Olšák mareko at kemper.freedesktop.org
Mon Nov 21 21:41:10 UTC 2016


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Nov 14 02:03:28 2016 +0100

radeonsi: assume that a VS without POSITION is LS

Tested-by: Edmondo Tommasina <edmondo.tommasina at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/gallium/drivers/radeonsi/si_state_shaders.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 9e95fea..d0869e3 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1124,6 +1124,13 @@ static void si_parse_next_shader_property(const struct tgsi_shader_info *info,
 		case PIPE_SHADER_TESS_EVAL:
 			key->vs.as_ls = 1;
 			break;
+		default:
+			/* If POSITION isn't written, it can't be a HW VS.
+			 * Assume that it's a HW LS. (the next shader is TCS)
+			 * This heuristic is needed for separate shader objects.
+			 */
+			if (!info->writes_position)
+				key->as_ls = 1;
 		}
 		break;
 




More information about the mesa-commit mailing list