Module: Mesa Branch: master Commit: 35ffe4fec19c1756e72c1ebe568a192943cf6827 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=35ffe4fec19c1756e72c1ebe568a192943cf6827
Author: Connor Abbott <[email protected]> Date: Tue Mar 2 17:30:52 2021 +0100 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 <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076> --- src/freedreno/ir3/ir3_compiler_nir.c | 2 ++ src/freedreno/ir3/ir3_shader.h | 3 +++ src/gallium/drivers/freedreno/a3xx/fd3_program.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index dc407f5b083..98d6e1b53ae 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -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 * diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index 0be0ab18b1b..a92917f4a36 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -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) */ diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index 3d05abf7bb3..c2545ac8d77 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -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)); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
