GL_EXT_blend_color, GL_EXT_blend_subtract and GL_NV_blend_square emulation for ES 2.0. ARB_shader_subroutine completeness for NV_gpu_program5 purposes. Better log nesting for begin/end, push/pop log pairs. Regal.cpp codegen tidy-up: reduce casting for default return values. Regal context sharing for WGL too. Log the return values of global functions (WGL, etc) in the driver logging stream. Regal::Marker needs two versions of toString, depending on the relevant extension being emulated.
39 lines
1,020 B
Python
39 lines
1,020 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)\n',
|
|
'{',
|
|
' 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)\n',
|
|
'{',
|
|
' Cache::bindTexture(_next->call(&_next->glBindTexture),_next->call(&_next->glGetTexLevelParameteriv),_next->call(&_next->glGetTexImage), target, texture);',
|
|
' return;',
|
|
'}'
|
|
]
|
|
}
|
|
|
|
}
|