glsl_vec4_type(), "edgeflag_in");
in->data.location = VERT_ATTRIB_EDGEFLAG;
+ /* The edge flag is the last input in st/mesa. */
+ assert(shader->num_inputs == util_bitcount64(shader->info.inputs_read));
+ in->data.driver_location = shader->num_inputs++;
+ shader->info.inputs_read |= BITFIELD64_BIT(VERT_ATTRIB_EDGEFLAG);
+
out = nir_variable_create(shader, nir_var_shader_out,
glsl_vec4_type(), "edgeflag_out");
out->data.location = VARYING_SLOT_EDGE;
void nir_lower_passthrough_edgeflags(nir_shader *shader)
{
- nir_function *function = nir_shader_get_entrypoint(shader);
- if (function->impl)
- lower_impl(function->impl);
+ lower_impl(nir_shader_get_entrypoint(shader));
}