aux/draw: fix aalines and aapoints for shaders with explicit FragData outputs

all color outputs need to be rewritten with coverage, not just FragColor

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11065>
This commit is contained in:
Mike Blumenkrantz 2021-05-28 09:53:00 -04:00 committed by Marge Bot
parent 1f7d2b4994
commit bd893bfdf8

View file

@ -167,7 +167,7 @@ nir_lower_aaline_block(nir_block *block,
nir_variable *var = nir_intrinsic_get_var(intrin, 0);
if (var->data.mode != nir_var_shader_out)
continue;
if (var->data.location != FRAG_RESULT_COLOR)
if (var->data.location < FRAG_RESULT_DATA0 && var->data.location != FRAG_RESULT_COLOR)
continue;
nir_ssa_def *out_input = intrin->src[1].ssa;
@ -262,7 +262,7 @@ nir_lower_aapoint_block(nir_block *block,
nir_variable *var = nir_intrinsic_get_var(intrin, 0);
if (var->data.mode != nir_var_shader_out)
continue;
if (var->data.location != FRAG_RESULT_COLOR)
if (var->data.location < FRAG_RESULT_DATA0 && var->data.location != FRAG_RESULT_COLOR)
continue;
nir_ssa_def *out_input = intrin->src[1].ssa;