[Mesa-dev] [PATCH 1/3] i965/nir: Add support for nir_intrinsic_load_front_face

Connor Abbott cwabbott0 at gmail.com
Sat Feb 14 13:00:44 PST 2015


I think we should be adding this to nir_emit_system_values_block()
like we do for the other system values. This should get us parity with
what we had before where we only called
emit_frontfacing_interpolation() once per shader.

On Sat, Feb 14, 2015 at 3:51 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index da81b61..28a5f64 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1205,8 +1205,11 @@ fs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
>        break;
>     }
>
> -   case nir_intrinsic_load_front_face:
> -      assert(!"TODO");
> +   case nir_intrinsic_load_front_face: {
> +      fs_reg *reg = emit_frontfacing_interpolation();
> +      emit(MOV(retype(dest, BRW_REGISTER_TYPE_D), *reg));
> +      break;
> +   }
>
>     case nir_intrinsic_load_sample_mask_in: {
>        fs_reg sample_mask_in = nir_system_values[SYSTEM_VALUE_SAMPLE_MASK_IN];
> --
> 2.2.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list