Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Issue 4916043: Emulate certain buil-in functions to work around driver bugs. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by zmo
Modified:
13 years, 3 months ago
Reviewers:
kbr1, kbr
CC:
angleproject-review_googlegroups.com, gmangoog, nicolas, dgkoch
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

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. Committed: http://code.google.com/p/angleproject/source/detail?r=738

Patch Set 1 #

Total comments: 13

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -49 lines) Patch
M include/GLSLANG/ShaderLang.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M samples/translator/translator.cpp View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/build_angle.gyp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/common/version.h View 1 1 chunk +1 line, -1 line 0 comments Download
A src/compiler/BuiltInFunctionEmulator.h View 1 1 chunk +86 lines, -0 lines 0 comments Download
A src/compiler/BuiltInFunctionEmulator.cpp View 1 chunk +161 lines, -0 lines 0 comments Download
M src/compiler/Compiler.cpp View 1 3 chunks +10 lines, -0 lines 0 comments Download
M src/compiler/OutputGLSLBase.cpp View 1 3 chunks +52 lines, -45 lines 0 comments Download
M src/compiler/ShHandle.h View 1 3 chunks +5 lines, -0 lines 0 comments Download
M src/compiler/TranslatorESSL.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/TranslatorGLSL.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/intermediate.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M src/compiler/translator_common.vcproj View 1 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 6
zmo
Please review.
13 years, 3 months ago (2011-08-18 17:49:18 UTC) #1
kbr1
This is good work in general, but a couple of comments about the code structure. ...
13 years, 3 months ago (2011-08-18 21:05:06 UTC) #2
zmo
http://codereview.appspot.com/4916043/diff/1/src/compiler/OutputGLSLBase.cpp File src/compiler/OutputGLSLBase.cpp (right): http://codereview.appspot.com/4916043/diff/1/src/compiler/OutputGLSLBase.cpp#newcode393 src/compiler/OutputGLSLBase.cpp:393: writeTriplet(visit, preString.c_str(), NULL, postString.c_str()); On 2011/08/18 21:05:06, kbr1 wrote: ...
13 years, 3 months ago (2011-08-19 17:20:06 UTC) #3
dgkoch
http://codereview.appspot.com/4916043/diff/1/src/build_angle.gyp File src/build_angle.gyp (right): http://codereview.appspot.com/4916043/diff/1/src/build_angle.gyp#newcode23 src/build_angle.gyp:23: 'compiler/BuiltInFunctionEmulator.h', please add these to translator_common.vcproj as well.
13 years, 3 months ago (2011-08-22 17:31:30 UTC) #4
zmo
Revised. Please review again. http://codereview.appspot.com/4916043/diff/1/include/GLSLANG/ShaderLang.h File include/GLSLANG/ShaderLang.h (right): http://codereview.appspot.com/4916043/diff/1/include/GLSLANG/ShaderLang.h#newcode86 include/GLSLANG/ShaderLang.h:86: SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100 On 2011/08/18 ...
13 years, 3 months ago (2011-08-24 00:38:12 UTC) #5
kbr1
13 years, 3 months ago (2011-08-24 01:02:26 UTC) #6
LGTM. Thanks for persisting on this. Per our offline discussion, it would be
great to add functionality to the AST to make editing it easier, and eventually
rephrase this change in terms of that functionality. However, I agree with you
that that should be done separately.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b