diff options
author | Ian Romanick <[email protected]> | 2012-07-27 17:48:30 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-29 15:09:35 -0700 |
commit | 33e01d93ca1a1d3183243c308a2c87f4b969b3bd (patch) | |
tree | 9654da4b59bceec0a1c41294c4e68d6209ba81b7 /src/mesa/main/texenv.c | |
parent | 8a263b6efd2c520a4ed9c98b9c8142c6c2c6f389 (diff) |
mesa/es: Validate glGetTexEnv parameters in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texenv.c')
-rw-r--r-- | src/mesa/main/texenv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index c2044a8c2c0..f1064c5e36c 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -588,7 +588,7 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, return texUnit->Combine.SourceRGB[rgb_idx]; } case GL_SOURCE3_RGB_NV: - if (ctx->Extensions.NV_texture_env_combine4) { + if (ctx->API == API_OPENGL && ctx->Extensions.NV_texture_env_combine4) { return texUnit->Combine.SourceRGB[3]; } else { @@ -602,7 +602,7 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, return texUnit->Combine.SourceA[alpha_idx]; } case GL_SOURCE3_ALPHA_NV: - if (ctx->Extensions.NV_texture_env_combine4) { + if (ctx->API == API_OPENGL && ctx->Extensions.NV_texture_env_combine4) { return texUnit->Combine.SourceA[3]; } else { @@ -616,7 +616,7 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, return texUnit->Combine.OperandRGB[op_rgb]; } case GL_OPERAND3_RGB_NV: - if (ctx->Extensions.NV_texture_env_combine4) { + if (ctx->API == API_OPENGL && ctx->Extensions.NV_texture_env_combine4) { return texUnit->Combine.OperandRGB[3]; } else { @@ -630,7 +630,7 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, return texUnit->Combine.OperandA[op_alpha]; } case GL_OPERAND3_ALPHA_NV: - if (ctx->Extensions.NV_texture_env_combine4) { + if (ctx->API == API_OPENGL && ctx->Extensions.NV_texture_env_combine4) { return texUnit->Combine.OperandA[3]; } else { @@ -643,7 +643,7 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, return 1 << texUnit->Combine.ScaleShiftA; case GL_BUMP_TARGET_ATI: /* spec doesn't say so, but I think this should be queryable */ - if (ctx->Extensions.ATI_envmap_bumpmap) { + if (ctx->API == API_OPENGL && ctx->Extensions.ATI_envmap_bumpmap) { return texUnit->BumpTarget; } else { |