diff options
author | Neil Roberts <[email protected]> | 2020-06-22 09:49:33 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-06 21:59:16 +0000 |
commit | 121b82f6387c267731a18f3cb9762cedf99ebb6d (patch) | |
tree | c4f14e48316ce8e7e25cc36d72cd4c90895ec797 /src/compiler/nir | |
parent | 2c4616368b963c8aebfb549eec7a517fc5f8589e (diff) |
nir: Add intrinsics for the line width
The first intrinsic is intended to expose the value set by glLineWidth
to shaders internally. The second intrinsic exposes the value actually
sent to the hardware. This may be wider than the first one in order to
implement anti-aliasing. These will be used in later patches to
implement a line smoothing lowering pass.
v2: Add a second intrinsic for the expanded line width for
anti-aliasing.
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_intrinsics.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index db5de370187..d59926a2901 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -606,6 +606,8 @@ system_value("local_group_size", 3) system_value("global_invocation_id", 3, bit_sizes=[32, 64]) system_value("global_invocation_index", 1, bit_sizes=[32, 64]) system_value("work_dim", 1) +system_value("line_width", 1) +system_value("aa_line_width", 1) # Driver-specific viewport scale/offset parameters. # # VC4 and V3D need to emit a scaled version of the position in the vertex |