nir/lower_fragcolor: preserve location_frac

this otherwise breaks component-based outputs

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25794>
This commit is contained in:
Mike Blumenkrantz
2023-10-18 12:20:37 -04:00
committed by Marge Bot
parent 71599a1a20
commit ad72772d93

View File

@@ -81,6 +81,7 @@ lower_fragcolor_intrin(nir_builder *b, nir_intrinsic_instr *instr, void *data)
nir_variable *out_color = nir_variable_create(b->shader, nir_var_shader_out, nir_variable *out_color = nir_variable_create(b->shader, nir_var_shader_out,
out->type, name); out->type, name);
out_color->data.location = FRAG_RESULT_DATA0 + i; out_color->data.location = FRAG_RESULT_DATA0 + i;
out_color->data.location_frac = out->data.location_frac;
out_color->data.driver_location = b->shader->num_outputs++; out_color->data.driver_location = b->shader->num_outputs++;
out_color->data.index = out->data.index; out_color->data.index = out->data.index;
nir_store_var(b, out_color, frag_color, writemask); nir_store_var(b, out_color, frag_color, writemask);