On 26 March 2016 at 21:02, Rob Clark <robdcl...@gmail.com> wrote:
> From: Rob Clark <robcl...@freedesktop.org>
>
> Signed-off-by: Rob Clark <robcl...@freedesktop.org>
> Reviewed-by: Connor Abbott <cwabbo...@gmail.com>
> ---
>  src/compiler/Makefile.sources                |   1 +
>  src/compiler/nir/nir.h                       |  12 ++
>  src/compiler/nir/nir_lower_wpos_ytransform.c | 310 
> +++++++++++++++++++++++++++
>  3 files changed, 323 insertions(+)
>  create mode 100644 src/compiler/nir/nir_lower_wpos_ytransform.c
>
> diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
> index 1f85172..c6c1769 100644
> --- a/src/compiler/Makefile.sources
> +++ b/src/compiler/Makefile.sources
> @@ -204,6 +204,7 @@ NIR_FILES = \
>         nir/nir_lower_vars_to_ssa.c \
>         nir/nir_lower_var_copies.c \
>         nir/nir_lower_vec_to_movs.c \
> +       nir/nir_lower_wpos_ytransform.c \
>         nir/nir_metadata.c \
>         nir/nir_move_vec_src_uses_to_dest.c \
>         nir/nir_normalize_cubemap_coords.c \
> diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
> index 37d2907..d67213a 100644
> --- a/src/compiler/nir/nir.h
> +++ b/src/compiler/nir/nir.h
> @@ -2244,6 +2244,18 @@ void nir_lower_clip_fs(nir_shader *shader, unsigned 
> ucp_enables);
>
>  void nir_lower_two_sided_color(nir_shader *shader);
>
> +
> +typedef struct nir_lower_wpos_ytransform_options {
> +   int state_tokens[5];
> +   bool fs_coord_origin_upper_left :1;
> +   bool fs_coord_origin_lower_left :1;
> +   bool fs_coord_pixel_center_integer :1;
> +   bool fs_coord_pixel_center_half_integer :1;
> +} nir_lower_wpos_ytransform_options;
> +
> +bool nir_lower_wpos_ytransform(nir_shader *shader,
> +                               const nir_lower_wpos_ytransform_options 
> *options);
> +
[Unrelated]
I'm wondering if moving all the lowering passes out into a separate
header won't be a good idea.
Currently ~40 places use the passes, while "\<nir.*\.h\>" gets
included in ~140 places

Aiming towards "this is a great/terrible idea", not seeking a
flamewar/bikeshed battles and alike.

-Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to