Skip to content

Commit 15d236e

Browse files
Update framework target
0 parents  commit 15d236e

File tree

1,284 files changed

+176651
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,284 files changed

+176651
-0
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.dsp -crlf
2+
*.dsw -crlf
3+
*.sln -crlf
4+
*.vcproj -crlf

.gitignore

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
node_modules
2+
*.a
3+
*.dll
4+
*.exe
5+
*.ilk
6+
*.sdf
7+
*.opensdf
8+
*.la
9+
*.lo
10+
*.log
11+
*.o
12+
*.obj
13+
*.os
14+
*.pc
15+
*.pdb
16+
*.pyc
17+
*.pyo
18+
*.so
19+
*.so.*
20+
*.sw[a-z]
21+
*.tar
22+
*.tar.bz2
23+
*.tar.gz
24+
*.trs
25+
*.zip
26+
*~
27+
depend
28+
depend.bak
29+
bin/ltmain.sh
30+
lib
31+
lib64
32+
configure
33+
configure.lineno
34+
autom4te.cache
35+
aclocal.m4
36+
config.log
37+
config.status
38+
cscope*
39+
.scon*
40+
config.py
41+
build
42+
libtool
43+
manifest.txt
44+
.dir-locals.el
45+
.deps/
46+
.dirstamp
47+
.libs/
48+
Makefile
49+
Makefile.in
50+
51+
ipch
52+
53+
*.pbxuser
54+
*.perspectivev3
55+
*.mode1v3
56+
.svn
57+
*.ncb
58+
*.user
59+
*.suo
60+
*.dSYM
61+
xcuserdata
62+
*.xcworkspace
63+
64+
cmake_install.cmake
65+
Makefile
66+
CMakeFiles/
67+
CMakeCache.txt
68+
.project
69+
.cproject
70+
glsl_main
71+
glsl_test
72+
glslopt
73+
glsl_compiler
74+
.settings/
75+
.pydevproject
76+
77+
build
78+
metalTemp.metal

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
projects
2+
tests

CMakeLists.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
include_directories(include)
4+
include_directories(src/mesa)
5+
include_directories(src/mapi)
6+
include_directories(src/glsl)
7+
include_directories(src)
8+
9+
option (DEBUG "Enable debugging" FALSE)
10+
11+
if(${DEBUG} MATCHES "on")
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
13+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0")
14+
else()
15+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -DNDEBUG")
16+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -DNDEBUG")
17+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -s")
18+
endif()
19+
20+
file(GLOB glcpp-library_sources src/glsl/glcpp/*.c src/util/*.c)
21+
#file(GLOB glcpp-library_sources_remove src/glsl/glcpp/glcpp.c)
22+
#list(REMOVE_ITEM glcpp-library_sources ${glcpp-library_sources_remove})
23+
add_library(glcpp-library ${glcpp-library_sources})
24+
25+
file(GLOB mesa_sources src/mesa/program/*.c src/mesa/main/*.c)
26+
add_library(mesa ${mesa_sources})
27+
28+
file(GLOB glsl_sources src/glsl/*.cpp src/glsl/*.c)
29+
file(GLOB glsl_sources_remove src/glsl/main.cpp src/glsl/builtin_stubs.cpp)
30+
list(REMOVE_ITEM glsl_sources ${glsl_sources_remove})
31+
add_library(glsl_optimizer ${glsl_sources})
32+
target_link_libraries(glsl_optimizer glcpp-library mesa)
33+
34+
add_executable(glsl_compiler src/glsl/main.cpp)
35+
target_link_libraries(glsl_compiler glsl_optimizer)
36+
37+
file(GLOB glsl_test_sources tests/*.cpp)
38+
add_executable(glsl_test ${glsl_test_sources})
39+
target_link_libraries(glsl_test glsl_optimizer)
40+
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
41+
# OSX-specific build requirements
42+
find_library(OpenGL_LIBRARY OpenGL )
43+
target_link_libraries(glsl_test ${OpenGL_LIBRARY})
44+
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
45+
46+
file(GLOB glslopt_sources contrib/glslopt/*.cpp)
47+
add_executable(glslopt ${glslopt_sources})
48+
target_link_libraries(glslopt glsl_optimizer)
49+
50+
#add_executable(glcpp src/glsl/glcpp/glcpp.c)
51+
#target_link_libraries(glcpp glsl_optimizer)

Changelog.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
GLSL optimizer Change Log
2+
=========================
3+
4+
2015 05
5+
-------
6+
7+
Fixes:
8+
9+
* Fixes some cases of highp/mediump sampler sampling resulting in resulting temporaries wrongly being lowp.
10+
11+
12+
2015 04
13+
-------
14+
15+
Goodies:
16+
* GLES2: support EXT_draw_instanced / gl_InstanceIDEXT.
17+
* Support gl_VertexID in GLSL < 1.30 when EXT_gpu_shader4 is used.
18+
19+
Fixes:
20+
21+
* Metal: fixed some bugs with translation of weird loops.
22+
23+
24+
2015 02
25+
-------
26+
27+
Tweaks:
28+
29+
* Texture LOD sampling functions on GLES2.0 now produce a wrapper call, that does approximation
30+
(mip bias) on devices that don't support GL_EXT_shader_texture_lod.
31+
* Undefined precision integers on GLES now default to highp.
32+
33+
34+
2015 01
35+
-------
36+
37+
Fixes:
38+
39+
* Float literals are printed with 7 significant digits now.
40+
* Metal: GLSL mod() is properly translated into Metal's fmod().
41+
* Metal: Fixed some cases of reciprocal (1/x) printing missing half precision cast.
42+
* GLES3: textureOffset with a mipmap bias is printed correctly now.
43+
* Fixed a bug with loop inductor detection if the inductor was used before the loop for some things.
44+
* Fixed printing of int/float bitcast operations.
45+
* Improved precision determination of some constructs.
46+
47+
48+
2014 10
49+
-------
50+
51+
Goodies:
52+
53+
* Support for translating GLSL shaders into Apple Metal shading language.
54+
Exactly same process; GLSL in (preferably ES3 variant), optimization passes, Metal out.
55+
All uniforms currently will be put into one constant buffer.
56+
Pass kGlslTargetMetal target to get Metal.
57+
* Shader reflection API. See glslopt_shader_get_* functions. Binding indices
58+
are only automatically assigned on Metal now; on GL/ES targets the reflection API is only
59+
useful to get list of inputs/uniforms, their names and types.
60+
* Improved dead code elimation: some cases of swizzled/masked assignments where same variable was on both sides
61+
were not eliminated if that variable was totally unused later.
62+
* Merged with upstream Mesa, comes with new optimizations (min/max pruning, tree rebalancing, vector_insert lowering).
63+
64+
Fixes:
65+
66+
* sampler3D declarations were missing precision qualifier on GLES3.0.
67+
68+
69+
2014 09
70+
-------
71+
72+
Goodies:
73+
74+
* Supports GL_EXT_draw_buffers in ES2.0, for MRT.
75+
76+
77+
2014 08
78+
-------
79+
80+
Goodies:
81+
82+
* Supports GL_EXT_shader_framebuffer_fetch now, in both ES2.0 & 3.0.
83+
84+
Fixes:
85+
86+
* Fixed printing of infinities & NaNs.
87+
* Fixed vectorization pass in some cases going wrong on texture lookups.
88+
89+
90+
2014 06
91+
-------
92+
93+
Goodies:
94+
95+
* Optimization: split vectors with only some used components into scalars.
96+
97+
Fixes:
98+
99+
* Fixed more issues with for-loop printing.
100+
* Fixed printing of unsigned integer swizzled & constants.
101+
102+
2014 03
103+
-------
104+
105+
Fixes:
106+
107+
* Fixed missing precision qualifier in some ES shaders (mostly due to expansion of ternary ?: check).
108+
109+
2014 02
110+
-------
111+
112+
Fixes:
113+
114+
* Fixed vectorize pass introduced last month going wrong with dot products.
115+
116+
2014 01
117+
-------
118+
119+
Goodies:
120+
121+
* Better optimization: vectorize assignments to individual vector channels.
122+
* More OpenGL ES 2.0 conformant printing of complex for-loops (loop inductions printed
123+
as += or ++; loop initializers inside loop body).
124+
125+
Fixes:
126+
127+
* Fixed array assignments sometimes appearing in pre-GLSL1.20 versions, especially with
128+
complex loops that couldn't be unrolled.
129+
* Fixed output of textureOffset and texelFetch.
130+
* Fixed error messages on MRT outputs on GL & GLES3 (now supports 4 MRTs).
131+
132+
2013 12
133+
-------
134+
135+
Goodies:
136+
137+
* Optimized performance; was spending half of the time in stupid string code.
138+
* Added glslopt_shader_get_stats to get *very* approximate shader complexity stats.
139+
* Nicer printing of complicated for-loops.
140+
141+
Fixes:
142+
143+
* Fixed printing of struct initializers.
144+
145+
146+
2013 11
147+
-------
148+
149+
Goodies:
150+
151+
* Better optimizations: CSE; `A+(-B) => A-B`; `!A || !B => !(A && B)`.
152+
* Merged with upstream Mesa.
153+
154+
Fixes:
155+
156+
* Fixed location qualifiers, ES3.0 version printing, samplerCubeShadow sampling operations.
157+
158+
159+
2013 10
160+
-------
161+
162+
Goodies:
163+
164+
* Initial OpenGL ES 3.0 support
165+
* API to query shader input names; glslopt_shader_get_input_count and glslopt_shader_get_input_name
166+
167+
Changes:
168+
169+
* Xcode project files updated to Xcode 5
170+
171+
Fixes:
172+
173+
* VS2013 fixes

0 commit comments

Comments
 (0)