Skip to content

Commit

Permalink
Update framework target
Browse files Browse the repository at this point in the history
  • Loading branch information
tokyovigilante committed Jul 5, 2015
0 parents commit 15d236e
Show file tree
Hide file tree
Showing 1,284 changed files with 176,651 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.dsp -crlf
*.dsw -crlf
*.sln -crlf
*.vcproj -crlf
78 changes: 78 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
node_modules
*.a
*.dll
*.exe
*.ilk
*.sdf
*.opensdf
*.la
*.lo
*.log
*.o
*.obj
*.os
*.pc
*.pdb
*.pyc
*.pyo
*.so
*.so.*
*.sw[a-z]
*.tar
*.tar.bz2
*.tar.gz
*.trs
*.zip
*~
depend
depend.bak
bin/ltmain.sh
lib
lib64
configure
configure.lineno
autom4te.cache
aclocal.m4
config.log
config.status
cscope*
.scon*
config.py
build
libtool
manifest.txt
.dir-locals.el
.deps/
.dirstamp
.libs/
Makefile
Makefile.in

ipch

*.pbxuser
*.perspectivev3
*.mode1v3
.svn
*.ncb
*.user
*.suo
*.dSYM
xcuserdata
*.xcworkspace

cmake_install.cmake
Makefile
CMakeFiles/
CMakeCache.txt
.project
.cproject
glsl_main
glsl_test
glslopt
glsl_compiler
.settings/
.pydevproject

build
metalTemp.metal
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
projects
tests
51 changes: 51 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
cmake_minimum_required(VERSION 2.8)

include_directories(include)
include_directories(src/mesa)
include_directories(src/mapi)
include_directories(src/glsl)
include_directories(src)

option (DEBUG "Enable debugging" FALSE)

if(${DEBUG} MATCHES "on")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -DNDEBUG")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -DNDEBUG")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -s")
endif()

file(GLOB glcpp-library_sources src/glsl/glcpp/*.c src/util/*.c)
#file(GLOB glcpp-library_sources_remove src/glsl/glcpp/glcpp.c)
#list(REMOVE_ITEM glcpp-library_sources ${glcpp-library_sources_remove})
add_library(glcpp-library ${glcpp-library_sources})

file(GLOB mesa_sources src/mesa/program/*.c src/mesa/main/*.c)
add_library(mesa ${mesa_sources})

file(GLOB glsl_sources src/glsl/*.cpp src/glsl/*.c)
file(GLOB glsl_sources_remove src/glsl/main.cpp src/glsl/builtin_stubs.cpp)
list(REMOVE_ITEM glsl_sources ${glsl_sources_remove})
add_library(glsl_optimizer ${glsl_sources})
target_link_libraries(glsl_optimizer glcpp-library mesa)

add_executable(glsl_compiler src/glsl/main.cpp)
target_link_libraries(glsl_compiler glsl_optimizer)

file(GLOB glsl_test_sources tests/*.cpp)
add_executable(glsl_test ${glsl_test_sources})
target_link_libraries(glsl_test glsl_optimizer)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# OSX-specific build requirements
find_library(OpenGL_LIBRARY OpenGL )
target_link_libraries(glsl_test ${OpenGL_LIBRARY})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

file(GLOB glslopt_sources contrib/glslopt/*.cpp)
add_executable(glslopt ${glslopt_sources})
target_link_libraries(glslopt glsl_optimizer)

#add_executable(glcpp src/glsl/glcpp/glcpp.c)
#target_link_libraries(glcpp glsl_optimizer)
173 changes: 173 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
GLSL optimizer Change Log
=========================

2015 05
-------

Fixes:

* Fixes some cases of highp/mediump sampler sampling resulting in resulting temporaries wrongly being lowp.


2015 04
-------

Goodies:
* GLES2: support EXT_draw_instanced / gl_InstanceIDEXT.
* Support gl_VertexID in GLSL < 1.30 when EXT_gpu_shader4 is used.

Fixes:

* Metal: fixed some bugs with translation of weird loops.


2015 02
-------

Tweaks:

* Texture LOD sampling functions on GLES2.0 now produce a wrapper call, that does approximation
(mip bias) on devices that don't support GL_EXT_shader_texture_lod.
* Undefined precision integers on GLES now default to highp.


2015 01
-------

Fixes:

* Float literals are printed with 7 significant digits now.
* Metal: GLSL mod() is properly translated into Metal's fmod().
* Metal: Fixed some cases of reciprocal (1/x) printing missing half precision cast.
* GLES3: textureOffset with a mipmap bias is printed correctly now.
* Fixed a bug with loop inductor detection if the inductor was used before the loop for some things.
* Fixed printing of int/float bitcast operations.
* Improved precision determination of some constructs.


2014 10
-------

Goodies:

* Support for translating GLSL shaders into Apple Metal shading language.
Exactly same process; GLSL in (preferably ES3 variant), optimization passes, Metal out.
All uniforms currently will be put into one constant buffer.
Pass kGlslTargetMetal target to get Metal.
* Shader reflection API. See glslopt_shader_get_* functions. Binding indices
are only automatically assigned on Metal now; on GL/ES targets the reflection API is only
useful to get list of inputs/uniforms, their names and types.
* Improved dead code elimation: some cases of swizzled/masked assignments where same variable was on both sides
were not eliminated if that variable was totally unused later.
* Merged with upstream Mesa, comes with new optimizations (min/max pruning, tree rebalancing, vector_insert lowering).

Fixes:

* sampler3D declarations were missing precision qualifier on GLES3.0.


2014 09
-------

Goodies:

* Supports GL_EXT_draw_buffers in ES2.0, for MRT.


2014 08
-------

Goodies:

* Supports GL_EXT_shader_framebuffer_fetch now, in both ES2.0 & 3.0.

Fixes:

* Fixed printing of infinities & NaNs.
* Fixed vectorization pass in some cases going wrong on texture lookups.


2014 06
-------

Goodies:

* Optimization: split vectors with only some used components into scalars.

Fixes:

* Fixed more issues with for-loop printing.
* Fixed printing of unsigned integer swizzled & constants.

2014 03
-------

Fixes:

* Fixed missing precision qualifier in some ES shaders (mostly due to expansion of ternary ?: check).

2014 02
-------

Fixes:

* Fixed vectorize pass introduced last month going wrong with dot products.

2014 01
-------

Goodies:

* Better optimization: vectorize assignments to individual vector channels.
* More OpenGL ES 2.0 conformant printing of complex for-loops (loop inductions printed
as += or ++; loop initializers inside loop body).

Fixes:

* Fixed array assignments sometimes appearing in pre-GLSL1.20 versions, especially with
complex loops that couldn't be unrolled.
* Fixed output of textureOffset and texelFetch.
* Fixed error messages on MRT outputs on GL & GLES3 (now supports 4 MRTs).

2013 12
-------

Goodies:

* Optimized performance; was spending half of the time in stupid string code.
* Added glslopt_shader_get_stats to get *very* approximate shader complexity stats.
* Nicer printing of complicated for-loops.

Fixes:

* Fixed printing of struct initializers.


2013 11
-------

Goodies:

* Better optimizations: CSE; `A+(-B) => A-B`; `!A || !B => !(A && B)`.
* Merged with upstream Mesa.

Fixes:

* Fixed location qualifiers, ES3.0 version printing, samplerCubeShadow sampling operations.


2013 10
-------

Goodies:

* Initial OpenGL ES 3.0 support
* API to query shader input names; glslopt_shader_get_input_count and glslopt_shader_get_input_name

Changes:

* Xcode project files updated to Xcode 5

Fixes:

* VS2013 fixes
Loading

0 comments on commit 15d236e

Please sign in to comment.