intel/compiler: Don't use fs_visitor::bld in thread payload classes

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26301>
This commit is contained in:
Caio Oliveira
2023-11-20 23:17:12 -08:00
committed by Marge Bot
parent 2d6240ab14
commit 5de5a0d475
2 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -121,7 +121,7 @@ struct tes_thread_payload : public thread_payload {
};
struct gs_thread_payload : public thread_payload {
gs_thread_payload(const fs_visitor &v);
gs_thread_payload(fs_visitor &v);
fs_reg urb_handles;
fs_reg primitive_id;
@@ -154,7 +154,7 @@ protected:
};
struct task_mesh_thread_payload : public cs_thread_payload {
task_mesh_thread_payload(const fs_visitor &v);
task_mesh_thread_payload(fs_visitor &v);
fs_reg extended_parameter_0;
fs_reg local_index;
+9 -6
View File
@@ -99,17 +99,18 @@ tes_thread_payload::tes_thread_payload(const fs_visitor &v)
num_regs = r;
}
gs_thread_payload::gs_thread_payload(const fs_visitor &v)
gs_thread_payload::gs_thread_payload(fs_visitor &v)
{
struct brw_vue_prog_data *vue_prog_data = brw_vue_prog_data(v.prog_data);
struct brw_gs_prog_data *gs_prog_data = brw_gs_prog_data(v.prog_data);
const fs_builder bld = fs_builder(&v, v.dispatch_width).at_end();
/* R0: thread header. */
unsigned r = reg_unit(v.devinfo);
/* R1: output URB handles. */
urb_handles = v.bld.vgrf(BRW_REGISTER_TYPE_UD);
v.bld.AND(urb_handles, brw_ud8_grf(r, 0),
urb_handles = bld.vgrf(BRW_REGISTER_TYPE_UD);
bld.AND(urb_handles, brw_ud8_grf(r, 0),
v.devinfo->ver >= 20 ? brw_imm_ud(0xFFFFFF) : brw_imm_ud(0xFFFF));
r += reg_unit(v.devinfo);
@@ -415,7 +416,7 @@ cs_thread_payload::load_subgroup_id(const fs_builder &bld,
}
}
task_mesh_thread_payload::task_mesh_thread_payload(const fs_visitor &v)
task_mesh_thread_payload::task_mesh_thread_payload(fs_visitor &v)
: cs_thread_payload(v)
{
/* Task and Mesh Shader Payloads (SIMD8 and SIMD16)
@@ -437,6 +438,8 @@ task_mesh_thread_payload::task_mesh_thread_payload(const fs_visitor &v)
* the address to descriptors.
*/
const fs_builder bld = fs_builder(&v, v.dispatch_width).at_end();
unsigned r = 0;
assert(subgroup_id_.file != BAD_FILE);
extended_parameter_0 = retype(brw_vec1_grf(0, 3), BRW_REGISTER_TYPE_UD);
@@ -444,12 +447,12 @@ task_mesh_thread_payload::task_mesh_thread_payload(const fs_visitor &v)
if (v.devinfo->ver >= 20) {
urb_output = brw_ud1_grf(1, 0);
} else {
urb_output = v.bld.vgrf(BRW_REGISTER_TYPE_UD);
urb_output = bld.vgrf(BRW_REGISTER_TYPE_UD);
/* In both mesh and task shader payload, lower 16 bits of g0.6 is
* an offset within Slice's Local URB, which says where shader is
* supposed to output its data.
*/
v.bld.AND(urb_output, brw_ud1_grf(0, 6), brw_imm_ud(0xFFFF));
bld.AND(urb_output, brw_ud1_grf(0, 6), brw_imm_ud(0xFFFF));
}
if (v.stage == MESA_SHADER_MESH) {