summaryrefslogtreecommitdiff
path: root/src/Makefile_Evas.am
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-11-05 15:39:32 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-11-10 16:12:20 +0900
commit38ad8fda8ddb681707b42a17a23eba29b3bbd86e (patch)
treedcf22fb1ed0be42ae79acb4c75d08130a4171051 /src/Makefile_Evas.am
parent43ef6152eda0ac0e4ef3aee55b25264f12e4e64b (diff)
Evas GL: Implement runtime generation and load of shaders
Instead of generating the shaders at compile-time, do this at runtime. Also load only the required shaders in memory. This saves 25000 LOC, lots of strings inside the .so files and save a non negligible amount of memory since those shader binaries can weigh a few megabytes in total. The current shader selection mechanism is a bit complex and uses eina_hash_int32 but this can be optimized later if it's deemed too slow.
Diffstat (limited to 'src/Makefile_Evas.am')
-rw-r--r--src/Makefile_Evas.am12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index b94ac1fa20..aaf4ea22f2 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -682,9 +682,8 @@ modules/evas/engines/gl_common/evas_gl_api_gles1.c \
682modules/evas/engines/gl_common/evas_gl_api_gles3_def.h \ 682modules/evas/engines/gl_common/evas_gl_api_gles3_def.h \
683modules/evas/engines/gl_common/evas_gl_api_ext.c \ 683modules/evas/engines/gl_common/evas_gl_api_ext.c \
684modules/evas/engines/gl_common/shader/evas_gl_shaders.x \ 684modules/evas/engines/gl_common/shader/evas_gl_shaders.x \
685modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x \
686modules/evas/engines/gl_common/shader_3d/evas_gl_3d_shaders.x \ 685modules/evas/engines/gl_common/shader_3d/evas_gl_3d_shaders.x \
687modules/evas/engines/gl_common/shader/evas_gl_enum.x 686$(NULL)
688 687
689# 3D 688# 3D
690GL_COMMON_SOURCES += \ 689GL_COMMON_SOURCES += \
@@ -696,24 +695,17 @@ modules/evas/engines/gl_common/evas_gl_3d_shader.c
696 695
697GL_SHADERS_GEN = \ 696GL_SHADERS_GEN = \
698modules/evas/engines/gl_common/shader/gen_shaders.sh \ 697modules/evas/engines/gl_common/shader/gen_shaders.sh \
699modules/evas/engines/gl_common/shader/shaders.txt \
700modules/evas/engines/gl_common/shader/fragment.glsl \ 698modules/evas/engines/gl_common/shader/fragment.glsl \
701modules/evas/engines/gl_common/shader/vertex.glsl \ 699modules/evas/engines/gl_common/shader/vertex.glsl \
700modules/evas/engines/gl_common/shader/include.glsl \
702$(NULL) 701$(NULL)
703 702
704EXTRA_DIST += $(GL_SHADERS_GEN) 703EXTRA_DIST += $(GL_SHADERS_GEN)
705EXTRA_lib_evas_libevas_la_DEPENDENCIES = modules/evas/engines/gl_common/shader/evas_gl_enum.x
706 704
707modules/evas/engines/gl_common/shader/evas_gl_shaders.x: $(GL_SHADERS_GEN) 705modules/evas/engines/gl_common/shader/evas_gl_shaders.x: $(GL_SHADERS_GEN)
708 @echo " SHADERS $@" 706 @echo " SHADERS $@"
709 @bash $(srcdir)/modules/evas/engines/gl_common/shader/gen_shaders.sh 707 @bash $(srcdir)/modules/evas/engines/gl_common/shader/gen_shaders.sh
710 708
711modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x: $(GL_SHADERS_GEN)
712 @echo " SHADERS $@"
713 @bash $(srcdir)/modules/evas/engines/gl_common/shader/gen_shaders.sh _bigendian
714
715modules/evas/engines/gl_common/shader/evas_gl_enum.x: modules/evas/engines/gl_common/shader/evas_gl_shaders.x modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x
716
717# NOTE: order here should be equal with modes in file Evas_Eo.h 709# NOTE: order here should be equal with modes in file Evas_Eo.h
718GL_SHADERS_3D_GEN = \ 710GL_SHADERS_3D_GEN = \
719modules/evas/engines/gl_common/shader_3d/vertex_color_vert.shd \ 711modules/evas/engines/gl_common/shader_3d/vertex_color_vert.shd \