nir: Add a face_sysval argument to nir_lower_two_sided_color

This is needed for handling drivers that use an input for loading the
face, for example Panfrost with Midgard GPUs.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Tested-by: Urja Rannikko <urjaman@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5915>
This commit is contained in:
Icecream95
2020-07-14 22:17:34 +12:00
committed by Marge Bot
parent 2a6db94b05
commit 314ba5e174
6 changed files with 7 additions and 6 deletions

View File

@@ -4374,7 +4374,7 @@ void nir_lower_point_size_mov(nir_shader *shader,
bool nir_lower_frexp(nir_shader *nir);
void nir_lower_two_sided_color(nir_shader *shader);
void nir_lower_two_sided_color(nir_shader *shader, bool face_sysval);
bool nir_lower_clamp_color_outputs(nir_shader *shader);

View File

@@ -195,7 +195,7 @@ nir_lower_two_sided_color_impl(nir_function_impl *impl,
}
void
nir_lower_two_sided_color(nir_shader *shader)
nir_lower_two_sided_color(nir_shader *shader, bool face_sysval)
{
lower_2side_state state = {
.shader = shader,