evas - partial rendering support now for qualcomm extn too.
This commit is contained in:
parent
1f7ae48215
commit
fdabe06989
|
@ -1,3 +1,7 @@
|
||||||
|
2013-06-11 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
|
* Support qualcomm begin/end tile extension for partial update
|
||||||
|
|
||||||
2013-06-06 ChunEon Park (Hermet)
|
2013-06-06 ChunEon Park (Hermet)
|
||||||
|
|
||||||
* Edje: support edc map color set
|
* Edje: support edc map color set
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -187,6 +187,7 @@ Improvements:
|
||||||
* Edje entry emtis signals on keydown/up for theme to use
|
* Edje entry emtis signals on keydown/up for theme to use
|
||||||
* Turn on scissors always to abe able to to partual render on some GL implementations properly.
|
* Turn on scissors always to abe able to to partual render on some GL implementations properly.
|
||||||
* Evas gl engine - dont map dri/drm buffer unless we are going to render.
|
* Evas gl engine - dont map dri/drm buffer unless we are going to render.
|
||||||
|
* Partial rendering support in evas for several gl drivers.
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
|
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
|
||||||
|
|
|
@ -126,6 +126,42 @@
|
||||||
#define EGL_MAP_GL_TEXTURE_OPTION_WRITE_SEC (1<<1)
|
#define EGL_MAP_GL_TEXTURE_OPTION_WRITE_SEC (1<<1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_COLOR_BUFFER_BIT0_QCOM
|
||||||
|
// if GL_COLOR_BUFFER_BIT0_QCOM just assume the rest arent... saves fluff
|
||||||
|
#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
|
||||||
|
#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
|
||||||
|
#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
|
||||||
|
#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
|
||||||
|
#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
|
||||||
|
#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
|
||||||
|
#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
|
||||||
|
#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
|
||||||
|
#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
|
||||||
|
#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
|
||||||
|
#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
|
||||||
|
#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
|
||||||
|
#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
|
||||||
|
#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
|
||||||
|
#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
|
||||||
|
#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
|
||||||
|
#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
|
||||||
|
#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SHAD_VERTEX 0
|
#define SHAD_VERTEX 0
|
||||||
#define SHAD_COLOR 1
|
#define SHAD_COLOR 1
|
||||||
#define SHAD_TEXUV 2
|
#define SHAD_TEXUV 2
|
||||||
|
@ -354,6 +390,7 @@ struct _Evas_Engine_GL_Context
|
||||||
struct {
|
struct {
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
Eina_Bool enabled : 1;
|
Eina_Bool enabled : 1;
|
||||||
|
Eina_Bool used : 1;
|
||||||
} master_clip;
|
} master_clip;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
@ -558,6 +595,7 @@ void evas_gl_common_context_free(Evas_Engine_GL_Context *gc);
|
||||||
void evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
|
void evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
|
||||||
void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc);
|
void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc);
|
||||||
void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot);
|
void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot);
|
||||||
|
void evas_gl_common_context_done(Evas_Engine_GL_Context *gc);
|
||||||
void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface);
|
void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface);
|
||||||
|
|
||||||
void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
|
void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
|
||||||
|
|
|
@ -27,6 +27,8 @@ void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d) = NULL;
|
||||||
void (*glsym_glReleaseShaderCompiler)(void) = NULL;
|
void (*glsym_glReleaseShaderCompiler)(void) = NULL;
|
||||||
void *(*glsym_glMapBuffer) (GLenum a, GLenum b) = NULL;
|
void *(*glsym_glMapBuffer) (GLenum a, GLenum b) = NULL;
|
||||||
GLboolean (*glsym_glUnmapBuffer) (GLenum a) = NULL;
|
GLboolean (*glsym_glUnmapBuffer) (GLenum a) = NULL;
|
||||||
|
void (*glsym_glStartTiling) (GLuint a, GLuint b, GLuint c, GLuint d, GLuint e) = NULL;
|
||||||
|
void (*glsym_glEndTiling) (GLuint a) = NULL;
|
||||||
|
|
||||||
#ifdef GL_GLES
|
#ifdef GL_GLES
|
||||||
// just used for finding symbols :)
|
// just used for finding symbols :)
|
||||||
|
@ -142,6 +144,12 @@ gl_symbols(void)
|
||||||
FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompilerARB", glsym_func_void);
|
FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompilerARB", glsym_func_void);
|
||||||
FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompiler", glsym_func_void);
|
FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompiler", glsym_func_void);
|
||||||
|
|
||||||
|
FINDSYM(glsym_glStartTiling, "glStartTilingQCOM", glsym_func_void);
|
||||||
|
FINDSYM(glsym_glStartTiling, "glStartTiling", glsym_func_void);
|
||||||
|
|
||||||
|
FINDSYM(glsym_glEndTiling, "glEndTilingQCOM", glsym_func_void);
|
||||||
|
FINDSYM(glsym_glEndTiling, "glEndTiling", glsym_func_void);
|
||||||
|
|
||||||
if (!getenv("EVAS_GL_MAPBUFFER_DISABLE"))
|
if (!getenv("EVAS_GL_MAPBUFFER_DISABLE"))
|
||||||
{
|
{
|
||||||
FINDSYM(glsym_glMapBuffer, "glMapBufferOES", glsym_func_void_ptr);
|
FINDSYM(glsym_glMapBuffer, "glMapBufferOES", glsym_func_void_ptr);
|
||||||
|
@ -618,6 +626,11 @@ evas_gl_common_context_new(void)
|
||||||
shared->info.sec_image_map = 1;
|
shared->info.sec_image_map = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (!strstr((char *)ext, "GL_QCOM_tiled_rendering"))
|
||||||
|
{
|
||||||
|
glsym_glStartTiling = NULL;
|
||||||
|
glsym_glEndTiling = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,
|
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,
|
||||||
&(shared->info.max_texture_units));
|
&(shared->info.max_texture_units));
|
||||||
|
@ -1020,6 +1033,16 @@ evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot)
|
||||||
if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc);
|
if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
evas_gl_common_context_done(Evas_Engine_GL_Context *gc)
|
||||||
|
{
|
||||||
|
if (gc->master_clip.used)
|
||||||
|
{
|
||||||
|
if (glsym_glEndTiling) glsym_glEndTiling(GL_COLOR_BUFFER_BIT0_QCOM);
|
||||||
|
gc->master_clip.used = EINA_FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
|
evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
|
||||||
Evas_GL_Image *surface)
|
Evas_GL_Image *surface)
|
||||||
|
@ -1027,7 +1050,8 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
|
||||||
if (surface == gc->pipe[0].shader.surface) return;
|
if (surface == gc->pipe[0].shader.surface) return;
|
||||||
|
|
||||||
evas_gl_common_context_flush(gc);
|
evas_gl_common_context_flush(gc);
|
||||||
|
evas_gl_common_context_done(gc);
|
||||||
|
|
||||||
gc->state.current.cur_prog = PRG_INVALID;
|
gc->state.current.cur_prog = PRG_INVALID;
|
||||||
gc->state.current.cur_tex = -1;
|
gc->state.current.cur_tex = -1;
|
||||||
gc->state.current.cur_texu = -1;
|
gc->state.current.cur_texu = -1;
|
||||||
|
@ -2569,6 +2593,32 @@ scissor_rot(Evas_Engine_GL_Context *gc EINA_UNUSED,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
start_tiling(Evas_Engine_GL_Context *gc EINA_UNUSED,
|
||||||
|
int rot, int gw, int gh, int cx, int cy, int cw, int ch,
|
||||||
|
int bitmask)
|
||||||
|
{
|
||||||
|
if (!glsym_glStartTiling) return;
|
||||||
|
switch (rot)
|
||||||
|
{
|
||||||
|
case 0: // UP this way: ^
|
||||||
|
glsym_glStartTiling(cx, cy, cw, ch, bitmask);
|
||||||
|
break;
|
||||||
|
case 90: // UP this way: <
|
||||||
|
glsym_glStartTiling(gh - (cy + ch), cx, ch, cw, bitmask);
|
||||||
|
break;
|
||||||
|
case 180: // UP this way: v
|
||||||
|
glsym_glStartTiling(gw - (cx + cw), gh - (cy + ch), cw, ch, bitmask);
|
||||||
|
break;
|
||||||
|
case 270: // UP this way: >
|
||||||
|
glsym_glStartTiling(cy, gw - (cx + cw), ch, cw, bitmask);
|
||||||
|
break;
|
||||||
|
default: // assume up is up
|
||||||
|
glsym_glStartTiling(cx, cy, cw, ch, bitmask);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
shader_array_flush(Evas_Engine_GL_Context *gc)
|
shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
{
|
{
|
||||||
|
@ -2742,6 +2792,24 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
ch = gc->master_clip.h;
|
ch = gc->master_clip.h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((glsym_glStartTiling) && (glsym_glEndTiling) &&
|
||||||
|
(gc->master_clip.enabled) &&
|
||||||
|
(gc->master_clip.w > 0) && (gc->master_clip.h > 0))
|
||||||
|
{
|
||||||
|
if (!gc->master_clip.used)
|
||||||
|
{
|
||||||
|
if (!fbo)
|
||||||
|
start_tiling(gc, gc->rot, gw, gh,
|
||||||
|
gc->master_clip.x,
|
||||||
|
gh - gc->master_clip.y - gc->master_clip.h,
|
||||||
|
gc->master_clip.w, gc->master_clip.h, 0);
|
||||||
|
else
|
||||||
|
start_tiling(gc, 0, gw, gh,
|
||||||
|
gc->master_clip.x, gc->master_clip.y,
|
||||||
|
gc->master_clip.w, gc->master_clip.h, 0);
|
||||||
|
gc->master_clip.used = EINA_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((gc->pipe[i].shader.clip) ||
|
if ((gc->pipe[i].shader.clip) ||
|
||||||
((gc->master_clip.enabled) && (!fbo)))
|
((gc->master_clip.enabled) && (!fbo)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1430,7 +1430,8 @@ eng_output_flush(void *data, Evas_Render_Mode render_mode)
|
||||||
|
|
||||||
re->win->draw.drew = 0;
|
re->win->draw.drew = 0;
|
||||||
eng_window_use(re->win);
|
eng_window_use(re->win);
|
||||||
|
evas_gl_common_context_done(re->win->gl_context);
|
||||||
|
|
||||||
#ifdef GL_GLES
|
#ifdef GL_GLES
|
||||||
if (!re->vsync)
|
if (!re->vsync)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue