5 Commits
Author SHA1 Message Date
[email protected] 57442b1107 Update emulated functions.
It turns out there are bugs in our tests, so kbr fixed them a while ago.  Now we had another look at the tests, and it turned out some functions we don't have emulate, and some functions we need to also emulate in fragment shaders.

BUG=
TEST=
R=kbr
Review URL: https://codereview.appspot.com/6011056

git-svn-id: https://angleproject.googlecode.com/svn/trunk@1034 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-12 23:09:59 +00:00
[email protected] 46974d2988 Fix memory corruption in ANGLE shader translator.
The bug is that within each compilation cycle, all the memory allocated through T* types are freed to be reused.  So if certain information is meant to outlive the cycle, it should use the std type instead of the T* type:

1) emulated function vector
2) mapped long names map

BUG=none
TEST=webgl conformance test conformance/glsl/glsl-feature-mod-gentype.html does not crash in Win Debug.
Review URL: http://codereview.appspot.com/5137047

git-svn-id: https://angleproject.googlecode.com/svn/trunk@773 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-09-27 21:26:19 +00:00
[email protected] a3b4ab4c2b Further work on the function emulation.
This is to work around driver bugs.  We added more functions, and removed some unnecessary ones.  Remove the function group because we have flags for each function now.  Use more macros instead of functions.  Don't emit global precision because that will affect all later code.

ANGLEBUG=196
TEST=build and test on Mac ATI/NVIDIA, fixes the failing webgl glsl conformance tests.
Review URL: http://codereview.appspot.com/5011053

git-svn-id: https://angleproject.googlecode.com/svn/trunk@754 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-09-16 00:53:26 +00:00
[email protected] f420c42442 Add/remove more functions to use shims.
Remove normalize and add cos instead to avoid a crash in Mac with ATI cards (angle bug 193, 202).

Also add atan and mod as it's also buggy on Mac/Win with NVIDIA cards.

Also, trying to minimize emulated functions by adding masks for fragment/vertex shaders.

ANGLEBUG=196
Review URL: http://codereview.appspot.com/4992047

git-svn-id: https://angleproject.googlecode.com/svn/trunk@748 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-09-12 18:27:59 +00:00
[email protected] 32e97315e2 Emulate certain buil-in functions to work around driver bugs.
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
2011-08-24 01:03:11 +00:00