radv: use the ES type to apply a workaround for NGG on GFX10
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 24 Mar 2023 07:23:24 +0000 (08:23 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Mar 2023 02:20:50 +0000 (02:20 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095>

src/amd/vulkan/radv_pipeline.c

index 598e7ed..e7c060e 100644 (file)
@@ -3876,8 +3876,8 @@ radv_pipeline_emit_hw_ngg(const struct radv_device *device, struct radeon_cmdbuf
     *
     * Requirement: GE_CNTL.VERT_GRP_SIZE = VGT_GS_ONCHIP_CNTL.ES_VERTS_PER_SUBGRP - 5
     */
-   if (pdevice->rad_info.gfx_level == GFX10 &&
-       !radv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_CTRL) && ngg_state->hw_max_esverts != 256) {
+   if (pdevice->rad_info.gfx_level == GFX10 && es_type != MESA_SHADER_TESS_EVAL &&
+       ngg_state->hw_max_esverts != 256) {
       ge_cntl &= C_03096C_VERT_GRP_SIZE;
 
       if (ngg_state->hw_max_esverts > 5) {