summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-01-05 17:18:52 +0100
committerSamuel Pitoiset <[email protected]>2018-01-08 21:24:53 +0100
commitb462ceb482471dd4aacdd5fa7cef9fe25f823d70 (patch)
tree5f8fe2dea89a93201c05d191e53eea37fc73cfde /src/amd
parenta3c2a86757a3ca25453b7143f1c774c5f7fe499e (diff)
radv/gfx9: do not load VGPR1 when GS uses points or lines
VGPR1 is only needed for topology that needs 3 offsets like triangles or quads. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_shader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 971d3abac91..5d777a05e58 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -424,8 +424,10 @@ radv_fill_shader_variant(struct radv_device *device,
gs_vgpr_comp_cnt = 3; /* VGPR3 contains InvocationID. */
else if (info->uses_prim_id)
gs_vgpr_comp_cnt = 2; /* VGPR2 contains PrimitiveID. */
+ else if (variant->info.gs.vertices_in >= 3)
+ gs_vgpr_comp_cnt = 1; /* VGPR1 contains offsets 2, 3 */
else
- gs_vgpr_comp_cnt = 1; /* TODO: use input_prim */
+ gs_vgpr_comp_cnt = 0; /* VGPR0 contains offsets 0, 1 */
/* TODO: Figure out how many we actually need. */
variant->rsrc1 |= S_00B228_GS_VGPR_COMP_CNT(gs_vgpr_comp_cnt);