pvr: Transfer fix blit with multiple emits

The PBE state words for second emit are at wrong offset. Add new
define ROGUE_NUM_PBESTATE_REG_WORDS_FOR_TRANSFER to fix the offset.
The last word is always 0.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>
This commit is contained in:
Oskar Rundgren 2023-05-04 18:34:42 +01:00 committed by Marge Bot
parent 48bf9c736f
commit 9bce479efc
2 changed files with 9 additions and 2 deletions

View file

@ -84,6 +84,11 @@
/* Number of PBESTATE_REG_WORD values that need setting up. */
#define ROGUE_NUM_PBESTATE_REG_WORDS 3U
/* Number of PBESTATE_REG_WORD used in transfer.
* The last word is not used.
*/
#define ROGUE_NUM_PBESTATE_REG_WORDS_FOR_TRANSFER 2U
/* Number of PBESTATE_STATE_WORD values that need setting up. */
#define ROGUE_NUM_PBESTATE_STATE_WORDS 2U

View file

@ -1201,12 +1201,14 @@ static VkResult pvr_pbe_setup(const struct pvr_transfer_cmd *transfer_cmd,
uint32_t *pbe_words;
/* Ensure the access into the pbe_wordx_mrty is made within its bounds. */
assert(i * ROGUE_NUM_PBESTATE_REG_WORDS <
assert(i * ROGUE_NUM_PBESTATE_REG_WORDS_FOR_TRANSFER <
ARRAY_SIZE(state->regs.pbe_wordx_mrty));
/* Ensure the access into pbe_setup_words is made within its bounds. */
assert(i * ROGUE_NUM_PBESTATE_STATE_WORDS < ARRAY_SIZE(pbe_setup_words));
pbe_regs = &state->regs.pbe_wordx_mrty[i * ROGUE_NUM_PBESTATE_REG_WORDS];
pbe_regs =
&state->regs
.pbe_wordx_mrty[i * ROGUE_NUM_PBESTATE_REG_WORDS_FOR_TRANSFER];
pbe_words = &pbe_setup_words[i * ROGUE_NUM_PBESTATE_STATE_WORDS];
if (PVR_HAS_ERN(dev_info, 42064))