tu: Fix SP_GS_PRIM_SIZE for large sizes

Based on the previous commit.

Fixes: 012773b ("turnip: Configure VPC for geometry shaders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10551>
(cherry picked from commit 3d5c1c4989)
This commit is contained in:
Connor Abbott 2021-04-30 18:07:58 +02:00 committed by Eric Engestrom
parent 42b5f56583
commit ccef1f34ae
2 changed files with 7 additions and 2 deletions

View file

@ -229,7 +229,7 @@
"description": "tu: Fix SP_GS_PRIM_SIZE for large sizes",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "012773be26aafb71ab232a5838d8e5e7dcc3dc55"
},

View file

@ -1136,8 +1136,13 @@ tu6_emit_vpc(struct tu_cs *cs,
tu_cs_emit_pkt4(cs, REG_A6XX_PC_PRIMITIVE_CNTL_6, 1);
tu_cs_emit(cs, A6XX_PC_PRIMITIVE_CNTL_6_STRIDE_IN_VPC(vec4_size));
uint32_t prim_size = prev_stage_output_size;
if (prim_size > 64)
prim_size = 64;
else if (prim_size == 64)
prim_size = 63;
tu_cs_emit_pkt4(cs, REG_A6XX_SP_GS_PRIM_SIZE, 1);
tu_cs_emit(cs, prev_stage_output_size);
tu_cs_emit(cs, prim_size);
}
}