Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
assert(index <= 1);
return 2 + index;
case TGSI_SEMANTIC_GENERIC:
- if (index <= 63-4)
+ if (index < SI_MAX_IO_GENERIC)
return 4 + index;
assert(!"invalid generic index");
#define SI_MAX_VS_OUTPUTS 40
+/* Shader IO unique indices are supported for TGSI_SEMANTIC_GENERIC with an
+ * index smaller than this.
+ */
+#define SI_MAX_IO_GENERIC 60
+
/* SGPR user data indices */
enum {
/* GFX9 merged shaders have RW_BUFFERS among the first 8 system SGPRs,
switch (name) {
case TGSI_SEMANTIC_GENERIC:
/* don't process indices the function can't handle */
- if (index >= 60)
+ if (index >= SI_MAX_IO_GENERIC)
break;
/* fall through */
case TGSI_SEMANTIC_CLIPDIST:
case TGSI_SEMANTIC_GENERIC:
/* don't process indices the function can't handle */
- if (index >= 60)
+ if (index >= SI_MAX_IO_GENERIC)
break;
/* fall through */
case TGSI_SEMANTIC_POSITION: