etna_link_shader(struct etna_shader_link_info *info,
const struct etna_shader_variant *vs, const struct etna_shader_variant *fs)
{
- if (DBG_ENABLED(ETNA_DBG_NIR))
- return etna_link_shader_nir(info, vs, fs);
-
int comp_ofs = 0;
/* For each fragment input we need to find the associated vertex shader
* output, which can be found by matching on semantic name and index. A
struct etna_shader_variant *vs, struct etna_shader_variant *fs)
{
struct etna_shader_link_info link = { };
+ bool failed;
assert(vs->stage == MESA_SHADER_VERTEX);
assert(fs->stage == MESA_SHADER_FRAGMENT);
}
#endif
- if (etna_link_shader(&link, vs, fs)) {
+ if (DBG_ENABLED(ETNA_DBG_NIR))
+ failed = etna_link_shader_nir(&link, vs, fs);
+ else
+ failed = etna_link_shader(&link, vs, fs);
+
+ if (failed) {
/* linking failed: some fs inputs do not have corresponding
* vs outputs */
assert(0);