mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
freedreno/a3xx: fix write to bogus register
The loops for updating the multiple packed fields in SP_VS_OUT[] and SP_VS_VPC_DST[] will zero out one register beyond the last that on required. Which is normally not a problem (and is kinda convenient when looking at cmdstream dumps) unless we have maximum (16) varyings. Fix loop termination condition so that this does not happen. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
c37889b5ac
commit
670418740f
1 changed files with 2 additions and 2 deletions
|
|
@ -406,7 +406,7 @@ fd3_program_emit(struct fd_ringbuffer *ring,
|
|||
A3XX_SP_VS_PARAM_REG_PSIZEREGID(psize_regid) |
|
||||
A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR(align(fp->total_in, 4) / 4));
|
||||
|
||||
for (i = 0, j = -1; j < (int)fp->inputs_count; i++) {
|
||||
for (i = 0, j = -1; (i < 8) && (j < (int)fp->inputs_count); i++) {
|
||||
uint32_t reg = 0;
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_SP_VS_OUT_REG(i), 1);
|
||||
|
|
@ -428,7 +428,7 @@ fd3_program_emit(struct fd_ringbuffer *ring,
|
|||
OUT_RING(ring, reg);
|
||||
}
|
||||
|
||||
for (i = 0, j = -1; j < (int)fp->inputs_count; i++) {
|
||||
for (i = 0, j = -1; (i < 4) && (j < (int)fp->inputs_count); i++) {
|
||||
uint32_t reg = 0;
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_SP_VS_VPC_DST_REG(i), 1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue