The line coord is a coordinate along the axis perpendicular to the line.
It is in the range [0,1] between the two edges of the line. It is
available at least on Broadcom hardware.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
return nir_intrinsic_load_frag_coord;
case SYSTEM_VALUE_POINT_COORD:
return nir_intrinsic_load_point_coord;
+ case SYSTEM_VALUE_LINE_COORD:
+ return nir_intrinsic_load_line_coord;
case SYSTEM_VALUE_FRONT_FACE:
return nir_intrinsic_load_front_face;
case SYSTEM_VALUE_SAMPLE_ID:
return SYSTEM_VALUE_FRAG_COORD;
case nir_intrinsic_load_point_coord:
return SYSTEM_VALUE_POINT_COORD;
+ case nir_intrinsic_load_line_coord:
+ return SYSTEM_VALUE_LINE_COORD;
case nir_intrinsic_load_front_face:
return SYSTEM_VALUE_FRONT_FACE;
case nir_intrinsic_load_sample_id:
case nir_intrinsic_interp_deref_at_vertex:
case nir_intrinsic_load_tess_coord:
case nir_intrinsic_load_point_coord:
+ case nir_intrinsic_load_line_coord:
case nir_intrinsic_load_frag_coord:
case nir_intrinsic_load_sample_pos:
case nir_intrinsic_load_vertex_id_zero_base:
case nir_intrinsic_load_draw_id:
case nir_intrinsic_load_frag_coord:
case nir_intrinsic_load_point_coord:
+ case nir_intrinsic_load_line_coord:
case nir_intrinsic_load_front_face:
case nir_intrinsic_load_vertex_id:
case nir_intrinsic_load_vertex_id_zero_base:
system_value("frag_coord", 4)
system_value("point_coord", 2)
+system_value("line_coord", 1)
system_value("front_face", 1, bit_sizes=[1, 32])
system_value("vertex_id", 1)
system_value("vertex_id_zero_base", 1)
ENUM(SYSTEM_VALUE_INVOCATION_ID),
ENUM(SYSTEM_VALUE_FRAG_COORD),
ENUM(SYSTEM_VALUE_POINT_COORD),
+ ENUM(SYSTEM_VALUE_LINE_COORD),
ENUM(SYSTEM_VALUE_FRONT_FACE),
ENUM(SYSTEM_VALUE_SAMPLE_ID),
ENUM(SYSTEM_VALUE_SAMPLE_POS),
/*@{*/
SYSTEM_VALUE_FRAG_COORD,
SYSTEM_VALUE_POINT_COORD,
+ SYSTEM_VALUE_LINE_COORD, /**< Coord along axis perpendicular to line */
SYSTEM_VALUE_FRONT_FACE,
SYSTEM_VALUE_SAMPLE_ID,
SYSTEM_VALUE_SAMPLE_POS,