radv: remove unnecessary init of outinfo.export_prim_id for GS
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 Sep 2021 12:21:33 +0000 (14:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Sep 2021 13:42:52 +0000 (13:42 +0000)
When a geometry shader is present, not writing the gl_PrimitiveID is
undefined, so this is unnecessary. Note that this was never reached
on <= GFX8 because vs_common_out.export_prim_id from the GS key was
always FALSE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13062>

src/amd/vulkan/radv_shader_info.c

index d37c1e8..7b0c6eb 100644 (file)
@@ -612,9 +612,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
       case MESA_SHADER_TESS_EVAL:
          info->tes.outinfo.export_prim_id = true;
          break;
-      case MESA_SHADER_GEOMETRY:
-         info->vs.outinfo.export_prim_id = true;
-         break;
       default:
          break;
       }