diff options
author | Brian Paul <[email protected]> | 2008-08-04 16:26:22 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-04 17:14:49 -0600 |
commit | 793bab2a368be6bbe93ab7f04b887f95c839c36b (patch) | |
tree | 5ed3952c70130343c327e6969d061611eade72db /src/mesa/shader/slang | |
parent | 9564e58df052462ab9d3c62576bcf9e38be65c1e (diff) |
mesa: glsl: varying vars can't be user-defined structs
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 8414f2ebde0..b69943022a7 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -3594,7 +3594,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, else { slang_info_log_error(A->log, "invalid datatype for uniform variable %s", - (char *) var->a_name); + varName); } return GL_FALSE; } @@ -3616,6 +3616,13 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, if (dbg) printf("UNIFORM (sz %d) ", totalSize); } else if (var->type.qualifier == SLANG_QUAL_VARYING) { + if (var->type.specifier.type == SLANG_SPEC_STRUCT) { + slang_info_log_error(A->log, + "varying '%s' cannot be a structure type", + varName); + return GL_FALSE; + } + if (prog) { /* user-defined varying */ GLint varyingLoc = _mesa_add_varying(prog->Varying, varName, size); |