summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))