freedreno/a3xx: Fix SP_FS_CTRL_REG1_INITIALOUTSTANDING

Unfortunately this didn't fix anything, but I thought I might as well
include it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076>
This commit is contained in:
Connor Abbott
2021-03-02 17:30:52 +01:00
committed by Marge Bot
parent 8cd7950014
commit 35ffe4fec1
3 changed files with 6 additions and 1 deletions
+2
View File
@@ -1390,6 +1390,8 @@ static void add_sysval_input_compmask(struct ir3_context *ctx,
so->inputs[n].slot = slot;
so->inputs[n].compmask = compmask;
so->total_in++;
so->sysval_in += util_last_bit(compmask);
}
static struct ir3_instruction *
+3
View File
@@ -607,6 +607,9 @@ struct ir3_shader_variant {
*/
unsigned total_in;
/* sum of sysval input components (scalar). */
unsigned sysval_in;
/* For frag shaders, the total number of inputs (not scalar,
* ie. SP_VS_PARAM_REG.TOTALVSOUTVAR)
*/
@@ -308,7 +308,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
COND(fp->need_pixlod, A3XX_SP_FS_CTRL_REG0_PIXLODENABLE) |
A3XX_SP_FS_CTRL_REG0_LENGTH(fpbuffersz));
OUT_RING(ring, A3XX_SP_FS_CTRL_REG1_CONSTLENGTH(fp->constlen) |
A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING(fp->total_in) |
A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING(fp->sysval_in) |
A3XX_SP_FS_CTRL_REG1_CONSTFOOTPRINT(MAX2(fp->constlen - 1, 0)) |
A3XX_SP_FS_CTRL_REG1_HALFPRECVAROFFSET(63));