mesa/shaderapi: add a getter for GL_SPIR_V_BINARY_ARB

v2: Use the 'spirv_data' member of gl_shader instead of a
   dedicated flag. (Timothy Arceri)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Nicolai Hähnle 2017-06-10 19:46:58 +02:00 committed by Eduardo Lima Mitev
parent 5bc03d2508
commit 4ccd00d762

View file

@ -966,6 +966,9 @@ get_shaderiv(struct gl_context *ctx, GLuint name, GLenum pname, GLint *params)
case GL_SHADER_SOURCE_LENGTH:
*params = shader->Source ? strlen((char *) shader->Source) + 1 : 0;
break;
case GL_SPIR_V_BINARY_ARB:
*params = (shader->spirv_data != NULL);
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)");
return;