summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-08-05 17:10:18 -0700
committerEric Anholt <[email protected]>2016-08-19 13:11:36 -0700
commitc35f9792202c4450d19c5616e2a38b9e81e418fe (patch)
tree58ac7d76a5932a8dff9e3afe1828a30dae4eddd1 /src/mesa/drivers/dri/i965
parent24728637e2c006012e4c0a3d87629b53beaddd3b (diff)
nir: Add nir_builder support for individual system value loads.
The previous nir_load_system_value(b, nir_intrinsic_load_whatever), 0) was rather verbose, when system values should be easy to generate. The index is left out because only one system value had an index included in it. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/blorp_blit.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_nir_intrinsics.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/blorp_blit.c b/src/mesa/drivers/dri/i965/blorp_blit.c
index edbd726fb6b..a4b3fe0e5b1 100644
--- a/src/mesa/drivers/dri/i965/blorp_blit.c
+++ b/src/mesa/drivers/dri/i965/blorp_blit.c
@@ -106,7 +106,7 @@ blorp_blit_get_frag_coords(nir_builder *b,
if (key->persample_msaa_dispatch) {
return nir_vec3(b, nir_channel(b, coord, 0), nir_channel(b, coord, 1),
- nir_load_system_value(b, nir_intrinsic_load_sample_id, 0));
+ nir_load_sample_id(b));
} else {
return nir_vec2(b, nir_channel(b, coord, 0), nir_channel(b, coord, 1));
}
diff --git a/src/mesa/drivers/dri/i965/brw_nir_intrinsics.c b/src/mesa/drivers/dri/i965/brw_nir_intrinsics.c
index 00155fbaffb..059d14d0e4f 100644
--- a/src/mesa/drivers/dri/i965/brw_nir_intrinsics.c
+++ b/src/mesa/drivers/dri/i965/brw_nir_intrinsics.c
@@ -82,8 +82,7 @@ lower_cs_intrinsics_convert_block(struct lower_intrinsics_state *state,
* cs_thread_local_id + channel_num;
*/
nir_ssa_def *thread_local_id = read_thread_local_id(state);
- nir_ssa_def *channel =
- nir_load_system_value(b, nir_intrinsic_load_channel_num, 0);
+ nir_ssa_def *channel = nir_load_channel_num(b);
sysval = nir_iadd(b, channel, thread_local_id);
break;
}
@@ -105,8 +104,7 @@ lower_cs_intrinsics_convert_block(struct lower_intrinsics_state *state,
*/
unsigned *size = nir->info.cs.local_size;
- nir_ssa_def *local_index =
- nir_load_system_value(b, nir_intrinsic_load_local_invocation_index, 0);
+ nir_ssa_def *local_index = nir_load_local_invocation_index(b);
nir_const_value uvec3;
uvec3.u32[0] = 1;