From f67b020a942911f80b7b774c6d64701d1981c608 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 24 May 2010 10:01:38 -0400 Subject: 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 --- src/mesa/shader/slang/slang_codegen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/shader/slang/slang_codegen.c') 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; } -- cgit v1.2.3