pvr: Fix reordering of sub-cmds when performing ds subtile alignment

The use of list_move_to() meant that the first transfer sub-command wasn't being
correctly placed before the target graphics sub-command.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
This commit is contained in:
Matt Coster
2023-10-03 14:23:06 +01:00
committed by Marge Bot
parent 6ba3c5263d
commit fbca3d64ad

View File

@@ -1251,8 +1251,11 @@ pvr_sub_cmd_gfx_align_ds_subtiles(struct pvr_cmd_buffer *const cmd_buffer,
/* Now we have to fiddle with cmd_buffer to place this transfer command
* *before* the target gfx subcommand.
*
* Note the doc for list_move_to() is subtly wrong - item is placed
* directly *after* loc in the list, not "in front of".
*/
list_move_to(&new_sub_cmd->link, &prev_sub_cmd->link);
list_move_to(&new_sub_cmd->link, prev_sub_cmd->link.prev);
cmd_buffer->state.current_sub_cmd = prev_sub_cmd;
}