nir/edgeflags: update outputs written when lowering edge flags.
In theory you can rerun the info gather pass, but in practice that doesn't always end well. Be consistent inside this pass and update the info. While we're here, change the inputs read to use VERT_BIT_EDGEFLAG. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11313>
This commit is contained in:
@@ -77,11 +77,12 @@ lower_impl(nir_function_impl *impl)
|
||||
in->data.location = VERT_ATTRIB_EDGEFLAG;
|
||||
|
||||
in->data.driver_location = shader->num_inputs++;
|
||||
shader->info.inputs_read |= BITFIELD64_BIT(VERT_ATTRIB_EDGEFLAG);
|
||||
shader->info.inputs_read |= VERT_BIT_EDGEFLAG;
|
||||
|
||||
out = nir_variable_create(shader, nir_var_shader_out,
|
||||
glsl_vec4_type(), "edgeflag_out");
|
||||
out->data.location = VARYING_SLOT_EDGE;
|
||||
shader->info.outputs_written |= VARYING_BIT_EDGE;
|
||||
|
||||
def = nir_load_var(&b, in);
|
||||
nir_store_var(&b, out, def, 0xf);
|
||||
|
||||
Reference in New Issue
Block a user