summaryrefslogtreecommitdiffstats
path: root/src/mesa/es
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/es')
-rw-r--r--src/mesa/es/glapi/Makefile2
-rw-r--r--src/mesa/es/glapi/base1_API.xml2
-rw-r--r--src/mesa/es/glapi/base2_API.xml2
-rw-r--r--src/mesa/es/glapi/es1_API.xml2
-rw-r--r--src/mesa/es/glapi/es1_COMPAT.xml2
-rw-r--r--src/mesa/es/glapi/es1_EXT.xml2
-rw-r--r--src/mesa/es/glapi/es2_API.xml2
-rw-r--r--src/mesa/es/glapi/es2_COMPAT.xml2
-rw-r--r--src/mesa/es/glapi/es2_EXT.xml2
-rw-r--r--src/mesa/es/glapi/es_COMPAT.xml4
-rw-r--r--src/mesa/es/glapi/es_EXT.xml5
-rw-r--r--src/mesa/es/glapi/gl_compare.py2
-rw-r--r--src/mesa/es/glapi/gl_parse_header.py2
-rw-r--r--src/mesa/es/main/APIspec.xml39
-rw-r--r--src/mesa/es/main/drawtex.c2
-rw-r--r--src/mesa/es/main/es_generator.py2
-rw-r--r--src/mesa/es/main/mfeatures_es1.h2
-rw-r--r--src/mesa/es/main/mfeatures_es2.h2
-rw-r--r--src/mesa/es/state_tracker/st_cb_drawtex.c13
19 files changed, 75 insertions, 16 deletions
diff --git a/src/mesa/es/glapi/Makefile b/src/mesa/es/glapi/Makefile
index 1e32af867d5..e8a9afab7c5 100644
--- a/src/mesa/es/glapi/Makefile
+++ b/src/mesa/es/glapi/Makefile
@@ -1,5 +1,5 @@
TOP = ../../../..
-GLAPI = ../../glapi
+GLAPI = ../../glapi/gen
include $(TOP)/configs/current
OUTPUTS := \
diff --git a/src/mesa/es/glapi/base1_API.xml b/src/mesa/es/glapi/base1_API.xml
index f5d136ccefc..72e41282726 100644
--- a/src/mesa/es/glapi/base1_API.xml
+++ b/src/mesa/es/glapi/base1_API.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL and OpenGL ES 1.x APIs
This file defines the base categories that can be shared by all APIs.
diff --git a/src/mesa/es/glapi/base2_API.xml b/src/mesa/es/glapi/base2_API.xml
index 6aa43b728ab..5657b8e775e 100644
--- a/src/mesa/es/glapi/base2_API.xml
+++ b/src/mesa/es/glapi/base2_API.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL and OpenGL ES 2.x APIs -->
diff --git a/src/mesa/es/glapi/es1_API.xml b/src/mesa/es/glapi/es1_API.xml
index 7ee5515f197..1ac14674583 100644
--- a/src/mesa/es/glapi/es1_API.xml
+++ b/src/mesa/es/glapi/es1_API.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL ES 1.x API -->
diff --git a/src/mesa/es/glapi/es1_COMPAT.xml b/src/mesa/es/glapi/es1_COMPAT.xml
index 4fc9223cc06..1f45a8c0b64 100644
--- a/src/mesa/es/glapi/es1_COMPAT.xml
+++ b/src/mesa/es/glapi/es1_COMPAT.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<OpenGLAPI>
diff --git a/src/mesa/es/glapi/es1_EXT.xml b/src/mesa/es/glapi/es1_EXT.xml
index de4868cfd4d..d4abd81046b 100644
--- a/src/mesa/es/glapi/es1_EXT.xml
+++ b/src/mesa/es/glapi/es1_EXT.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL ES 1.x extensions -->
diff --git a/src/mesa/es/glapi/es2_API.xml b/src/mesa/es/glapi/es2_API.xml
index 266c07613ce..b476dbe00f2 100644
--- a/src/mesa/es/glapi/es2_API.xml
+++ b/src/mesa/es/glapi/es2_API.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL ES 2.x API -->
diff --git a/src/mesa/es/glapi/es2_COMPAT.xml b/src/mesa/es/glapi/es2_COMPAT.xml
index 61f11a604e2..5ecd4a1ba6e 100644
--- a/src/mesa/es/glapi/es2_COMPAT.xml
+++ b/src/mesa/es/glapi/es2_COMPAT.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<OpenGLAPI>
diff --git a/src/mesa/es/glapi/es2_EXT.xml b/src/mesa/es/glapi/es2_EXT.xml
index 3615772b56f..dcf9858569f 100644
--- a/src/mesa/es/glapi/es2_EXT.xml
+++ b/src/mesa/es/glapi/es2_EXT.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL ES 2.x extensions -->
diff --git a/src/mesa/es/glapi/es_COMPAT.xml b/src/mesa/es/glapi/es_COMPAT.xml
index bb6d28db83d..1bd66dad306 100644
--- a/src/mesa/es/glapi/es_COMPAT.xml
+++ b/src/mesa/es/glapi/es_COMPAT.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<OpenGLAPI>
@@ -2641,6 +2641,6 @@
</function>
</category>
-<xi:include href="../../glapi/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="../../glapi/gen/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es_EXT.xml b/src/mesa/es/glapi/es_EXT.xml
index b76cda929ae..291a53b4b27 100644
--- a/src/mesa/es/glapi/es_EXT.xml
+++ b/src/mesa/es/glapi/es_EXT.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd">
<!-- OpenGL ES extensions -->
@@ -18,6 +18,9 @@
<enum name="PALETTE8_RGB5_A1_OES" value="0x8B99"/>
</category>
+<!-- 23. GL_OES_EGL_image -->
+<xi:include href="../../glapi/gen/OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<category name="GL_OES_depth24" number="24">
<enum name="DEPTH_COMPONENT24_OES" value="0x81A6"/>
</category>
diff --git a/src/mesa/es/glapi/gl_compare.py b/src/mesa/es/glapi/gl_compare.py
index 7a2148cb1fc..6b5e43bb98b 100644
--- a/src/mesa/es/glapi/gl_compare.py
+++ b/src/mesa/es/glapi/gl_compare.py
@@ -25,7 +25,7 @@ import sys
import os.path
import getopt
-GLAPI = "../../glapi"
+GLAPI = "../../glapi/gen"
sys.path.append(GLAPI)
import gl_XML
diff --git a/src/mesa/es/glapi/gl_parse_header.py b/src/mesa/es/glapi/gl_parse_header.py
index 8b8d16b3951..5382eba35c3 100644
--- a/src/mesa/es/glapi/gl_parse_header.py
+++ b/src/mesa/es/glapi/gl_parse_header.py
@@ -26,7 +26,7 @@ import os.path
import getopt
import re
-GLAPI = "../../glapi"
+GLAPI = "../../glapi/gen"
sys.path.append(GLAPI)
class HeaderParser(object):
diff --git a/src/mesa/es/main/APIspec.xml b/src/mesa/es/main/APIspec.xml
index f6f33130b15..17665d8df5b 100644
--- a/src/mesa/es/main/APIspec.xml
+++ b/src/mesa/es/main/APIspec.xml
@@ -3502,6 +3502,31 @@
</desc>
</template>
+<template name="EGLImageTargetTexture2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="image" type="GLeglImageOES"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ </desc>
+</template>
+
+<template name="EGLImageTargetRenderbufferStorage">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="image" type="GLeglImageOES"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
<api name="mesa" implementation="true">
<category name="MESA"/>
@@ -3770,6 +3795,10 @@
<!-- EXT_multi_draw_arrays -->
<function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
<function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
</api>
<api name="GLES1.1">
@@ -3811,6 +3840,7 @@
<category name="EXT_blend_minmax"/>
-->
<category name="EXT_multi_draw_arrays"/>
+ <category name="OES_EGL_image"/>
<category name="OES_matrix_palette"/>
@@ -4068,6 +4098,10 @@
<!-- EXT_multi_draw_arrays -->
<function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
<function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
</api>
<api name="GLES2.0">
@@ -4095,6 +4129,7 @@
<category name="EXT_blend_minmax"/>
-->
<category name="EXT_multi_draw_arrays"/>
+ <category name="OES_EGL_image"/>
<function name="CullFace" template="CullFace"/>
@@ -4292,6 +4327,10 @@
<!-- EXT_multi_draw_arrays -->
<function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
<function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
</api>
</apispec>
diff --git a/src/mesa/es/main/drawtex.c b/src/mesa/es/main/drawtex.c
index cbd41ca9759..42f44093972 100644
--- a/src/mesa/es/main/drawtex.c
+++ b/src/mesa/es/main/drawtex.c
@@ -25,7 +25,7 @@
#include "main/state.h"
#include "main/imports.h"
-#include "glapi/dispatch.h"
+#include "main/dispatch.h"
#if FEATURE_OES_draw_texture
diff --git a/src/mesa/es/main/es_generator.py b/src/mesa/es/main/es_generator.py
index 590f5940a7b..f736792deca 100644
--- a/src/mesa/es/main/es_generator.py
+++ b/src/mesa/es/main/es_generator.py
@@ -207,7 +207,7 @@ extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
#include "main/compiler.h"
#include "main/api_exec.h"
-#include "glapi/dispatch.h"
+#include "main/dispatch.h"
typedef void (*_glapi_proc)(void); /* generic function pointer */
"""
diff --git a/src/mesa/es/main/mfeatures_es1.h b/src/mesa/es/main/mfeatures_es1.h
index 6c2ece26080..17935502689 100644
--- a/src/mesa/es/main/mfeatures_es1.h
+++ b/src/mesa/es/main/mfeatures_es1.h
@@ -106,6 +106,8 @@
#define FEATURE_OES_draw_texture 1
#define FEATURE_OES_mapbuffer 1
+#define FEATURE_OES_EGL_image 1
+
#define FEATURE_extra_context_init 1
/*@}*/
diff --git a/src/mesa/es/main/mfeatures_es2.h b/src/mesa/es/main/mfeatures_es2.h
index f34782fedb9..a463bed11c6 100644
--- a/src/mesa/es/main/mfeatures_es2.h
+++ b/src/mesa/es/main/mfeatures_es2.h
@@ -106,6 +106,8 @@
#define FEATURE_OES_draw_texture 0
#define FEATURE_OES_mapbuffer 1
+#define FEATURE_OES_EGL_image 1
+
#define FEATURE_extra_context_init 1
/*@}*/
diff --git a/src/mesa/es/state_tracker/st_cb_drawtex.c b/src/mesa/es/state_tracker/st_cb_drawtex.c
index 0a5cba9d927..f75f4861a2f 100644
--- a/src/mesa/es/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/es/state_tracker/st_cb_drawtex.c
@@ -120,8 +120,11 @@ st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
GLboolean emitColor;
uint semantic_names[2 + MAX_TEXTURE_UNITS];
uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
+ struct pipe_vertex_element velements[2 + MAX_TEXTURE_UNITS];
GLbitfield inputs = VERT_BIT_POS;
+ st_validate_state(st);
+
/* determine if we need vertex color */
if (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL0)
emitColor = GL_TRUE;
@@ -232,6 +235,7 @@ st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_save_viewport(cso);
cso_save_vertex_shader(cso);
+ cso_save_vertex_elements(cso);
{
void *vs = lookup_shader(pipe, numAttribs,
@@ -239,6 +243,14 @@ st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_set_vertex_shader_handle(cso, vs);
}
+ for (i = 0; i < numAttribs; i++) {
+ velements[i].src_offset = i * 4 * sizeof(float);
+ velements[i].instance_divisor = 0;
+ velements[i].vertex_buffer_index = 0;
+ velements[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ }
+ cso_set_vertex_elements(cso, numAttribs, velements);
+
/* viewport state: viewport matching window dims */
{
const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
@@ -270,6 +282,7 @@ st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
/* restore state */
cso_restore_viewport(cso);
cso_restore_vertex_shader(cso);
+ cso_restore_vertex_elements(cso);
}