mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 22:30:40 +02:00
aco: use correct addition opcodes in gfx6-8 RT prolog
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 60dd9d797e ("aco: Swizzle ray launch IDs in the RT prolog")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39232>
This commit is contained in:
parent
da728d5a1a
commit
7a09e4a740
1 changed files with 11 additions and 4 deletions
|
|
@ -250,10 +250,17 @@ select_rt_prolog(Program* program, ac_shader_config* config,
|
|||
bld.sop2(aco_opcode::s_and_b32, Definition(tmp_wg_start_y, s1), Definition(scc, s1),
|
||||
Operand(tmp_wg_id_y, s1), Operand::c32(~workgroup_height_mask));
|
||||
|
||||
bld.vop2(aco_opcode::v_add_u32, Definition(tmp_swizzled_id_x, v1), Operand(tmp_wg_start_x, s1),
|
||||
Operand(tmp_swizzled_id_x, v1));
|
||||
bld.vop2(aco_opcode::v_add_u32, Definition(tmp_swizzled_id_y, v1), Operand(tmp_wg_start_y, s1),
|
||||
Operand(tmp_swizzled_id_y, v1));
|
||||
if (options->gfx_level < GFX9) {
|
||||
bld.vop2(aco_opcode::v_add_co_u32, Definition(tmp_swizzled_id_x, v1), Definition(vcc, s2),
|
||||
Operand(tmp_wg_start_x, s1), Operand(tmp_swizzled_id_x, v1));
|
||||
bld.vop2(aco_opcode::v_add_co_u32, Definition(tmp_swizzled_id_y, v1), Definition(vcc, s2),
|
||||
Operand(tmp_wg_start_y, s1), Operand(tmp_swizzled_id_y, v1));
|
||||
} else {
|
||||
bld.vop2(aco_opcode::v_add_u32, Definition(tmp_swizzled_id_x, v1), Operand(tmp_wg_start_x, s1),
|
||||
Operand(tmp_swizzled_id_x, v1));
|
||||
bld.vop2(aco_opcode::v_add_u32, Definition(tmp_swizzled_id_y, v1), Operand(tmp_wg_start_y, s1),
|
||||
Operand(tmp_swizzled_id_y, v1));
|
||||
}
|
||||
|
||||
/* We can only swizzle launch IDs if we run a full workgroup, and the resulting launch IDs
|
||||
* won't exceed the launch size. Calculate unswizzled launch IDs here to fall back to them
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue