nir,spirv: Add support for the ShaderCallKHR scope

It's currently entirely trivial.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479>
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index d1b7da5..d680ab8 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -6620,6 +6620,8 @@
       return scope_queuefamily;
    case NIR_SCOPE_DEVICE:
       return scope_device;
+   case NIR_SCOPE_SHADER_CALL:
+      unreachable("unsupported scope");
    }
    unreachable("invalid scope");
 }
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index f177de7..e43062f 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1708,6 +1708,7 @@
    NIR_SCOPE_NONE,
    NIR_SCOPE_INVOCATION,
    NIR_SCOPE_SUBGROUP,
+   NIR_SCOPE_SHADER_CALL,
    NIR_SCOPE_WORKGROUP,
    NIR_SCOPE_QUEUE_FAMILY,
    NIR_SCOPE_DEVICE,
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 8c62b12..9286636 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -975,6 +975,7 @@
          case NIR_SCOPE_DEVICE:       fprintf(fp, "DEVICE");       break;
          case NIR_SCOPE_QUEUE_FAMILY: fprintf(fp, "QUEUE_FAMILY"); break;
          case NIR_SCOPE_WORKGROUP:    fprintf(fp, "WORKGROUP");    break;
+         case NIR_SCOPE_SHADER_CALL:  fprintf(fp, "SHADER_CALL");  break;
          case NIR_SCOPE_SUBGROUP:     fprintf(fp, "SUBGROUP");     break;
          case NIR_SCOPE_INVOCATION:   fprintf(fp, "INVOCATION");   break;
          }
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 88390bd..e0eda4c 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2363,6 +2363,10 @@
       nir_scope = NIR_SCOPE_INVOCATION;
       break;
 
+   case SpvScopeShaderCallKHR:
+      nir_scope = NIR_SCOPE_SHADER_CALL;
+      break;
+
    default:
       vtn_fail("Invalid memory scope");
    }