static void
convert_yuv_to_rgb(nir_builder *b, nir_tex_instr *tex,
- nir_ssa_def *y, nir_ssa_def *u, nir_ssa_def *v)
+ nir_ssa_def *y, nir_ssa_def *u, nir_ssa_def *v,
+ nir_ssa_def *a)
{
nir_const_value m[3] = {
{ .f32 = { 1.0f, 0.0f, 1.59602678f, 0.0f } },
nir_ssa_def *green = nir_fdot4(b, yuv, nir_build_imm(b, 4, 32, m[1]));
nir_ssa_def *blue = nir_fdot4(b, yuv, nir_build_imm(b, 4, 32, m[2]));
- nir_ssa_def *result = nir_vec4(b, red, green, blue, nir_imm_float(b, 1.0f));
+ nir_ssa_def *result = nir_vec4(b, red, green, blue, a);
nir_ssa_def_rewrite_uses(&tex->dest.ssa, nir_src_for_ssa(result));
}
convert_yuv_to_rgb(b, tex,
nir_channel(b, y, 0),
nir_channel(b, uv, 0),
- nir_channel(b, uv, 1));
+ nir_channel(b, uv, 1),
+ nir_imm_float(b, 1.0f));
}
static void
convert_yuv_to_rgb(b, tex,
nir_channel(b, y, 0),
nir_channel(b, u, 0),
- nir_channel(b, v, 0));
+ nir_channel(b, v, 0),
+ nir_imm_float(b, 1.0f));
}
static void
convert_yuv_to_rgb(b, tex,
nir_channel(b, y, 0),
nir_channel(b, xuxv, 1),
- nir_channel(b, xuxv, 3));
+ nir_channel(b, xuxv, 3),
+ nir_imm_float(b, 1.0f));
}
static void
convert_yuv_to_rgb(b, tex,
nir_channel(b, y, 1),
nir_channel(b, uxvx, 0),
- nir_channel(b, uxvx, 2));
+ nir_channel(b, uxvx, 2),
+ nir_imm_float(b, 1.0f));
}
/*