diff options
author | Paul Berry <[email protected]> | 2014-01-08 01:54:26 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2014-02-05 09:04:58 -0800 |
commit | 5a79bdab3008a19a770b8b84fdf5582e72db72c9 (patch) | |
tree | 1ec7dac74d4ef16d0eedb9e9b9e3fd8bee76d10b /src/glsl/ast_to_hir.cpp | |
parent | f5c5438e1fb9b5b1e83c7081da518d9943fc82e8 (diff) |
glsl/cs: Prohibit user-defined ins/outs in compute shaders.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index a55c9694238..c89a26bf910 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2282,6 +2282,13 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, var->data.mode = ir_var_uniform; if (!is_parameter && is_varying_var(var, state->stage)) { + /* User-defined ins/outs are not permitted in compute shaders. */ + if (state->stage == MESA_SHADER_COMPUTE) { + _mesa_glsl_error(loc, state, + "user-defined input and output variables are not " + "permitted in compute shaders"); + } + /* This variable is being used to link data between shader stages (in * pre-glsl-1.30 parlance, it's a "varying"). Check that it has a type * that is allowed for such purposes. |