From 099728b1151184f7a110f3a16c999fe7ef9229cc Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 19 Jul 2018 11:44:31 +0200 Subject: 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 Reviewed-by: Eric Anholt Signed-off-by: Karol Herbst --- src/compiler/nir/nir_lower_clip.c | 3 +-- src/compiler/nir/nir_lower_wpos_center.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/compiler') 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, -- cgit v1.2.3