mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
aux/draw: vectorize aaline computations
This makes it a bit more similar to the TGSI version, which makes modifying them easier to review. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19899>
This commit is contained in:
parent
64e74b4277
commit
20964181c1
1 changed files with 3 additions and 5 deletions
|
|
@ -174,12 +174,10 @@ nir_lower_aaline_block(nir_block *block,
|
|||
nir_ssa_def *out_input = intrin->src[1].ssa;
|
||||
b->cursor = nir_before_instr(instr);
|
||||
nir_ssa_def *lw = nir_load_var(b, state->line_width_input);
|
||||
nir_ssa_def *tmp = nir_fsat(b, nir_fadd(b, nir_channel(b, lw, 1),
|
||||
nir_fneg(b, nir_fabs(b, nir_channel(b, lw, 0)))));
|
||||
nir_ssa_def *tmp1 = nir_fsat(b, nir_fadd(b, nir_channel(b, lw, 3),
|
||||
nir_fneg(b, nir_fabs(b, nir_channel(b, lw, 2)))));
|
||||
nir_ssa_def *tmp = nir_fsat(b, nir_fadd(b, nir_channels(b, lw, 0xa),
|
||||
nir_fneg(b, nir_fabs(b, nir_channels(b, lw, 0x5)))));
|
||||
|
||||
tmp = nir_fmul(b, tmp, tmp1);
|
||||
tmp = nir_fmul(b, nir_channel(b, tmp, 0), nir_channel(b, tmp, 1));
|
||||
tmp = nir_fmul(b, nir_channel(b, out_input, 3), tmp);
|
||||
|
||||
nir_ssa_def *out = nir_vec4(b, nir_channel(b, out_input, 0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue