}
static void si_parse_next_shader_property(const struct tgsi_shader_info *info,
+ bool streamout,
struct si_shader_key *key)
{
unsigned next_shader = info->properties[TGSI_PROPERTY_NEXT_SHADER];
key->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)
+ /* If POSITION isn't written, it can only be a HW VS
+ * if streamout is used. If streamout isn't used,
+ * assume that it's a HW LS. (the next shader is TCS)
* This heuristic is needed for separate shader objects.
*/
- if (!info->writes_position)
+ if (!info->writes_position && !streamout)
key->as_ls = 1;
}
break;
}
shader->selector = sel;
- si_parse_next_shader_property(&sel->info, &shader->key);
+ si_parse_next_shader_property(&sel->info,
+ sel->so.num_outputs != 0,
+ &shader->key);
if (sel->tokens)
tgsi_binary = si_get_tgsi_binary(sel);
struct si_shader_key key;
memset(&key, 0, sizeof(key));
- si_parse_next_shader_property(&sel->info, &key);
+ si_parse_next_shader_property(&sel->info,
+ sel->so.num_outputs != 0,
+ &key);
/* Set reasonable defaults, so that the shader key doesn't
* cause any code to be eliminated.