diff options
author | Karol Herbst <[email protected]> | 2018-07-19 11:44:31 +0200 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2018-11-14 02:09:11 +0100 |
commit | 099728b1151184f7a110f3a16c999fe7ef9229cc (patch) | |
tree | 24b62893010910866fcfd6464f0d215203b18078 /src/compiler | |
parent | 80db331c2d477f8f4bc5c2b0373573f505f676e5 (diff) |
nir: replace nir_load_system_value calls with appropiate builder functions
this helps reduce the overall code changes when a bit_size parameter is
added to nir_load_system_value
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_lower_clip.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_wpos_center.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c index 7081295a500..9e2d9a5cf50 100644 --- a/src/compiler/nir/nir_lower_clip.c +++ b/src/compiler/nir/nir_lower_clip.c @@ -173,8 +173,7 @@ lower_clip_vs(nir_function_impl *impl, unsigned ucp_enables, for (int plane = 0; plane < MAX_CLIP_PLANES; plane++) { if (ucp_enables & (1 << plane)) { - nir_ssa_def *ucp = - nir_load_system_value(&b, nir_intrinsic_load_user_clip_plane, plane); + nir_ssa_def *ucp = nir_load_user_clip_plane(&b, plane); /* calculate clipdist[plane] - dot(ucp, cv): */ clipdist[plane] = nir_fdot4(&b, ucp, cv); diff --git a/src/compiler/nir/nir_lower_wpos_center.c b/src/compiler/nir/nir_lower_wpos_center.c index b6f3529c766..74f4d2a9701 100644 --- a/src/compiler/nir/nir_lower_wpos_center.c +++ b/src/compiler/nir/nir_lower_wpos_center.c @@ -57,8 +57,7 @@ update_fragcoord(nir_builder *b, nir_intrinsic_instr *intr, if (!for_sample_shading) { wpos = nir_fadd(b, wpos, nir_imm_vec4(b, 0.5f, 0.5f, 0.0f, 0.0f)); } else { - nir_ssa_def *spos = - nir_load_system_value(b, nir_intrinsic_load_sample_pos, 0); + nir_ssa_def *spos = nir_load_sample_pos(b); wpos = nir_fadd(b, wpos, nir_vec4(b, |