spv_check_supported(storage_16bit, cap);
break;
+ case SpvCapabilityShaderViewportIndexLayerEXT:
+ spv_check_supported(shader_viewport_index_layer, cap);
+ break;
+
default:
vtn_fail("Unhandled capability");
}
*mode = nir_var_shader_in;
else if (b->shader->info.stage == MESA_SHADER_GEOMETRY)
*mode = nir_var_shader_out;
+ else if (b->options && b->options->caps.shader_viewport_index_layer &&
+ (b->shader->info.stage == MESA_SHADER_VERTEX ||
+ b->shader->info.stage == MESA_SHADER_TESS_EVAL))
+ *mode = nir_var_shader_out;
else
vtn_fail("invalid stage for SpvBuiltInLayer");
break;
*location = VARYING_SLOT_VIEWPORT;
if (b->shader->info.stage == MESA_SHADER_GEOMETRY)
*mode = nir_var_shader_out;
+ else if (b->options && b->options->caps.shader_viewport_index_layer &&
+ (b->shader->info.stage == MESA_SHADER_VERTEX ||
+ b->shader->info.stage == MESA_SHADER_TESS_EVAL))
+ *mode = nir_var_shader_out;
else if (b->shader->info.stage == MESA_SHADER_FRAGMENT)
*mode = nir_var_shader_in;
else