summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-07-11 08:44:15 +0200
committerSamuel Pitoiset <[email protected]>2019-07-11 15:45:51 +0200
commit7286865f6de4c0f949c3301de2e3bebbedcada75 (patch)
tree60cbc51ff2a16138bb9a99fa73b57f886362b878 /src
parent45b73b3aa9aa9d0d1fd8ebe0b7bebc09a0cc108e (diff)
radv/gfx10: Use correct ES shader for es_vgpr_comp_cnt for GS.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_shader.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 79418b401fb..1987d439612 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -796,11 +796,14 @@ static void radv_postprocess_config(const struct radv_physical_device *pdevice,
if (pdevice->rad_info.chip_class >= GFX10 &&
(stage == MESA_SHADER_VERTEX || stage == MESA_SHADER_TESS_EVAL || stage == MESA_SHADER_GEOMETRY)) {
unsigned gs_vgpr_comp_cnt, es_vgpr_comp_cnt;
+ gl_shader_stage es_stage = stage;
+ if (stage == MESA_SHADER_GEOMETRY)
+ es_stage = info->gs.es_type;
/* VGPR5-8: (VertexID, UserVGPR0, UserVGPR1, UserVGPR2 / InstanceID) */
- if (stage == MESA_SHADER_VERTEX) {
+ if (es_stage == MESA_SHADER_VERTEX) {
es_vgpr_comp_cnt = info->info.vs.needs_instance_id ? 3 : 0;
- } else if (stage == MESA_SHADER_TESS_EVAL) {
+ } else if (es_stage == MESA_SHADER_TESS_EVAL) {
bool enable_prim_id = info->tes.export_prim_id || info->info.uses_prim_id;
es_vgpr_comp_cnt = enable_prim_id ? 3 : 2;
}