summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-06 20:06:05 -0800
committerPaul Berry <[email protected]>2014-02-05 09:00:34 -0800
commitc61ec8d8e34e9bf30b3c4c84afa08f0a5b66b932 (patch)
treef660a11f655b3f456e40e0374c7048f105718197 /src/mesa/main/shaderapi.c
parent28e526d5580739e8b4098cd08c644b9157fdc94c (diff)
mesa/cs: Add a MESA_SHADER_COMPUTE stage and update switch statements.
This patch adds MESA_SHADER_COMPUTE to the gl_shader_stage enum. Also, where it is trivial to do so, it adds a compute shader case to switch statements that switch based on the type of shader. This avoids "unhandled switch case" compiler warnings. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 61ac0e35ac7..519b2001981 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -188,6 +188,8 @@ _mesa_validate_shader_target(const struct gl_context *ctx, GLenum type)
return ctx == NULL || ctx->Extensions.ARB_vertex_shader;
case GL_GEOMETRY_SHADER_ARB:
return ctx == NULL || _mesa_has_geometry_shaders(ctx);
+ case GL_COMPUTE_SHADER:
+ return ctx == NULL || ctx->Extensions.ARB_compute_shader;
default:
return false;
}
@@ -966,6 +968,9 @@ use_shader_program(struct gl_context *ctx, GLenum type,
case GL_GEOMETRY_SHADER_ARB:
/* Empty for now. */
break;
+ case GL_COMPUTE_SHADER:
+ /* Empty for now. */
+ break;
case GL_FRAGMENT_SHADER:
if (*target == ctx->Shader._CurrentFragmentProgram) {
_mesa_reference_shader_program(ctx,