diff options
author | Samuel Pitoiset <[email protected]> | 2019-07-09 08:44:00 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-07-09 09:54:24 +0200 |
commit | 611ddf794e61c8f2a2839d4c82689b6e12888b41 (patch) | |
tree | 8fecde0345cc538f8615898d05da0ef438b72e91 /src/amd | |
parent | eca8a478a5d041df45c16fd23ac226b984e6a04b (diff) |
radv: fix VGT_ESGS_RING_ITEMSIZE for GS as NGG on GFX10
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index e02d9451074..9431a0d1999 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1624,7 +1624,7 @@ calculate_ngg_info(const VkGraphicsPipelineCreateInfo *pCreateInfo, struct radv_shader_variant_info *gs_info = &pipeline->shaders[MESA_SHADER_GEOMETRY]->info; struct radv_es_output_info *es_info = radv_pipeline_has_tess(pipeline) ? &gs_info->tes.es_info : &gs_info->vs.es_info; - unsigned gs_type = MESA_SHADER_VERTEX; + unsigned gs_type = radv_pipeline_has_gs(pipeline) ? MESA_SHADER_GEOMETRY : MESA_SHADER_VERTEX; unsigned max_verts_per_prim = 3; // triangles unsigned min_verts_per_prim = gs_type == MESA_SHADER_GEOMETRY ? max_verts_per_prim : 1; @@ -1795,7 +1795,12 @@ calculate_ngg_info(const VkGraphicsPipelineCreateInfo *pCreateInfo, ngg.prim_amp_factor = prim_amp_factor; ngg.max_vert_out_per_gs_instance = max_vert_out_per_gs_instance; ngg.ngg_emit_size = max_gsprims * gsprim_lds_size; - ngg.vgt_esgs_ring_itemsize = 1; + + if (gs_type == MESA_SHADER_GEOMETRY) { + ngg.vgt_esgs_ring_itemsize = es_info->esgs_itemsize / 4; + } else { + ngg.vgt_esgs_ring_itemsize = 1; + } pipeline->graphics.esgs_ring_size = 4 * max_esverts * esvert_lds_size; |