summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/getstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/getstring.c')
-rw-r--r--src/mesa/main/getstring.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 3d5ae0b694b..e2f5af29b37 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -33,6 +33,7 @@
#include "mtypes.h"
#include "macros.h"
#include "version.h"
+#include "spirv_extensions.h"
/**
* Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query.
@@ -206,6 +207,18 @@ _mesa_GetStringi(GLenum name, GLuint index)
}
return (const GLubyte *) version;
}
+ case GL_SPIR_V_EXTENSIONS:
+ if (!ctx->Extensions.ARB_spirv_extensions) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetStringi");
+ return (const GLubyte *) 0;
+ }
+
+ if (index >= _mesa_get_spirv_extension_count(ctx)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetStringi(index=%u)", index);
+ return (const GLubyte *) 0;
+ }
+ return _mesa_get_enabled_spirv_extension(ctx, index);
+
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetStringi");
return (const GLubyte *) 0;