diff options
author | Brian Paul <[email protected]> | 2008-08-06 12:21:25 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-06 12:21:25 -0600 |
commit | 5fc6f6a33faed0dbfe67a0689d8f261633e21529 (patch) | |
tree | 121abc6fc7d340b6ca3d9dabcc2efe751fa05112 /src | |
parent | ac553c6ce4718aa1e90f49c910c14e13d0d5de39 (diff) |
mesa: glsl: check for rect tex samplers
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index e36b689b704..9c17dceb191 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -3635,7 +3635,15 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, slang_info_log_error(A->log, "illegal assignment to '%s'", varName); return GL_FALSE; } - else { +#if FEATURE_es2_glsl /* XXX should use FEATURE_texture_rect */ + /* disallow rect samplers */ + if (var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECT || + var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECTSHADOW) { + slang_info_log_error(A->log, "invalid sampler type for '%s'", varName); + return GL_FALSE; + } +#endif + { GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype); store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex); } |