diff options
author | Kristian Høgsberg <[email protected]> | 2010-05-24 10:01:38 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-05-24 10:02:13 -0400 |
commit | f67b020a942911f80b7b774c6d64701d1981c608 (patch) | |
tree | 346fe4eb66b537070037f544cf632b88b1bf02ec /src/mesa/shader/slang/slang_codegen.c | |
parent | 740c8ea6d371732f3530accde44836930e03cc80 (diff) |
mesa: Handle FEATURE_es2_glsl differences at runtime too
Now that we can support different APIs at runtime, we need to check the
context for the API we're currently providing as well.
https://bugs.freedesktop.org/show_bug.cgi?id=28194
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 4b876a460c2..2d8116850f9 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4971,6 +4971,7 @@ GLboolean _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, slang_unit_type type) { + GET_CURRENT_CONTEXT(ctx); struct gl_program *prog = A->program; const char *varName = (char *) var->a_name; GLboolean success = GL_TRUE; @@ -5000,7 +5001,8 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } #if FEATURE_es2_glsl /* XXX should use FEATURE_texture_rect */ /* disallow rect samplers */ - if (is_rect_sampler_spec(&var->type.specifier)) { + if (ctx->API == API_OPENGLES2 && + is_rect_sampler_spec(&var->type.specifier)) { slang_info_log_error(A->log, "invalid sampler type for '%s'", varName); return GL_FALSE; } |