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

Issue 4617041: Always emit precision in shader variable declarations. (Closed)

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

Description

Always emit precision in shader variable declarations. After the shader compile (and before code output), the precision scopes are already lost. In order to correctly output precisions, we need to emit precision in each variable declaration, therefore, each variable should have its precision set. This CL fixes the bugs that the precisions are lost for variables using default precsions and struct fields. Also, this CL fixes a bug in the grammar: constructors are not type_specifier and they shouldn't have precisions. BUG=168 TEST=webgl conformance tests, gles2 conformance tests. Committed: http://code.google.com/p/angleproject/source/detail?r=695

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -252 lines) Patch
M src/common/version.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/Compiler.cpp View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M src/compiler/ParseHelper.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M src/compiler/ParseHelper.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/TranslatorESSL.cpp View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M src/compiler/glslang.y View 1 2 4 chunks +9 lines, -15 lines 0 comments Download
M src/compiler/glslang_tab.cpp View 1 2 13 chunks +220 lines, -220 lines 0 comments Download

Messages

Total messages: 4
Zhenyao Mo
After further testing, it turns out that function parameters and return value don't require precisions ...
12 years, 11 months ago (2011-06-15 21:57:19 UTC) #1
kbr1
I'm concerned about relying on ANGLE's interpretation of the GLES2 spec for correctness of this ...
12 years, 11 months ago (2011-06-16 00:29:36 UTC) #2
Zhenyao Mo
The new CL is tested on Win/Mac with WebGL conformance test suites, GLES2 conformance test ...
12 years, 11 months ago (2011-06-17 00:21:44 UTC) #3
kbr1
12 years, 11 months ago (2011-06-17 00:38:00 UTC) #4
LGTM. Thanks for moving this in the right direction. One minor comment.

http://codereview.appspot.com/4617041/diff/8001/src/compiler/Compiler.cpp
File src/compiler/Compiler.cpp (right):

http://codereview.appspot.com/4617041/diff/8001/src/compiler/Compiler.cpp#new...
src/compiler/Compiler.cpp:21: TParseContext parseContext(symbolTable,
extBehavior, intermediate, type, spec, 0, false, NULL, infoSink);
A comment would be really helpful here indicating that the builtins deliberately
don't specify precisions for the function arguments, and for that reason we
don't try to check them.
Sign in to reply to this message.

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