regal/scripts/EmuCache.py
Nigel Stewart 5157da1820 Emscripten now working for dreamtorus.
Initial scaffolding for GLX emulation on EGL/WGL/CGL.
Ppca refinements.
Add GL_NV_blend_equation_advanced and GL_NV_blend_equation_advanced_coherent support.
RegalX11.cpp added for fake X11 purposes for GLX emulation.
GLEW refresh.
Fixups for REGAL_SYS_EMSCRIPTEN_STATIC mode.
2013-08-23 09:49:09 -05:00

39 lines
1,016 B
Python

#!/usr/bin/python -B
# Regal.cpp - Application-side shader caching
#
# Note - for driver-side caching, RegalDispatchCache.cpp is used.
formulaeGlobal = {
# GLSL shader caching
'glShaderSource' : {
'entries' : [ 'glShaderSource' ],
'pre' : [
'if (REGAL_CACHE && REGAL_CACHE_SHADER)',
'{',
' Cache::shaderSource(_next->call(&_next->glShaderSource), shader, count, string, length);',
' return;',
'}'
]
},
#
# Texture caching
#
# At glBindTexture time we can optionally write out the texture data
# as a .png file, for debugging.
'glBindTexture' : {
'entries' : [ 'glBindTexture' ],
'pre' : [
'if (REGAL_CACHE && REGAL_CACHE_TEXTURE)',
'{',
' Cache::bindTexture(_next->call(&_next->glBindTexture),_next->call(&_next->glGetTexLevelParameteriv),_next->call(&_next->glGetTexImage), target, texture);',
' return;',
'}'
]
}
}