diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-08-21 01:50:53 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-08-21 09:38:46 +0000 |
commit | 2e763f7c87cefbb0c2c8d692e8e1584f89b4c747 (patch) | |
tree | e2c70a097c11ddd6de37f1983daa63848160c8e6 | |
parent | 7fa17400350b324840de3c742f336aefcd493c47 (diff) |
radv: Use correct vgpr_comp_cnt for VS if both prim_id and instance_id are needed.
Should take the max of the 2.
Fixes: ea337c8b7e9 "radv/gfx10: fix VS input VGPRs with the legacy path"
Reviewed-by: Samuel Pitoiset <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 1e6a9a950d8..cb819388fa4 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -809,10 +809,12 @@ static void radv_postprocess_config(const struct radv_physical_device *pdevice, * If PrimID is disabled. InstanceID / StepRate1 is loaded instead. * StepRate0 is set to 1. so that VGPR3 doesn't have to be loaded. */ - if (info->vs.export_prim_id) { + if (info->info.vs.needs_instance_id && pdevice->rad_info.chip_class >= GFX10) { + vgpr_comp_cnt = 3; + } else if (info->vs.export_prim_id) { vgpr_comp_cnt = 2; } else if (info->info.vs.needs_instance_id) { - vgpr_comp_cnt = pdevice->rad_info.chip_class >= GFX10 ? 3 : 1; + vgpr_comp_cnt = 1; } else { vgpr_comp_cnt = 0; } |