Description of the algorithm:
http://code.google.com/p/mvujovic/wiki/ShaderControlFlowAnalysis
This flag is one potential solution to timing attacks on textures containing cross-domain content
or user agent data.
This kind of analysis could be useful for both WebGL and CSS Shaders.
The SH_TIMING_RESTRICTIONS flag will reject a shader if it uses texture dependent data to affect
control flow.
Other ways of affecting shader timing such as using NaNs in basic arithmetic operations or using
built-in functions (e.g. atan) with different inputs are still under investigation.
Issue=329
Review URL: http://codereview.appspot.com/6195062/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1101 736b8ea6-26fd-11df-bfd4-992fa37f6226
Clang warns about missing case in enum glslang_lex.cpp so I disabled that one as well.
MSVC, as Chromium is built at least, warns about things in its own STL headers in SymbolTable.cpp so disabled the warning for that file.
esTransform.c had a struct that the compiler could not determine was initialized so I explicitly initialized it.
Review URL: https://codereview.appspot.com/5577048
git-svn-id: https://angleproject.googlecode.com/svn/trunk@965 736b8ea6-26fd-11df-bfd4-992fa37f6226
There are some exceptions, a subset of the exceptions used by Chromium. They didn't seem to be useful warnings.
In code which we don't change much, like the preprocessor, I just suppressed the warnings in the specific files rather than changing the code.
There should be no functional changes in this patch.
Review URL: https://codereview.appspot.com/5570066
git-svn-id: https://angleproject.googlecode.com/svn/trunk@964 736b8ea6-26fd-11df-bfd4-992fa37f6226
This is a workaround for an Intel bug.
The crash looks like this:
0x5f816c53 [d3d9.dll + 0x00036c53] CQuery::~CQuery()
0x5f816bec [d3d9.dll + 0x00036bec] CQuery::`vector deleting
destructor'(unsigned int)
0x5f7e8129 [d3d9.dll + 0x00008129] CBaseObject::~CBaseObject()
0x5f9e19c7 [libglesv2.dll + 0x000319c7] gl::Fence::`vector deleting
destructor'(unsigned int)
0x5f9de78e [libglesv2.dll - context.cpp:975] gl::Context::deleteFence(unsigned
int)
0x5f9e1491 [libglesv2.dll - context.cpp:198] gl::Context::~Context()
0x5f9e182f [libglesv2.dll - context.cpp:3936] glDestroyContext
0x717654ec [libegl.dll -
display.cpp:749] egl::Display::destroyContext(gl::Context *)
0x7176a3da [libegl.dll - libegl.cpp:907] eglDestroyContext
0x64fbaf33 [chrome.dll - gl_context_egl.cc:75] gfx::GLContextEGL::Destroy()
The vendor ID is always 8086 (Intel). Not an XP issue - it's happening on Win
7.
With this change, D3D queries are only released when the display is destroyed or reset or if a very high number of D3D queries have been allocated.
Tested by stepping exercising the NV_fence entry points in a debugger.
Review URL: http://codereview.appspot.com/5534065
git-svn-id: https://angleproject.googlecode.com/svn/trunk@941 736b8ea6-26fd-11df-bfd4-992fa37f6226
The change to the sample is just to demonstrate how I tested it. I won't check in the stuff under samples/.
It's not clear to me what eglPostSubBufferNV should do if EGL_POST_SUB_BUFFER_SUPPORTED_NV is false. At the moment it fails silently as though it was called on the wrong surface type:
"If <surface> is a back-buffered surface, then the requested portion
of the color buffer is copied to the native window associated with
that surface. If <surface> is a single-buffered window, pixmap, or
pbuffer surface, eglSwapBuffers and eglPostSubBufferNV have no
effect."
Review URL: http://codereview.appspot.com/5345050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@902 736b8ea6-26fd-11df-bfd4-992fa37f6226
If an extension is not specified, it is disabled by default, thus a shader should fail compiling if features from that extension are used.
ANGLEBUG=204
TEST=webgl conformance/extensions/oes-standard-derivatives.html
Review URL: http://codereview.appspot.com/4974071
git-svn-id: https://angleproject.googlecode.com/svn/trunk@745 736b8ea6-26fd-11df-bfd4-992fa37f6226
This is implemented by adding a new compile option SH_EMULATE_BUILT_IN_FUNCTIONS. The emulated functions are names as webgl_originalName_emu so there will never be naming conflicts.
At the moment only three functions are emulated: normalize, abs, sign. Also, the compile option will emulate all three. However, the mechanism to emulate only a selected subset is also imeplemented. It can be turned on easily.
ANGLEBUG=196
TEST=with this option, the failed test with abs.frag passes.
Review URL: http://codereview.appspot.com/4916043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@738 736b8ea6-26fd-11df-bfd4-992fa37f6226
With this CL, we have the option to select a code output backend: GLSL, GLSL ES, or HLSL.
Note that we always emit the highest supported float precision for fragment shader due to anglebug 168. Although this is a temporary solution, it's not against GLSL ES spec, because it's ok for implementation to upgrade precision.
Tested with WebGL conformance test suite, GLES2 conformance test suite (only failed 2/1198), and a few webgl demos, including worlds of webgl, aquarium, etc.
anglebug=81
test=translator emitting correct GLSL ES code when ES2 backend is selected.
Review URL: http://codereview.appspot.com/4550129
git-svn-id: https://angleproject.googlecode.com/svn/trunk@687 736b8ea6-26fd-11df-bfd4-992fa37f6226
- Memory leaks
- Made compiling using multiple strings default. This was not getting exercised.
- Removed redundant copies of file data
- Handled empty files properly which were getting ignored
BUG=66
Review URL: http://codereview.appspot.com/2579041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@465 736b8ea6-26fd-11df-bfd4-992fa37f6226
Symbol table entries depend on three things - language, spec (not now but may eventually), and built-in resources.
We used to build two global symbol-tables - one for each language. During each compile, one of the symbol table was
copied and resource-specific stuff was added. I have moved the symbol table to TCompiler that gets initilized when
compiler is created and reused for each compile. This makes it much cleaner and extensible in case a spec requires
special entries to be added to the symbol table.
PS: Sorry for the long CL, but all of it needed to be done in one CL. I have verified that everything still compiles
and passes all conformance tests.
Review URL: http://codereview.appspot.com/1864044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@351 736b8ea6-26fd-11df-bfd4-992fa37f6226