Module: Mesa
Branch: main
Commit: 7ad69e2f7ee10c0e7afc302b9324e7a320424dcb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ad69e2f7ee10c0e7afc302b9324e7a320424dcb

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Sep 23 12:40:57 2021 +0200

radv: stop loading invocation ID for NGG vertex shaders

This is unnecessary and was copied from RadeonSI which needs it for
edge flags. RADV should never to read the invocation ID for VS.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timur Kristóf <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12997>

---

 src/amd/vulkan/radv_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 2bddfd5a53a..bdec41c9cd9 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1294,7 +1294,7 @@ radv_postprocess_config(const struct radv_device *device, 
const struct ac_shader
 
       bool tes_triangles =
          stage == MESA_SHADER_TESS_EVAL && info->tes.primitive_mode >= 4; /* 
GL_TRIANGLES */
-      if (info->uses_invocation_id || stage == MESA_SHADER_VERTEX) {
+      if (info->uses_invocation_id) {
          gs_vgpr_comp_cnt = 3; /* VGPR3 contains InvocationID. */
       } else if (info->uses_prim_id) {
          gs_vgpr_comp_cnt = 2; /* VGPR2 contains PrimitiveID. */

Reply via email to