summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar Rundgren <oskar.rundgren@imgtec.com>2023-05-04 18:34:42 +0100
committerMarge Bot <emma+marge@anholt.net>2023-05-16 18:09:03 +0000
commit9bce479efc72212bae92766ee549ce5ce5d55000 (patch)
treea53dd1fcce1f73900b238b5ab46ac687e5c66850
parent48bf9c736f92e22791e24f1c202020179ff7e790 (diff)
downloadmesa-9bce479efc72212bae92766ee549ce5ce5d55000.tar.gz
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>
-rw-r--r--src/imagination/include/hwdef/rogue_hw_defs.h5
-rw-r--r--src/imagination/vulkan/pvr_job_transfer.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/imagination/include/hwdef/rogue_hw_defs.h b/src/imagination/include/hwdef/rogue_hw_defs.h
index f238b67c9cc..b040e01809e 100644
--- a/src/imagination/include/hwdef/rogue_hw_defs.h
+++ b/src/imagination/include/hwdef/rogue_hw_defs.h
@@ -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
diff --git a/src/imagination/vulkan/pvr_job_transfer.c b/src/imagination/vulkan/pvr_job_transfer.c
index 5af859c3024..87f06d7c448 100644
--- a/src/imagination/vulkan/pvr_job_transfer.c
+++ b/src/imagination/vulkan/pvr_job_transfer.c
@@ -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))