diff options
Diffstat (limited to 'src/mesa/es')
-rw-r--r-- | src/mesa/es/Makefile | 5 | ||||
-rw-r--r-- | src/mesa/es/main/mfeatures_es1.h | 118 | ||||
-rw-r--r-- | src/mesa/es/main/mfeatures_es2.h | 118 | ||||
-rw-r--r-- | src/mesa/es/main/specials_es1.c | 5 | ||||
-rw-r--r-- | src/mesa/es/main/specials_es2.c | 5 | ||||
-rw-r--r-- | src/mesa/es/main/stubs.c | 7 | ||||
-rw-r--r-- | src/mesa/es/state_tracker/st_cb_drawtex.c | 13 |
7 files changed, 25 insertions, 246 deletions
diff --git a/src/mesa/es/Makefile b/src/mesa/es/Makefile index fbe67445c9..8b484853af 100644 --- a/src/mesa/es/Makefile +++ b/src/mesa/es/Makefile @@ -19,9 +19,8 @@ es1: $(ES1_LIBS) es2: $(ES2_LIBS) @rm -f subdirs-stamp-tmp -# force the inclusion of es's mfeatures.h -ES1_CPPFLAGS := -include main/mfeatures_es1.h -D__GL_EXPORTS -ES2_CPPFLAGS := -include main/mfeatures_es2.h -D__GL_EXPORTS +ES1_CPPFLAGS := -DFEATURE_ES1=1 -D__GL_EXPORTS +ES2_CPPFLAGS := -DFEATURE_ES2=1 -D__GL_EXPORTS ES1_OBJ_DIR := objs-es1 ES2_OBJ_DIR := objs-es2 diff --git a/src/mesa/es/main/mfeatures_es1.h b/src/mesa/es/main/mfeatures_es1.h deleted file mode 100644 index 1793550268..0000000000 --- a/src/mesa/es/main/mfeatures_es1.h +++ /dev/null @@ -1,118 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file mfeatures.h - * - * The #defines in this file enable/disable Mesa features needed - * for OpenGL ES 1.1. - */ - - -#ifndef MFEATURES_ES1_H -#define MFEATURES_ES1_H - -/* this file replaces main/mfeatures.h */ -#ifdef FEATURES_H -#error "main/mfeatures.h was wrongly included" -#endif -#define FEATURES_H - -#define ASSERT_NO_FEATURE() ASSERT(0) - -/* - * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1. - */ -#ifndef _HAVE_FULL_GL -#define _HAVE_FULL_GL 1 -#endif - -#ifdef IN_DRI_DRIVER -#define FEATURE_remap_table 1 -#else -#define FEATURE_remap_table 0 -#endif - -#define FEATURE_accum 0 -#define FEATURE_arrayelt 0 -#define FEATURE_attrib 0 -#define FEATURE_beginend 0 -#define FEATURE_colortable 0 -#define FEATURE_convolve 0 -#define FEATURE_dispatch 1 -#define FEATURE_dlist 0 -#define FEATURE_draw_read_buffer 0 -#define FEATURE_drawpix 0 -#define FEATURE_eval 0 -#define FEATURE_feedback 0 -#define FEATURE_fixedpt 1 -#define FEATURE_histogram 0 -#define FEATURE_pixel 0 -#define FEATURE_point_size_array 1 -#define FEATURE_queryobj 0 -#define FEATURE_rastpos 0 -#define FEATURE_texgen 1 -#define FEATURE_texture_fxt1 0 -#define FEATURE_texture_s3tc 0 -#define FEATURE_userclip 1 -#define FEATURE_vertex_array_byte 1 -#define FEATURE_es2_glsl 0 - -#define FEATURE_ARB_fragment_program _HAVE_FULL_GL -#define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL -#define FEATURE_ARB_vertex_program _HAVE_FULL_GL - -#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL -#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL -#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader) -#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects -#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects - -#define FEATURE_EXT_framebuffer_blit 0 -#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL -#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL -#define FEATURE_EXT_texture_sRGB 0 -#define FEATURE_ATI_fragment_shader 0 -#define FEATURE_MESA_program_debug _HAVE_FULL_GL -#define FEATURE_NV_fence 0 -#define FEATURE_NV_fragment_program 0 -#define FEATURE_NV_vertex_program 0 - -#define FEATURE_OES_framebuffer_object 1 -#define FEATURE_OES_draw_texture 1 -#define FEATURE_OES_mapbuffer 1 - -#define FEATURE_OES_EGL_image 1 - -#define FEATURE_extra_context_init 1 - -/*@}*/ - - - - -#endif /* MFEATURES_ES1_H */ diff --git a/src/mesa/es/main/mfeatures_es2.h b/src/mesa/es/main/mfeatures_es2.h deleted file mode 100644 index a463bed11c..0000000000 --- a/src/mesa/es/main/mfeatures_es2.h +++ /dev/null @@ -1,118 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file mfeatures.h - * - * The #defines in this file enable/disable Mesa features needed - * for OpenGL ES 2.0. - */ - - -#ifndef MFEATURES_ES2_H -#define MFEATURES_ES2_H - -/* this file replaces main/mfeatures.h */ -#ifdef FEATURES_H -#error "main/mfeatures.h was wrongly included" -#endif -#define FEATURES_H - -#define ASSERT_NO_FEATURE() ASSERT(0) - -/* - * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1. - */ -#ifndef _HAVE_FULL_GL -#define _HAVE_FULL_GL 1 -#endif - -#ifdef IN_DRI_DRIVER -#define FEATURE_remap_table 1 -#else -#define FEATURE_remap_table 0 -#endif - -#define FEATURE_accum 0 -#define FEATURE_arrayelt 0 -#define FEATURE_attrib 0 -#define FEATURE_beginend 0 -#define FEATURE_colortable 0 -#define FEATURE_convolve 0 -#define FEATURE_dispatch 1 -#define FEATURE_dlist 0 -#define FEATURE_draw_read_buffer 0 -#define FEATURE_drawpix 0 -#define FEATURE_eval 0 -#define FEATURE_feedback 0 -#define FEATURE_fixedpt 1 -#define FEATURE_histogram 0 -#define FEATURE_pixel 0 -#define FEATURE_point_size_array 1 -#define FEATURE_queryobj 0 -#define FEATURE_rastpos 0 -#define FEATURE_texgen 1 -#define FEATURE_texture_fxt1 0 -#define FEATURE_texture_s3tc 0 -#define FEATURE_userclip 1 -#define FEATURE_vertex_array_byte 1 -#define FEATURE_es2_glsl 1 - -#define FEATURE_ARB_fragment_program _HAVE_FULL_GL -#define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL -#define FEATURE_ARB_vertex_program _HAVE_FULL_GL - -#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL -#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL -#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader) -#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects -#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects - -#define FEATURE_EXT_framebuffer_blit 0 -#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL -#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL -#define FEATURE_EXT_texture_sRGB 0 -#define FEATURE_ATI_fragment_shader 0 -#define FEATURE_MESA_program_debug _HAVE_FULL_GL -#define FEATURE_NV_fence 0 -#define FEATURE_NV_fragment_program 0 -#define FEATURE_NV_vertex_program 0 - -#define FEATURE_OES_framebuffer_object 1 -#define FEATURE_OES_draw_texture 0 -#define FEATURE_OES_mapbuffer 1 - -#define FEATURE_OES_EGL_image 1 - -#define FEATURE_extra_context_init 1 - -/*@}*/ - - - - -#endif /* MFEATURES_ES2_H */ diff --git a/src/mesa/es/main/specials_es1.c b/src/mesa/es/main/specials_es1.c index c842007c22..92e24a03fe 100644 --- a/src/mesa/es/main/specials_es1.c +++ b/src/mesa/es/main/specials_es1.c @@ -153,6 +153,11 @@ make_extension_string(const GLcontext *ctx, char *str) if (ctx->Extensions.EXT_multi_draw_arrays) len += append_extension(&str, "GL_EXT_multi_draw_arrays"); +#if FEATURE_OES_EGL_image + if (ctx->Extensions.OES_EGL_image) + len += append_extension(&str, "GL_OES_EGL_image"); +#endif + return len; } diff --git a/src/mesa/es/main/specials_es2.c b/src/mesa/es/main/specials_es2.c index 10b4f25e0f..046cda6fc1 100644 --- a/src/mesa/es/main/specials_es2.c +++ b/src/mesa/es/main/specials_es2.c @@ -124,6 +124,11 @@ make_extension_string(const GLcontext *ctx, char *str) if (ctx->Extensions.EXT_multi_draw_arrays) len += append_extension(&str, "GL_EXT_multi_draw_arrays"); +#if FEATURE_OES_EGL_image + if (ctx->Extensions.OES_EGL_image) + len += append_extension(&str, "GL_OES_EGL_image"); +#endif + return len; } diff --git a/src/mesa/es/main/stubs.c b/src/mesa/es/main/stubs.c index e7b8bc780f..b829543cc0 100644 --- a/src/mesa/es/main/stubs.c +++ b/src/mesa/es/main/stubs.c @@ -37,13 +37,6 @@ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__); \ } while (0) -#if FEATURE_accum -/* This is a sanity check that to be sure we're using the correct mfeatures.h - * header. We don't want to accidentally use the one from mainline Mesa. - */ -#error "The wrong mfeatures.h file is being included!" -#endif - /* silence compiler warnings */ extern void GLAPIENTRY _vbo_Materialf(GLenum face, GLenum pname, GLfloat param); diff --git a/src/mesa/es/state_tracker/st_cb_drawtex.c b/src/mesa/es/state_tracker/st_cb_drawtex.c index 0a5cba9d92..f75f4861a2 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); } |