forked from enlightenment/efl
update build for gles on s3c6410 testing
SVN revision: 43030
This commit is contained in:
parent
a60f577446
commit
8bd109e8ce
|
@ -394,10 +394,53 @@ AC_ARG_ENABLE(gl-flavor-gles,
|
||||||
gl_flavor_gles="no"
|
gl_flavor_gles="no"
|
||||||
fi
|
fi
|
||||||
], [
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
gl_flavor_gles="no"
|
gl_flavor_gles="no"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
## GLES variety sgx
|
||||||
|
gles_variety_sgx="no"
|
||||||
|
AC_MSG_CHECKING(whether to build GLES variety for SGX)
|
||||||
|
AC_ARG_ENABLE(gles-variety-sgx,
|
||||||
|
AC_HELP_STRING([--enable-gles-variety-sgx], [GLES variety SGX 3D unit]),
|
||||||
|
[
|
||||||
|
if test "x$enableval" = "xyes" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
||||||
|
gles_variety_sgx="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
gles_variety_sgx="no"
|
||||||
|
fi
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
gles_variety_sgx="no"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
## GLES variety s3c6410
|
||||||
|
gles_variety_s3c6410="no"
|
||||||
|
AC_MSG_CHECKING(whether to build GLES variety for s3c6410)
|
||||||
|
AC_ARG_ENABLE(gles-variety-s3c6410,
|
||||||
|
AC_HELP_STRING([--enable-gles-variety-s3c6410], [GLES variety s3c6410 3D unit]),
|
||||||
|
[
|
||||||
|
if test "x$enableval" = "xyes" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
|
||||||
|
gles_variety_s3c6410="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
gles_variety_s3c6410="no"
|
||||||
|
fi
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
gles_variety_s3c6410="no"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
## Engines
|
## Engines
|
||||||
|
|
||||||
|
@ -1266,7 +1309,7 @@ echo "Engines:"
|
||||||
echo " Software Memory Buffer.....: $have_evas_engine_buffer"
|
echo " Software Memory Buffer.....: $have_evas_engine_buffer"
|
||||||
echo " Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
|
echo " Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
|
||||||
echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
|
echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
|
||||||
echo " OpenGL X11.................: $have_evas_engine_gl_x11"
|
echo " OpenGL X11.................: $have_evas_engine_gl_x11 (GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
|
||||||
#echo " Cairo X11..................: $have_evas_engine_cairo_x11"
|
#echo " Cairo X11..................: $have_evas_engine_cairo_x11"
|
||||||
echo " Software GDI...............: $have_evas_engine_software_gdi"
|
echo " Software GDI...............: $have_evas_engine_software_gdi"
|
||||||
echo " Software DirectDraw........: $have_evas_engine_software_ddraw"
|
echo " Software DirectDraw........: $have_evas_engine_software_ddraw"
|
||||||
|
|
|
@ -162,24 +162,32 @@ else
|
||||||
fi
|
fi
|
||||||
AC_CHECK_HEADERS([EGL/egl.h X11/X.h X11/Xlib.h X11/extensions/Xrender.h], [have_egl="yes"])
|
AC_CHECK_HEADERS([EGL/egl.h X11/X.h X11/Xlib.h X11/extensions/Xrender.h], [have_egl="yes"])
|
||||||
if test "x${have_egl}" = "xyes" ; then
|
if test "x${have_egl}" = "xyes" ; then
|
||||||
have_gles20="no"
|
|
||||||
AC_CHECK_LIB(gles20, glTexImage2D, [have_gles20="yes"], , -lEGL)
|
|
||||||
if test "x${have_gles20}" = "xyes" ; then
|
|
||||||
evas_engine_[]$1[]_cflags="${x_cflags}"
|
|
||||||
evas_engine_[]$1[]_libs="${x_libs} -lgles20 -lEGL"
|
|
||||||
AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
|
|
||||||
evas_engine_gl_common_libs="-lgles20"
|
|
||||||
have_dep="yes"
|
|
||||||
fi
|
|
||||||
have_glesv2="no"
|
|
||||||
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lpthread -lm)
|
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lpthread -lm)
|
||||||
if test "x${have_glesv2}" = "xyes" ; then
|
if test "x${have_glesv2}" = "xyes" ; then
|
||||||
evas_engine_[]$1[]_cflags="${x_cflags}"
|
evas_engine_[]$1[]_cflags="${x_cflags}"
|
||||||
evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lpthread -lm -lEGL"
|
evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lpthread -lm -lEGL"
|
||||||
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
|
||||||
evas_engine_gl_common_libs="-lGLESv2 -lpthread -lm"
|
evas_engine_gl_common_libs="-lGLESv2 -lpthread -lm"
|
||||||
have_dep="yes"
|
have_dep="yes"
|
||||||
fi
|
fi
|
||||||
|
dnl samsung s3c6410 libs changed to be like the sgx ones. need a variety option
|
||||||
|
dnl have_gles20="no"
|
||||||
|
dnl AC_CHECK_LIB(gles20, glTexImage2D, [have_gles20="yes"], , -lEGL)
|
||||||
|
dnl if test "x${have_gles20}" = "xyes" ; then
|
||||||
|
dnl evas_engine_[]$1[]_cflags="${x_cflags}"
|
||||||
|
dnl evas_engine_[]$1[]_libs="${x_libs} -lgles20 -lEGL"
|
||||||
|
dnl AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
|
||||||
|
dnl evas_engine_gl_common_libs="-lgles20"
|
||||||
|
dnl have_dep="yes"
|
||||||
|
dnl fi
|
||||||
|
dnl have_glesv2="no"
|
||||||
|
dnl AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lpthread -lm)
|
||||||
|
dnl if test "x${have_glesv2}" = "xyes" ; then
|
||||||
|
dnl evas_engine_[]$1[]_cflags="${x_cflags}"
|
||||||
|
dnl evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lpthread -lm -lEGL"
|
||||||
|
dnl AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
||||||
|
dnl evas_engine_gl_common_libs="-lGLESv2 -lpthread -lm"
|
||||||
|
dnl have_dep="yes"
|
||||||
|
dnl fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
#else
|
#else
|
||||||
# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
# if defined(GLES_VARIETY_S3C6410)
|
# if defined(GLES_VARIETY_S3C6410)
|
||||||
# include <GLES/gl.h>
|
# include <GLES2/gl2.h>
|
||||||
|
//// this changed. this was the old style. above the new style
|
||||||
|
//# include <GLES/gl.h>
|
||||||
# elif defined(GLES_VARIETY_SGX)
|
# elif defined(GLES_VARIETY_SGX)
|
||||||
# include <GLES2/gl2.h>
|
# include <GLES2/gl2.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -217,7 +217,9 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
|
||||||
#define PIXEL_FORMAT GL_UNSIGNED_BYTE
|
#define PIXEL_FORMAT GL_UNSIGNED_BYTE
|
||||||
#endif
|
#endif
|
||||||
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
||||||
|
#ifdef GL_UNPACK_ROW_LENGTH
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||||
|
#endif
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||||
// +-+
|
// +-+
|
||||||
// +-+
|
// +-+
|
||||||
|
@ -342,7 +344,9 @@ void
|
||||||
evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, int w, int h, int fh)
|
evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, int w, int h, int fh)
|
||||||
{
|
{
|
||||||
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
||||||
|
#ifdef GL_UNPACK_ROW_LENGTH
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||||
|
#endif
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||||
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
tex->x, tex->y, w, h,
|
tex->x, tex->y, w, h,
|
||||||
|
@ -398,6 +402,8 @@ evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h)
|
||||||
void
|
void
|
||||||
evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, int w, int h)
|
evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, int w, int h)
|
||||||
{
|
{
|
||||||
|
// FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2
|
||||||
|
#ifdef GL_UNPACK_ROW_LENGTH
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]);
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||||
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
||||||
|
@ -417,6 +423,59 @@ evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, int w, int
|
||||||
0, 0, w / 2, h / 2,
|
0, 0, w / 2, h / 2,
|
||||||
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
rows[h + (h / 2)]);
|
rows[h + (h / 2)]);
|
||||||
|
#else
|
||||||
|
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
||||||
|
if ((rows[1] - rows[0]) == w)
|
||||||
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
|
0, 0, w, h,
|
||||||
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
|
rows[0]);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int y;
|
||||||
|
|
||||||
|
for (y = 0; y < h; y++)
|
||||||
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
|
0, y, w, 1,
|
||||||
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
|
rows[y]);
|
||||||
|
}
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D, tex->ptu->texture);
|
||||||
|
if ((rows[h + 1] - rows[h]) == (w / 2))
|
||||||
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
|
0, 0, w / 2, h / 2,
|
||||||
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
|
rows[h]);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int y;
|
||||||
|
|
||||||
|
for (y = 0; y < (h / 2); y++)
|
||||||
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
|
0, y, w / 2, 1,
|
||||||
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
|
rows[h + y]);
|
||||||
|
}
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D, tex->ptv->texture);
|
||||||
|
if ((rows[h + (h / 2) + 1] - rows[h + (h / 2)]) == (w / 2))
|
||||||
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
|
0, 0, w / 2, h / 2,
|
||||||
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
|
rows[h + (h / 2)]);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int y;
|
||||||
|
|
||||||
|
for (y = 0; y < (h / 2); y++)
|
||||||
|
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||||
|
0, y, w / 2, 1,
|
||||||
|
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||||
|
rows[h + (h / 2) + y]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (tex->pt->texture != tex->gc->shader.cur_tex)
|
if (tex->pt->texture != tex->gc->shader.cur_tex)
|
||||||
{
|
{
|
||||||
glBindTexture(GL_TEXTURE_2D, tex->gc->shader.cur_tex);
|
glBindTexture(GL_TEXTURE_2D, tex->gc->shader.cur_tex);
|
||||||
|
|
|
@ -8,11 +8,18 @@
|
||||||
# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
# if defined(GLES_VARIETY_S3C6410)
|
# if defined(GLES_VARIETY_S3C6410)
|
||||||
# include <EGL/egl.h>
|
# include <EGL/egl.h>
|
||||||
# include <GLES/gl.h>
|
# include <GLES2/gl2.h>
|
||||||
# include <X11/Xlib.h>
|
# include <X11/Xlib.h>
|
||||||
# include <X11/Xatom.h>
|
# include <X11/Xatom.h>
|
||||||
# include <X11/Xutil.h>
|
# include <X11/Xutil.h>
|
||||||
# include <X11/extensions/Xrender.h>
|
# include <X11/extensions/Xrender.h>
|
||||||
|
//// this changed. this was the old style. above the new style
|
||||||
|
//# include <EGL/egl.h>
|
||||||
|
//# include <GLES/gl.h>
|
||||||
|
//# include <X11/Xlib.h>
|
||||||
|
//# include <X11/Xatom.h>
|
||||||
|
//# include <X11/Xutil.h>
|
||||||
|
//# include <X11/extensions/Xrender.h>
|
||||||
# elif defined(GLES_VARIETY_SGX)
|
# elif defined(GLES_VARIETY_SGX)
|
||||||
# define SUPPORT_X11 1
|
# define SUPPORT_X11 1
|
||||||
# include <EGL/egl.h>
|
# include <EGL/egl.h>
|
||||||
|
|
Loading…
Reference in New Issue