brw: Rename read_attribute_payload_intel to load_attribute_payload_intel

We're going to change the intrinsic to a load(...) which puts "load" in
the name.  Also, it's just more consistent with our usual terminology.

We also rename the corresponding backend opcode so they remain matched.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38482>
This commit is contained in:
Kenneth Graunke
2025-10-27 00:54:55 -07:00
committed by Marge Bot
parent 0f7590af81
commit 792762617a
9 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -765,7 +765,7 @@ visit_intrinsic(nir_intrinsic_instr *instr, struct divergence_state *state)
case nir_intrinsic_load_frag_offset_ir3:
case nir_intrinsic_bindless_resource_ir3:
case nir_intrinsic_ray_intersection_ir3:
case nir_intrinsic_read_attribute_payload_intel:
case nir_intrinsic_load_attribute_payload_intel:
case nir_intrinsic_load_urb_vec4_intel:
case nir_intrinsic_load_urb_lsc_intel:
case nir_intrinsic_load_buffer_ptr_kk:
+1 -1
View File
@@ -2425,7 +2425,7 @@ system_value("max_polygon_intel", 1, bit_sizes=[32])
# Read the attribute thread payload at a given offset
# src[] = { offset }
intrinsic("read_attribute_payload_intel", dest_comp=1, bit_sizes=[32],
intrinsic("load_attribute_payload_intel", dest_comp=1, bit_sizes=[32],
src_comp=[1],
flags=[CAN_ELIMINATE, CAN_REORDER])
+1 -1
View File
@@ -1299,7 +1299,7 @@ brw_assign_urb_setup(brw_shader &s)
* setup regs, now that the location of the constants has been chosen.
*/
foreach_block_and_inst_safe(block, brw_inst, inst, s.cfg) {
if (inst->opcode == FS_OPCODE_READ_ATTRIBUTE_PAYLOAD) {
if (inst->opcode == SHADER_OPCODE_LOAD_ATTRIBUTE_PAYLOAD) {
brw_reg offset = inst->src[0];
inst = brw_transform_inst(s, inst, SHADER_OPCODE_MOV_INDIRECT, 3);
inst->src[0] = retype(brw_vec8_grf(urb_start, 0), BRW_TYPE_UD);
+2 -1
View File
@@ -495,7 +495,8 @@ enum ENUM_PACKED opcode {
FS_OPCODE_INTERPOLATE_AT_SAMPLE,
FS_OPCODE_INTERPOLATE_AT_SHARED_OFFSET,
FS_OPCODE_INTERPOLATE_AT_PER_SLOT_OFFSET,
FS_OPCODE_READ_ATTRIBUTE_PAYLOAD,
SHADER_OPCODE_LOAD_ATTRIBUTE_PAYLOAD,
/**
* GLSL barrier()
+2 -2
View File
@@ -4528,11 +4528,11 @@ brw_from_nir_emit_fs_intrinsic(nir_to_brw_state &ntb,
brw_dynamic_per_primitive_remap(brw_wm_prog_data(s.prog_data)));
break;
case nir_intrinsic_read_attribute_payload_intel: {
case nir_intrinsic_load_attribute_payload_intel: {
const brw_reg offset = retype(
bld.emit_uniformize(get_nir_src(ntb, instr->src[0], 0)),
BRW_TYPE_UD);
bld.emit(FS_OPCODE_READ_ATTRIBUTE_PAYLOAD, retype(dest, BRW_TYPE_UD), offset);
bld.emit(SHADER_OPCODE_LOAD_ATTRIBUTE_PAYLOAD, retype(dest, BRW_TYPE_UD), offset);
break;
}
@@ -396,7 +396,7 @@ brw_get_lowered_simd_width(const brw_shader *shader, const brw_inst *inst)
get_fpu_lowered_simd_width(shader, inst));
}
case SHADER_OPCODE_MOV_INDIRECT:
case FS_OPCODE_READ_ATTRIBUTE_PAYLOAD: {
case SHADER_OPCODE_LOAD_ATTRIBUTE_PAYLOAD: {
/* From IVB and HSW PRMs:
*
* "2.When the destination requires two registers and the sources are
+1 -1
View File
@@ -983,7 +983,7 @@ brw_nir_lower_fs_inputs(nir_shader *nir,
nir_ieq_imm(b, index, INTEL_MSAA_FLAG_PRIMITIVE_ID_INDEX_MESH),
nir_imm_int(b, 0), per_vertex_offset);
indirect_primitive_id =
nir_read_attribute_payload_intel(b, attribute_offset);
nir_load_attribute_payload_intel(b, attribute_offset);
}
nir_foreach_shader_in_variable(var, nir) {
@@ -603,7 +603,7 @@ brw_nir_frag_convert_attrs_prim_to_vert_indirect(struct nir_shader *nir,
brw_nir_vertex_attribute_offset(b, attr_idx, devinfo),
per_primitive_stride);
nir_def *value =
nir_read_attribute_payload_intel(b, per_vertex_offset);
nir_load_attribute_payload_intel(b, per_vertex_offset);
/* Write back the values into the per-primitive location */
nir_store_per_primitive_payload_intel(
b, value, .base = location, .component = c);
+3 -2
View File
@@ -206,8 +206,9 @@ brw_instruction_name(const struct brw_isa_info *isa, const brw_inst *inst)
return "interp_shared_offset";
case FS_OPCODE_INTERPOLATE_AT_PER_SLOT_OFFSET:
return "interp_per_slot_offset";
case FS_OPCODE_READ_ATTRIBUTE_PAYLOAD:
return "fs_read_attribute_payload";
case SHADER_OPCODE_LOAD_ATTRIBUTE_PAYLOAD:
return "load_attribute_payload";
case SHADER_OPCODE_BARRIER:
return "barrier";