diff options
author | Paul Berry <[email protected]> | 2014-01-06 20:06:05 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2014-02-05 09:00:34 -0800 |
commit | c61ec8d8e34e9bf30b3c4c84afa08f0a5b66b932 (patch) | |
tree | f660a11f655b3f456e40e0374c7048f105718197 /src/mesa/main/context.c | |
parent | 28e526d5580739e8b4098cd08c644b9157fdc94c (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/context.c')
-rw-r--r-- | src/mesa/main/context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index d0a14493ab5..69835a59eaf 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -498,6 +498,14 @@ init_program_limits(struct gl_context *ctx, gl_shader_stage stage, prog->MaxInputComponents = 16 * 4; /* old limit not to break tnl and swrast */ prog->MaxOutputComponents = 16 * 4; /* old limit not to break tnl and swrast */ break; + case MESA_SHADER_COMPUTE: + prog->MaxParameters = 0; /* not meaningful for compute shaders */ + prog->MaxAttribs = 0; /* not meaningful for compute shaders */ + prog->MaxAddressRegs = 0; /* not meaningful for compute shaders */ + prog->MaxUniformComponents = 4 * MAX_UNIFORMS; + prog->MaxInputComponents = 0; /* not meaningful for compute shaders */ + prog->MaxOutputComponents = 0; /* not meaningful for compute shaders */ + break; default: assert(0 && "Bad shader stage in init_program_limits()"); } |