[Mesa-dev] [PATCH 4/9] radeonsi: assume that a TES without POSITION precedes GS

Marek Olšák maraeo at gmail.com
Mon Jan 2 20:17:01 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 4a7f638..56b6334 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1268,21 +1268,22 @@ static void si_parse_next_shader_property(const struct tgsi_shader_info *info,
 			/* 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;
 
 	case PIPE_SHADER_TESS_EVAL:
-		if (next_shader == PIPE_SHADER_GEOMETRY)
+		if (next_shader == PIPE_SHADER_GEOMETRY ||
+		    !info->writes_position)
 			key->as_es = 1;
 		break;
 	}
 }
 
 /**
  * Compile the main shader part or the monolithic shader as part of
  * si_shader_selector initialization. Since it can be done asynchronously,
  * there is no way to report compile failures to applications.
  */
-- 
2.7.4



More information about the mesa-dev mailing list