radeonsi: fix S_028C48_MAX_ALLOC_COUNT value
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 2 Aug 2019 10:03:15 +0000 (12:03 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Aug 2019 22:45:09 +0000 (18:45 -0400)
This field uses "value minus 1" encoding.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 8087d0a8c66d462c7024a8a625c50c8084690422..5cdad02469407399b22589ac8f8cd8f9540b1082 100644 (file)
@@ -5703,7 +5703,7 @@ static void si_init_config(struct si_context *sctx)
                }
 
                si_pm4_set_reg(pm4, R_028C48_PA_SC_BINNER_CNTL_1,
-                              S_028C48_MAX_ALLOC_COUNT(max_alloc_count) |
+                              S_028C48_MAX_ALLOC_COUNT(max_alloc_count - 1) |
                               S_028C48_MAX_PRIM_PER_BATCH(1023));
                si_pm4_set_reg(pm4, R_028C4C_PA_SC_CONSERVATIVE_RASTERIZATION_CNTL,
                               S_028C4C_NULL_SQUAD_AA_MASK_ENABLE(1));