nir: replace more nir_load_system_value calls with builder functions
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
987744be98
commit
b9fec2b38c
|
@ -511,8 +511,8 @@ build_nir_btoi_r32g32b32_compute_shader(struct radv_device *dev)
|
||||||
output_img->data.descriptor_set = 0;
|
output_img->data.descriptor_set = 0;
|
||||||
output_img->data.binding = 1;
|
output_img->data.binding = 1;
|
||||||
|
|
||||||
nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0);
|
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
|
||||||
nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0);
|
nir_ssa_def *wg_id = nir_load_work_group_id(&b);
|
||||||
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
||||||
b.shader->info.cs.local_size[0],
|
b.shader->info.cs.local_size[0],
|
||||||
b.shader->info.cs.local_size[1],
|
b.shader->info.cs.local_size[1],
|
||||||
|
@ -932,8 +932,8 @@ build_nir_itoi_r32g32b32_compute_shader(struct radv_device *dev)
|
||||||
output_img->data.descriptor_set = 0;
|
output_img->data.descriptor_set = 0;
|
||||||
output_img->data.binding = 1;
|
output_img->data.binding = 1;
|
||||||
|
|
||||||
nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0);
|
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
|
||||||
nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0);
|
nir_ssa_def *wg_id = nir_load_work_group_id(&b);
|
||||||
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
||||||
b.shader->info.cs.local_size[0],
|
b.shader->info.cs.local_size[0],
|
||||||
b.shader->info.cs.local_size[1],
|
b.shader->info.cs.local_size[1],
|
||||||
|
@ -1331,8 +1331,8 @@ build_nir_cleari_r32g32b32_compute_shader(struct radv_device *dev)
|
||||||
output_img->data.descriptor_set = 0;
|
output_img->data.descriptor_set = 0;
|
||||||
output_img->data.binding = 0;
|
output_img->data.binding = 0;
|
||||||
|
|
||||||
nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0);
|
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
|
||||||
nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0);
|
nir_ssa_def *wg_id = nir_load_work_group_id(&b);
|
||||||
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
||||||
b.shader->info.cs.local_size[0],
|
b.shader->info.cs.local_size[0],
|
||||||
b.shader->info.cs.local_size[1],
|
b.shader->info.cs.local_size[1],
|
||||||
|
|
|
@ -1036,8 +1036,8 @@ build_clear_htile_mask_shader()
|
||||||
b.shader->info.cs.local_size[1] = 1;
|
b.shader->info.cs.local_size[1] = 1;
|
||||||
b.shader->info.cs.local_size[2] = 1;
|
b.shader->info.cs.local_size[2] = 1;
|
||||||
|
|
||||||
nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0);
|
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
|
||||||
nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0);
|
nir_ssa_def *wg_id = nir_load_work_group_id(&b);
|
||||||
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
||||||
b.shader->info.cs.local_size[0],
|
b.shader->info.cs.local_size[0],
|
||||||
b.shader->info.cs.local_size[1],
|
b.shader->info.cs.local_size[1],
|
||||||
|
|
|
@ -593,8 +593,8 @@ build_tfb_query_shader(struct radv_device *device)
|
||||||
nir_builder_instr_insert(&b, &src_buf->instr);
|
nir_builder_instr_insert(&b, &src_buf->instr);
|
||||||
|
|
||||||
/* Compute global ID. */
|
/* Compute global ID. */
|
||||||
nir_ssa_def *invoc_id = nir_load_system_value(&b, nir_intrinsic_load_local_invocation_id, 0);
|
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
|
||||||
nir_ssa_def *wg_id = nir_load_system_value(&b, nir_intrinsic_load_work_group_id, 0);
|
nir_ssa_def *wg_id = nir_load_work_group_id(&b);
|
||||||
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
nir_ssa_def *block_size = nir_imm_ivec4(&b,
|
||||||
b.shader->info.cs.local_size[0],
|
b.shader->info.cs.local_size[0],
|
||||||
b.shader->info.cs.local_size[1],
|
b.shader->info.cs.local_size[1],
|
||||||
|
|
|
@ -516,8 +516,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
|
||||||
c->scan->input_semantic_name[index] == TGSI_SEMANTIC_FACE) {
|
c->scan->input_semantic_name[index] == TGSI_SEMANTIC_FACE) {
|
||||||
nir_ssa_def *tgsi_frontface[4] = {
|
nir_ssa_def *tgsi_frontface[4] = {
|
||||||
nir_bcsel(&c->build,
|
nir_bcsel(&c->build,
|
||||||
nir_load_system_value(&c->build,
|
nir_load_front_face(&c->build),
|
||||||
nir_intrinsic_load_front_face, 0),
|
|
||||||
nir_imm_float(&c->build, 1.0),
|
nir_imm_float(&c->build, 1.0),
|
||||||
nir_imm_float(&c->build, -1.0)),
|
nir_imm_float(&c->build, -1.0)),
|
||||||
nir_imm_float(&c->build, 0.0),
|
nir_imm_float(&c->build, 0.0),
|
||||||
|
|
|
@ -1059,8 +1059,7 @@ brw_nir_create_passthrough_tcs(void *mem_ctx, const struct brw_compiler *compile
|
||||||
nir_intrinsic_instr *load;
|
nir_intrinsic_instr *load;
|
||||||
nir_intrinsic_instr *store;
|
nir_intrinsic_instr *store;
|
||||||
nir_ssa_def *zero = nir_imm_int(&b, 0);
|
nir_ssa_def *zero = nir_imm_int(&b, 0);
|
||||||
nir_ssa_def *invoc_id =
|
nir_ssa_def *invoc_id = nir_load_invocation_id(&b);
|
||||||
nir_load_system_value(&b, nir_intrinsic_load_invocation_id, 0);
|
|
||||||
|
|
||||||
nir->info.inputs_read = key->outputs_written &
|
nir->info.inputs_read = key->outputs_written &
|
||||||
~(VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER);
|
~(VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER);
|
||||||
|
|
Loading…
Reference in New Issue