summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-10-12 14:26:52 -0400
committerChia-I Wu <olvaffe@gmail.com>2011-03-16 14:17:52 +0800
commitd5d833a353c6be84e1a993de8725f3117afbd1f6 (patch)
treeb430a7a3ff28262c63aeb7422648e4bb8486bc6c /src/mesa/drivers/dri
parent32197c0094103d6bb06f992049306daf227f5c8e (diff)
i915c: Add GL_OES_draw_texture support.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.h3
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions_es2.c14
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c2
4 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index c2e2a98af5..a5334f8367 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -851,6 +851,7 @@ intelInitContext(struct intel_context *intel,
intelInitExtensions(ctx);
break;
case API_OPENGLES:
+ intelInitExtensionsES1(ctx);
break;
case API_OPENGLES2:
intelInitExtensionsES2(ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.h b/src/mesa/drivers/dri/intel/intel_extensions.h
index fb2a846d39..9991c00010 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.h
+++ b/src/mesa/drivers/dri/intel/intel_extensions.h
@@ -33,6 +33,9 @@ extern void
intelInitExtensions(struct gl_context *ctx);
extern void
+intelInitExtensionsES1(struct gl_context *ctx);
+
+extern void
intelInitExtensionsES2(struct gl_context *ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_extensions_es2.c b/src/mesa/drivers/dri/intel/intel_extensions_es2.c
index 5ef6b0561d..ef7f2c968e 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions_es2.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions_es2.c
@@ -80,6 +80,20 @@ static const char *es2_extensions[] = {
NULL,
};
+void
+intelInitExtensionsES1(struct gl_context *ctx)
+{
+ int i;
+
+ /* Can't use driInitExtensions() since it uses extensions from
+ * main/remap_helper.h when called the first time. */
+
+ for (i = 0; es2_extensions[i]; i++)
+ _mesa_enable_extension(ctx, es2_extensions[i]);
+
+ _mesa_enable_extension(ctx, "GL_OES_draw_texture");
+}
+
/**
* \brief Extensions to disable.
*
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 2c3eab20fd..077c611901 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -119,4 +119,6 @@ intelInitTextureFuncs(struct dd_function_table *functions)
functions->NewTextureImage = intelNewTextureImage;
functions->DeleteTexture = intelDeleteTextureObject;
functions->FreeTexImageData = intelFreeTextureImageData;
+
+ functions->DrawTex = _mesa_meta_DrawTex;
}