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

Issue 6818109: Implement user-defined name hashing. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by Zhenyao Mo
Modified:
11 years, 6 months ago
Reviewers:
kbr1
CC:
angleproject-review_googlegroups.com, bjacob, alokp1
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Implement user-defined name hashing. ANGLEBUG=315 Committed: https://code.google.com/p/angleproject/source/detail?r=1388

Patch Set 1 : #

Total comments: 6

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -67 lines) Patch
M include/GLSLANG/ShaderLang.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/Compiler.cpp View 3 chunks +5 lines, -2 lines 0 comments Download
M src/compiler/Intermediate.cpp View 2 chunks +12 lines, -0 lines 0 comments Download
M src/compiler/OutputESSL.h View 1 chunk +4 lines, -1 line 0 comments Download
M src/compiler/OutputESSL.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M src/compiler/OutputGLSL.h View 1 chunk +4 lines, -1 line 0 comments Download
M src/compiler/OutputGLSL.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M src/compiler/OutputGLSLBase.h View 1 4 chunks +20 lines, -1 line 0 comments Download
M src/compiler/OutputGLSLBase.cpp View 1 13 chunks +74 lines, -42 lines 0 comments Download
M src/compiler/ShHandle.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/TranslatorESSL.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/TranslatorGLSL.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/VariableInfo.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/compiler/VariableInfo.cpp View 5 chunks +23 lines, -11 lines 0 comments Download
M src/compiler/intermediate.h View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 4
Zhenyao Mo
Please have a look.
11 years, 6 months ago (2012-11-08 23:15:22 UTC) #1
Zhenyao Mo
On 2012/11/08 23:15:22, Zhenyao Mo wrote: > Please have a look. I did some testing ...
11 years, 6 months ago (2012-11-08 23:17:50 UTC) #2
kbr1
LGTM. Couple of minor questions / comments. https://codereview.appspot.com/6818109/diff/2001/src/compiler/OutputGLSLBase.cpp File src/compiler/OutputGLSLBase.cpp (right): https://codereview.appspot.com/6818109/diff/2001/src/compiler/OutputGLSLBase.cpp#newcode460 src/compiler/OutputGLSLBase.cpp:460: TString fname ...
11 years, 6 months ago (2012-11-09 19:56:54 UTC) #3
Zhenyao Mo
11 years, 6 months ago (2012-11-09 21:22:45 UTC) #4
https://codereview.appspot.com/6818109/diff/2001/src/compiler/OutputGLSLBase.cpp
File src/compiler/OutputGLSLBase.cpp (right):

https://codereview.appspot.com/6818109/diff/2001/src/compiler/OutputGLSLBase....
src/compiler/OutputGLSLBase.cpp:460: TString fname =
TFunction::unmangleName(node->getName());
On 2012/11/09 19:56:54, kbr1 wrote:
> How about just using "functionName" for the variable, as in EOpFunctionCall,
> below?

Done.

https://codereview.appspot.com/6818109/diff/2001/src/compiler/OutputGLSLBase....
src/compiler/OutputGLSLBase.cpp:743: if (mSymbolTable.findBuiltIn(name) != NULL)
On 2012/11/09 19:56:54, kbr1 wrote:
> Any issues with situations where a user-defined variable is supposed to shadow
a
> built-in variable? Possibly not -- just asking.

Build-in variables starts with gl_, and are not valid user-defined names.

https://codereview.appspot.com/6818109/diff/2001/src/compiler/OutputGLSLBase....
src/compiler/OutputGLSLBase.cpp:750: if (mSymbolTable.findBuiltIn(name) != NULL
|| name == "main")
On 2012/11/09 19:56:54, kbr1 wrote:
> Similar question here.

Yes, in Shaders you can overwrite built-in functions such as texture2D, so here
as far as we use the mangled function name, we are fine.
Sign in to reply to this message.

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