diff options
author | Brian <brian@yutani.localnet.net> | 2007-05-11 15:35:12 -0600 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-05-11 15:35:12 -0600 |
commit | cc358d861d76c58613145fa764e0481e7b693c2b (patch) | |
tree | 4b9fe6637e7d9c828207a244514c9569cb598015 /src/mesa/shader/slang | |
parent | 749e093e33a46a7201ec795e71e7fba6f756da7b (diff) |
user-declared uniform structs not supported yet (see bug 10908)
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index cf32b501a6..60ffc48f54 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2863,9 +2863,22 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, * MAX2(var->array_len, 1); if (prog) { /* user-defined uniform */ - GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, - size, datatype); - store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); + if (datatype == GL_NONE) { + if (var->type.specifier.type == SLANG_SPEC_STRUCT) { + _mesa_problem(NULL, "user-declared uniform structs not supported yet"); + } + else { + slang_info_log_error(A->log, + "invalid datatype for uniform variable %s", + (char *) var->a_name); + } + return GL_FALSE; + } + else { + GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, + size, datatype); + store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); + } } else { /* pre-defined uniform, like gl_ModelviewMatrix */ |