diff options
author | Ilia Mirkin <[email protected]> | 2020-07-05 01:58:01 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-06 23:57:51 +0000 |
commit | 836d41d77265a2d2ca42bdbfd25de07b9bb134c9 (patch) | |
tree | 3723070b1f477cd342fd9419872f1b6ae594fde3 /src/freedreno | |
parent | f6aa0719cfaf10299d2c5112ddfbee91b4b732a9 (diff) |
ir3: use empirical size for params as used by the shader
For example only some UCPs may be used by the shader, triggering asserts
that too many consts are being uploaded.
While we're at it, also fix the const size when loading UCPs, since
otherwise it doesn't correspond to what the shader is actually using.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5752>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/ir3/ir3_nir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 5707cbcb66f..196c99f3024 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -483,8 +483,9 @@ ir3_nir_scan_driver_consts(nir_shader *shader, MAX2(layout->num_driver_params, IR3_DP_INSTID_BASE + 1); break; case nir_intrinsic_load_user_clip_plane: + idx = nir_intrinsic_ucp_id(intr); layout->num_driver_params = - MAX2(layout->num_driver_params, IR3_DP_UCP7_W + 1); + MAX2(layout->num_driver_params, IR3_DP_UCP0_X + (idx + 1) * 4); break; case nir_intrinsic_load_num_work_groups: layout->num_driver_params = |