|
8ab69840
|
2011-06-02T21:53:45
|
|
Insert a new-line ('\n') before the #line directive in HLSL source.
Without this, sometimes the #line directive shows up at the end of
the previous line of shader source. This was causing syntax errors
when trying to compile shaders during a PIX session.
Review URL: http://codereview.appspot.com/4561059
git-svn-id: https://angleproject.googlecode.com/svn/trunk@667 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
04277b82
|
2011-06-02T18:41:26
|
|
Generate an error in the parser for unsized array declarations.
BUG=164
TEST=none
Review URL: http://codereview.appspot.com/4539101
git-svn-id: https://angleproject.googlecode.com/svn/trunk@666 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
24c08c4e
|
2011-05-27T17:40:48
|
|
Fix the bug that long varying varibales are mapped into different names in fragment/vertex shaders.
ANGLEBUG=144
TEST=the same long varying variable name in fragment/vertex shaders map to the same shortened name if using the same translator.
Review URL: http://codereview.appspot.com/4547063
git-svn-id: https://angleproject.googlecode.com/svn/trunk@660 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
5cb728c5
|
2011-05-17T18:34:24
|
|
Add missing newlines to source files
Issue=154
git-svn-id: https://angleproject.googlecode.com/svn/trunk@653 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
424bb49d
|
2011-05-11T15:36:59
|
|
Validate shaders so they don't exceed the texture unit counts.
Issue=95
TRAC #16568
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@641 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
15795192
|
2011-05-11T15:36:20
|
|
Translate vertex texture lookup functions.
Issue=95
TRAC #16568
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@635 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
a129765f
|
2011-04-26T18:36:43
|
|
Add MapLongVariableNames files to standalone vcproj
git-svn-id: https://angleproject.googlecode.com/svn/trunk@620 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
fd747b86
|
2011-04-23T01:30:07
|
|
Implement shader identifier name mapping.
The name mapping happens when an identifier is longer than 32 characters. The name mapping is behind a flag, so it won't happen by default. Also, functions to query the mapped names are added.
The purpose of this CL is for the drivers that can't handle long names. For example, linux NVIDIA driver can't handle 256 character name, whereas WebGL spec requires that.
This CL also fixes the issue that some of the TIntermSymbols' ids are 0s.
ANGLEBUG=144
TEST=test manually with shaders with long identifier names.
Review URL: http://codereview.appspot.com/4428058
git-svn-id: https://angleproject.googlecode.com/svn/trunk@619 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
0b8d4eb2
|
2011-04-04T19:17:11
|
|
Unroll for-loop if sampler array uses loop index as its index.
If inside a for-loop, sampler array index is the loop index, Mac cg compiler will crash. This CL unroll the loop in such situation. The behavior is:
1) If the for-loop index is a float, we reject the shader.
2) If it is an integer, we unroll the for-loop.
Things that should be done in the future are:
1) Add line number macros.
2) Add a limit to unroll iteration count.
anglebug=94
Review URL: http://codereview.appspot.com/4331048
git-svn-id: https://angleproject.googlecode.com/svn/trunk@606 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
f02c9e62
|
2011-04-04T14:03:20
|
|
Fix resizing the string buffer.
Issue=117
TRAC #15793
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@605 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b969cc52
|
2011-03-15T18:23:59
|
|
Fix clang warnings in PoolAlloc.cpp
Issue=127
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Part 4 of 5: <http://webkit.org/b/56337> Enable -Werror on ANGLE
Upstream bug: <http://code.google.com/p/angleproject/issues/detail?id=127>
Fixes the following static analyzer warnings:
src/compiler/PoolAlloc.cpp:154:26:{154:24-154:25}{154:28-154:42}: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare,2]
for (size_t x = 0; x < guardBlockSize; x++) {
~ ^ ~~~~~~~~~~~~~~
src/compiler/PoolAlloc.cpp:159:55:{159:54-159:56}{160:30-160:34}: warning: conversion specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat,7]
sprintf(assertMsg, "PoolAlloc: Damage %s %u byte allocation at 0x%p\n",
~^
%lu
fix-it:"src/compiler/PoolAlloc.cpp":{159:54-159:56}:"%lu"
* src/compiler/PoolAlloc.cpp:
(TAllocation::checkGuardBlock): Changed '%u' to '%lu' for size_t
variable. Put for loop inside #ifdef GUARD_BLOCKS/#endif macros
to fix tautological-compare warning.
(TAllocation::checkAllocList): Added newline to end of file.
Author: David Kilzer <ddkilzer@apple.com>
git-svn-id: https://angleproject.googlecode.com/svn/trunk@575 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ea993576
|
2011-03-15T18:23:55
|
|
Fix clang warnings: Intermediate.cpp: warning: '&&' within '||'
Issue=126
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Part 3 of 5: <http://webkit.org/b/56337> Enable -Werror on ANGLE
Upstream bug: <http://code.google.com/p/angleproject/issues/detail?id=126>
Fixes the following static analyzer warnings:
src/compiler/Intermediate.cpp:1008:55:{1008:17-1008:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2]
if (left->isMatrix() && right->isVector() ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
src/compiler/Intermediate.cpp:1008:55: note: place parentheses around the '&&' expression to silence this warning [2]
if (left->isMatrix() && right->isVector() ||
^
( )
fix-it:"src/compiler/Intermediate.cpp":{1008:17-1008:17}:"("
fix-it:"src/compiler/Intermediate.cpp":{1008:54-1008:54}:")"
src/compiler/Intermediate.cpp:1008:55:{1009:17-1009:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2]
if (left->isMatrix() && right->isVector() ||
^
src/compiler/Intermediate.cpp:1008:55: note: place parentheses around the '&&' expression to silence this warning [2]
if (left->isMatrix() && right->isVector() ||
^
fix-it:"src/compiler/Intermediate.cpp":{1009:17-1009:17}:"("
fix-it:"src/compiler/Intermediate.cpp":{1009:54-1009:54}:")"
src/compiler/Intermediate.cpp:1020:55:{1020:17-1020:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2]
if (left->isMatrix() && right->isVector() ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
src/compiler/Intermediate.cpp:1020:55: note: place parentheses around the '&&' expression to silence this warning [2]
if (left->isMatrix() && right->isVector() ||
^
( )
fix-it:"src/compiler/Intermediate.cpp":{1020:17-1020:17}:"("
fix-it:"src/compiler/Intermediate.cpp":{1020:54-1020:54}:")"
src/compiler/Intermediate.cpp:1020:55:{1021:17-1021:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2]
if (left->isMatrix() && right->isVector() ||
^
src/compiler/Intermediate.cpp:1020:55: note: place parentheses around the '&&' expression to silence this warning [2]
if (left->isMatrix() && right->isVector() ||
^
fix-it:"src/compiler/Intermediate.cpp":{1021:17-1021:17}:"("
fix-it:"src/compiler/Intermediate.cpp":{1021:54-1021:54}:")"
* src/compiler/Intermediate.cpp:
(TIntermBinary::promote): Added parnetheses.
Author: David Kilzer <ddkilzer@apple.com>
git-svn-id: https://angleproject.googlecode.com/svn/trunk@574 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
0eb64c3a
|
2011-03-15T18:23:51
|
|
Fix clang warning: ParseHelper.cpp:264:13: warning: 8 enumeration values not handled in switch
Issue=125
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Part 2 of 5: <http://webkit.org/b/56337> Enable -Werror on ANGLE
Upstream bug: <http://code.google.com/p/angleproject/issues/detail?id=125>
Fixes the following static analyzer warning:
src/compiler/ParseHelper.cpp:264:13: warning: 8 enumeration values not handled in switch: 'EbtVoid', 'EbtBool', 'EbtGuardSamplerBegin'... [-Wswitch-enum,2]
switch( type ){
^
* src/compiler/ParseHelper.cpp:
(TParseContext::precisionErrorCheck): Added a default case.
Author: David Kilzer <ddkilzer@apple.com>
git-svn-id: https://angleproject.googlecode.com/svn/trunk@573 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
cd3a1b94
|
2011-03-15T18:23:46
|
|
Fix clang warning: ConstantUnion.h:56:17: warning: 7 enumeration values not handled in switch
Issue=124
Part 1 of 5: <http://webkit.org/b/56337> Enable -Werror on ANGLE
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Upstream bug: <http://code.google.com/p/angleproject/issues/detail?id=124>
Fixes the following static analyzer warning:
In file included from src/compiler/debug.cpp:14:
In file included from src/compiler/ParseHelper.h:10:
In file included from src/compiler/localintermediate.h:11:
In file included from src/compiler/intermediate.h:21:
src/compiler/ConstantUnion.h:56:17: warning: 7 enumeration values not handled in switch: 'EbtVoid', 'EbtGuardSamplerBegin', 'EbtSampler2D'... [-Wswitch-enum,2]
switch (type) {
^
* src/compiler/ConstantUnion.h:
(ConstantUnion::operator==): Added a default case.
Author: David Kilzer <ddkilzer@apple.com>
git-svn-id: https://angleproject.googlecode.com/svn/trunk@572 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
0b53fc05
|
2011-03-09T15:12:12
|
|
Fix NULL dereference for empty constructors.
Issue=123
Patch by Jacob Benoit.
git-svn-id: https://angleproject.googlecode.com/svn/trunk@570 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
62f20f9d
|
2011-03-09T15:10:18
|
|
Newlines in multi-line comments don't count as a newline.
TRAC #15791
Issue=114
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@569 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
3829f80c
|
2011-02-28T15:06:59
|
|
Fixed a floating-point parsing assert.
TRAC #15790
Issue=99,112
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@567 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
3b5643cf
|
2011-02-28T15:06:55
|
|
Avoid division by zero in the preprocessor
Trac #15792
Issue=115
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@566 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
e90a0d5a
|
2011-02-18T02:52:06
|
|
Minor refactoring.
TRAC #15551
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@563 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
05a5d8e0
|
2011-02-16T19:07:20
|
|
Added new line after generated HLSL break, continue and kill statements.
This is consistent with return statements. It means that when PIX is attached, the #line directive lands on a new line.
Review URL: http://codereview.appspot.com/4179054
git-svn-id: https://angleproject.googlecode.com/svn/trunk@562 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b31f35ab
|
2011-02-11T13:19:35
|
|
Fix invalid compare operation asserts.
TRAC #15551
Issue=116
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@559 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
f1f538ef
|
2011-02-09T16:30:01
|
|
Fix loop splitting.
Trac #15446
Issue=98
Signed-off-by: Daniel Koch
git-svn-id: https://angleproject.googlecode.com/svn/trunk@555 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
7cfb2cff
|
2011-02-01T01:24:29
|
|
Allow variable names with length of up to 256 characters (this is required by WebGL spec).
BUG=109
TEST=the 256-character variable test in glsl-conformance.html passes
Review URL: http://codereview.appspot.com/3981050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@552 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
55d0be04
|
2011-01-28T22:05:31
|
|
Reject non-ASCII characters in shader source at the preprocessor level.
Review URL: http://codereview.appspot.com/4094047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@545 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
0f4cefe9
|
2011-01-26T19:30:57
|
|
Map D3D calls and HLSL shaders back to GLES2 calls and GLSL ES shaders in PIX.
This makes debugging and profiling using PIX a lot more convenient. The top level of events are the GLES calls with their arguments. Those can be expanded to see the D3D calls that were issued for a particular GLES call.
When PIX is attached, the shaders are saved out to temporary files and referenced from the translated HLSL shaders via #line directives. This enabled source level debugging of the original GLSL from PIX for pixel and vertex shaders. The HLSL is also saved to a temporary file so that intrinsic functions like texture2D can be stepped into.
It also avoids creating a text file in the current working directory, which has continued to be an issue.
I made the dependency on d3d9.dll static again so it can be accessed by GetModuleHandle witihin DllMain.
I added an EVENT macro that issues D3DPERF_BeginEvent and D3DPERF_EndEvent around a C++ block. I replaced TRACE with EVENT for all the entry points.
I removed the tracing of shader source since the source is visible in PIX.
The means by which the filename of the temporary shader file is passed into the shader compiler is a little clunky. I did it that way to avoid changing the function signatures and breaking folks using the translator.
I plan to make the compiler respect #pragma optimize so that optimization can be disabled for debugging purposes. For now it just disables shader optimization in debug builds of ANGLE.
Review URL: http://codereview.appspot.com/3945043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@541 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
e9874058
|
2011-01-26T17:32:26
|
|
Fix issues with preprocessor on very malformed shaders
Trac #15236,#15237,#15238,#15239
Error out instead of continued processing when we already know the preprocessor directives are bungled.
Generally be more careful about the order in which cpp->elsetracker and cpp->ifdepth are checked/operated on.
Validate all accesses of cpp->elsedepth to ensure no out of bounds accesses occur.
Also slipped in a few indentation/spacing fixes.
Signed-off-by: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@540 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b31f532d
|
2011-01-19T19:02:52
|
|
All surfaces follow D3D Y convention, i.e. (0, 0) is "top-left" rather than GL's "bottom-left". This eliminates the need to flip the default FBO to the D3D convention using additional blits when presenting and reduces VRAM usage for redundant window sized surfaces.
I took out the gl_Position.y flip from the vertex shader so FBOs are rendered
according to D3D conventions.
Texture lookups are flipped on Y to compensate. Cube map +Y and -Y faces are swapped. Y is now flipped in various other places, including uploading and reading back texture data from / to system memory, functions that take pixel space coordinates, winding order for culling, the implementation of ddy, the calculation of gl_Position and gl_FragCoord in fragment shaders and the flipping of compressed texture tiles.
Review URL: http://codereview.appspot.com/3265041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@536 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
3bd9d90f
|
2011-01-19T03:27:39
|
|
Build fix needed on certain platforms. Explicitly cast away const.
BUG=none
TEST=built within WebKit on Mac OS X in release mode
TBR=daniel
Review URL: http://codereview.appspot.com/4043042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@535 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
e26cb5e4
|
2011-01-18T21:27:02
|
|
Increase GLSL version to 1.20 if the shader contains any matrix constructor
calls taking a matrix as argument; these were reserved in GLSL 1.10. This
makes http://sio29.sakura.ne.jp/tmp/webgl/index_eruru.html load correctly
once https://bugs.webkit.org/show_bug.cgi?id=52390 is fixed.
BUG=103
TEST=none
Review URL: http://codereview.appspot.com/4034041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@534 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
83921386
|
2011-01-08T05:46:00
|
|
rewrite buffers implementation to support static buffers more efficiently
Bug=89
Trac #13565
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@526 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ac369f3d
|
2010-12-15T15:46:00
|
|
Fix structure parsing regression.
TRAC #14717
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@511 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
5efd8b45
|
2010-12-13T14:48:03
|
|
Fix infinite loops in preprocessor when EOF encountered while scanning for newlines.
Trac #14837
Issue=42
Signed-off-by: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@506 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
9a76b814
|
2010-12-12T08:53:34
|
|
Fix memory leak in float literal parsing
Issue=93
Contributed by Benoit Jacob
git-svn-id: https://angleproject.googlecode.com/svn/trunk@504 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
7b17facf
|
2010-12-12T08:52:58
|
|
fix comparison between signed and unsigned integer expressions in TParseContext::constructorErrorCheck
Issue=78
Contributed by timeless
git-svn-id: https://angleproject.googlecode.com/svn/trunk@502 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
90d57a3f
|
2010-12-12T08:52:49
|
|
Fix TType::TType constructors to initialize members in correct order
Issue=77
Contributed by timeless
git-svn-id: https://angleproject.googlecode.com/svn/trunk@501 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
d32941b9
|
2010-11-28T02:03:07
|
|
Add missing files to the Visual Studio project.
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@498 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
3175496d
|
2010-11-28T02:02:52
|
|
Implement gl_DepthRange using a single uniform vector.
TRAC #14504
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@495 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b59a778c
|
2010-11-24T18:38:33
|
|
Implemented validation for loop and indexing limitations specified by GLSL ES spec 1.0 Appendix A Section 4 and 5.
A couple of things to note:
- This CL only validates the "form" of loop and indexing. It does not detect number-of-iterations or out-of-bound access. This will require more involved analysis/heuristics.
- I haved combined SH_VALIDATE_CONTROL_FLOW and SH_VALIDATE_INDEXING into one flag - SH_VALIDATE_LOOP_INDEXING. Validating both together is much easier.
BUG=48
Review URL: http://codereview.appspot.com/3225041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@491 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
bafcbaa3
|
2010-11-23T19:07:43
|
|
Moved the global-pool-allocator to TCompiler so that all memory allocated by the compiler can be de-allocated. Earlier the global-pool-allocator kept accumulating memory from all compilers (symbol-table in particular). The memory was only de-allocated when gpu-process exited or ShFinalize() was called. This was a problem for Chromium which keeps the GPU process around for the browser session. Now the memory is de-allocated as soon as the compiler is deleted, which happens when a tab is closed.
BUG=58808 (crbug.com)
Review URL: http://codereview.appspot.com/3280041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@489 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b3abc78b
|
2010-11-17T21:31:59
|
|
Fixed compile error introduced in r482.
git-svn-id: https://angleproject.googlecode.com/svn/trunk@484 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
52813558
|
2010-11-16T18:36:09
|
|
Replaced TIntermLoop::testFirst with TIntermLoop::loopType to clearly indicate which type of loop it is. In some cases it is not possble to differentiate between a for-loop and while-loop.
BUG=48
Review URL: http://codereview.appspot.com/3123041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@482 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
bdfb2e50
|
2010-11-15T16:41:20
|
|
Only initialize through a temporary variable if the same symbol name is used in the initialization expression.
TRAC #13627
The previous patch can generate a lot of unnecessary temporary variables. By first checking whether the same symbol name is reused the clutter is reduced to an absolute minimum (typical shaders won't rely on this odd GLSL semantic behavior so the workaround is hardly ever needed).
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@479 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b6ef8f11
|
2010-11-15T16:41:14
|
|
Define new variables after evaluating the initialization expression.
TRAC #13627
GLSL allows to write things like "float x = x;" where a new variable x is defined and the value of an existing variable x is assigned. HLSL uses C semantics (the new variable is created before the assignment is evaluated), so we need to convert this to "float t = x, x = t;".
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@478 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
1f29954d
|
2010-11-12T15:50:23
|
|
Added API to enforce GLSL limitations mandated by WebGL.
BUG=48
Review URL: http://codereview.appspot.com/3005042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@476 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
044a5cf8
|
2010-11-12T15:42:16
|
|
Refactored glslang grammar files to make:
- lexer and parser reentrant
- line number handling automatic
Caveats:
- The preprocessor is still not thread-safe and full of bugs. I have another not-yet-ready patch to replace the preprocessor.
- The grammar files use options that are not supported by the old versions of flex and bison checked into compiler/tools. So I need to check-in the generated lexer-parser along with a shell script to generate them.
Review URL: http://codereview.appspot.com/2992041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@475 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
2dfc47e3
|
2010-11-08T13:45:24
|
|
Fix ternary operator unfolding
TRAC #14155
Issue=70
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@474 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
91ed1494
|
2010-10-29T03:11:43
|
|
Use C locale for atof to ensure using a dot as decimal mark.
TRAC #14055
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@470 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
8860909e
|
2010-10-27T19:42:44
|
|
Fixed infinite loops and buffer overflow in byte_scan when scanning for integers and floating-point numbers.
- The byte_scan and associated functions are not very well written. I tried to clean them as much as possible without re-writing the whole thing.
- Replaced lBuildFloatValue function with atof. lBuildFloatValue was returning incorrect value anyway. The only reason it was working so far because we never used that value.
BUG=59623(crbug.com), 603333(bugzilla.mozilla.org)
Review URL: http://codereview.appspot.com/2655042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@469 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
f5855c5e
|
2010-10-21T16:31:18
|
|
We were not reporting anything in the info-log for empty shader. This CL reports "unexpected EOF".
BUG=66
Review URL: http://codereview.appspot.com/2619041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@466 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
43668cd0
|
2010-10-20T20:55:53
|
|
Fixed stack overflow in CPPextension function. An arbitrary size buffer was being used for extension name. Changed it to use MAX_SYMBOL_NAME_LEN.
- Also formalized the values for MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN. They were being used as if there was a confusion whether it included the NULL terminator or not.
- Fixed some minor issues with code releated to the usage of MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN.
BUG=59625 (crbug.com)
Review URL: http://codereview.appspot.com/2585042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@464 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
fafd033e
|
2010-10-14T18:20:24
|
|
Added NSPR support for thread-local storage. Patch submitted by vladimirv. I have slightly modified the patch to still define ANGLE_OS_WIN and ANGLE_OS_POSIX.
BUG=54
Review URL: http://codereview.appspot.com/2497041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@454 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
d300f5b0
|
2010-10-14T16:10:20
|
|
Removed redundant null-check. Patch submitted by timeless.
BUG=58
Review URL: http://codereview.appspot.com/2470042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@453 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
18895cb1
|
2010-10-14T16:09:57
|
|
Initialized TPoolAllocator::totalBytes. Patch submitted by timeless.
BUG=60
Review URL: http://codereview.appspot.com/2494041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@452 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
95447df0
|
2010-10-14T16:09:37
|
|
GLSL backend was assuming that a for-loop will always have a condition. But according to GLSL ES 1.0, the condition is optional.
BUG=50
Review URL: http://codereview.appspot.com/2489042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@451 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ac23189b
|
2010-10-14T16:09:09
|
|
Removed redundant dereference. Patch submitted by timeless.
BUG=64
Review URL: http://codereview.appspot.com/2495041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@450 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
6c82cafe
|
2010-10-14T16:08:56
|
|
Replaced delete with delete[]. Patch submitted by timeless.
BUG=59
Review URL: http://codereview.appspot.com/2493041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@449 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
9ecf3950
|
2010-10-13T19:28:25
|
|
GLSL backend now emits "#version 120" to legally access invariant keyword and gl_PointCoord built-in variable.
BUG=35
Review URL: http://codereview.appspot.com/2341043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@448 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
4888ceb6
|
2010-10-01T21:13:12
|
|
Made the API of shader translator library consistent.
- We recently started using OpenGL-type enums. This CL makes all old enums consistent with the new scheme.
- Renamed TBuiltInResource to ShBuiltInResources to have a consistent prefix
BUG=46
Review URL: http://codereview.appspot.com/2328041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@443 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
10e6e9e3
|
2010-09-27T21:03:45
|
|
Handled case when variable declaration contains initialization.
BUG=26
Review URL: http://codereview.appspot.com/2213049
git-svn-id: https://angleproject.googlecode.com/svn/trunk@441 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ee76f6af
|
2010-09-27T19:28:55
|
|
Implemented functionality to collect and return info for attributes and uniforms.
BUG=26
Review URL: http://codereview.appspot.com/2206046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@440 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
570bfc7c
|
2010-09-24T17:19:25
|
|
Built-in string for vertex shaders can be empty. Nicolas handled this case in r433 but r437 overwrote it.
Review URL: http://codereview.appspot.com/2233046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@439 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
07620a58
|
2010-09-23T17:53:56
|
|
- Moved the implementation for ShCompile to the compiler class so that internal details about compiler can be encapsulated. Now we do not need to expose built-in symbol table.
- Fixed a few const violations.
- Added CollectAttribsUniforms class.
BUG=26
Review URL: http://codereview.appspot.com/2263041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@437 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ecd7cf35
|
2010-09-22T17:13:50
|
|
Define vertex texture sampling intrinsics only when supported
TRAC #12245
This ensures that the shader will fail to compile when using VTF when it's not supported.
Previously an error was generated only at link time and it was not very descriptive.
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@433 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
7beea408
|
2010-09-15T21:18:34
|
|
Added API to query for active attribs and uniforms. These functions are modeled after glGetShaderiv, glGetProgramiv, glGetActiveAttrib, and glGetActiveUniform. The main difference between this and OpenGL API is that we do not have programs - just shaders.
BUG=26
Review URL: http://codereview.appspot.com/2183041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@425 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
8815d7f2
|
2010-09-09T17:30:03
|
|
Added support for associating functions with extensions and performing validation when those functions are used in a shader.
BUG=25
Review URL: http://codereview.appspot.com/2141046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@415 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b19403a1
|
2010-09-08T17:56:26
|
|
Removed unnecessary member variables from TIntermAggregate. Replaced operator overloading with a proper function in TFunction.
Review URL: http://codereview.appspot.com/2137043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@414 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ad771eb2
|
2010-09-07T17:36:23
|
|
Added mechanism to predefine associated macros for extensions. Also refactored the way extension behavior is initialized and updated.
Please note that I still need to add validation that appropriate extensions are enabled before using an extension function.
BUG=25
Review URL: http://codereview.appspot.com/2139042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@413 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
8f0f24a0
|
2010-09-01T21:06:24
|
|
Removed support for unused/deprecated extension - GL_3DL_array_object.
TEST=conformance tests.
Review URL: http://codereview.appspot.com/2043043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@412 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
06098890
|
2010-08-26T19:36:42
|
|
Allow derivative functions if derivative extension is enabled. I still need to add validation for "#extension GL_OES_standard_derivatives : enable".
BUG=25
Review URL: http://codereview.appspot.com/1965045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@403 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
94a86ad8
|
2010-08-25T20:02:11
|
|
Adding support for OES_standard_derivatives extension. This is not the complete implementation. Sending it to get feedback on the API. Is it OK to add extension support into TBuiltInResource? I could create a new struct for extensions but that would lead to API change.
BUG=25
Review URL: http://codereview.appspot.com/1953047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@402 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
58e54298
|
2010-08-24T21:40:03
|
|
Cleanup TType and related classes:
1. Removed unused functions
2. Removed unnecessary virtuality of functions
3. Grouped related functions together
TEST=conformance tests
Review URL: http://codereview.appspot.com/1984047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@400 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
32cfaf4b
|
2010-08-23T21:01:13
|
|
TIntermBinary::promote() was incorrectly marking the type of result as const in some cases. The result can only be const if both operands are const. Also cleaned up the function to remove redundant/repeated checks.
BUG=24
TEST=OpenGL ES 2.0 Conformance tests
Review URL: http://codereview.appspot.com/1938047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@385 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
c7b6eba9
|
2010-08-09T22:33:53
|
|
Fixed warnings about deprecated conversion from string constant to char*. Submitted by timeless.
BUG=18
Review URL: http://codereview.appspot.com/1936041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@381 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b416e70e
|
2010-08-09T22:32:56
|
|
Some compilers do not support standard STL allocator interface. Also removed _Charalloc function only needed by VC++6.0, which we do not support. Submitted by Eagle.Lu.
BUG=19
Review URL: http://codereview.appspot.com/1913048
git-svn-id: https://angleproject.googlecode.com/svn/trunk@380 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
434fdf21
|
2010-08-09T22:31:36
|
|
Fix warnings about unused variables. Submitted by timeless.
BUG=15
Review URL: http://codereview.appspot.com/1916046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@379 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
bcfba4c3
|
2010-08-09T22:30:49
|
|
Fix warnings about comparison/assignement between signed and unsigned types. Submitted by timeless.
BUG=13
Review URL: http://codereview.appspot.com/1895051
git-svn-id: https://angleproject.googlecode.com/svn/trunk@378 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
6eed5eb2
|
2010-08-09T22:29:59
|
|
ret = yyparse(...) is dropped in PaParseStrings. Submitted by timeless.
BUG=16
Review URL: http://codereview.appspot.com/1868056
git-svn-id: https://angleproject.googlecode.com/svn/trunk@377 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b2dfd8ea
|
2010-08-09T22:28:19
|
|
Fix warnings about initialization order in the class initialization list. Submitted by timeless.
BUG=14
Review URL: http://codereview.appspot.com/1850054
git-svn-id: https://angleproject.googlecode.com/svn/trunk@376 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
0a57618a
|
2010-08-09T17:16:27
|
|
Reject shaders that invoke functions hidden by variable or struct name.
BUG=22
Review URL: http://codereview.appspot.com/1855057
git-svn-id: https://angleproject.googlecode.com/svn/trunk@375 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
003e7b13
|
2010-08-09T17:14:46
|
|
We were trying to change a const_iterator which was rightly caught by SunStudio compiler. Submitted by Eagle.Lu.
BUG=19
Review URL: http://codereview.appspot.com/1879049
git-svn-id: https://angleproject.googlecode.com/svn/trunk@374 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
5223af6b
|
2010-08-09T17:14:09
|
|
Replaced __inline with inline to make it compile with SunStudio compiler. Submitted by Eagle.Lu.
BUG=19
Review URL: http://codereview.appspot.com/1910047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@373 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
f8de41fb
|
2010-08-09T16:51:37
|
|
Adding separate license file for the preprocessor code and removing the ANGLE boilerplate license from those files.
git-svn-id: https://angleproject.googlecode.com/svn/trunk@372 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
4f921eb4
|
2010-07-28T19:20:44
|
|
Renamed dx_Window to dx_Viewport
TRAC #11594
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@356 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
34b99cdf
|
2010-07-27T18:37:55
|
|
De-allocate memory in ShFinalize(). There still seems to be a bug here if the translator is used in a multi-threaded environment. It seems memory local to only one thread is being deallocated - the thread from which ShFinalize() is called. I will look into it closely in the next CL.
Review URL: http://codereview.appspot.com/1878044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@353 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
5eb4609c
|
2010-07-26T18:15:21
|
|
Encapsulate expressions with ternary operators with brackets. This preserves the order of precedence when ternary expressions are used in a compound expression.
BUG=20
Review URL: http://codereview.appspot.com/1894041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@352 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
e4249f02
|
2010-07-26T18:13:52
|
|
Refactored the way symbol tables are initialized and stored. This was done in response to the addition of EShSpec.
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
|
|
c54bf507
|
2010-07-22T16:49:09
|
|
Further cleanup of ShaderLang.h. Removed redundant/unused macros and enum fields.
Review URL: http://codereview.appspot.com/1842046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@349 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
774d7063
|
2010-07-21T18:55:45
|
|
Cleaned up translator API. Deleted unsupported dead code.
BUG=9
Review URL: http://codereview.appspot.com/1665050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@348 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
a300988e
|
2010-07-21T18:54:37
|
|
Check for reserved prefixes (gl_, webgl_, and _webgl_) in struct and field names. GLES2 and WebGL both require this for all identifiers - variable, function, struct, and field names. ANGLE was only validating variable and function names.
BUG=11
Review URL: http://codereview.appspot.com/1856046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@347 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
613ef31a
|
2010-07-21T18:54:22
|
|
Added checks for webgl_ and _webgl_ reserved identifiers. This currently only checks variable and function names. Struct names and field names will be added in the another CL.
BUG=11
Review URL: http://codereview.appspot.com/1674050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@346 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
bad6c2a4
|
2010-07-20T20:19:51
|
|
Added <stdio.h> include for sprintf. It broke Chrome downstream when I bumped the rev.
Review URL: http://codereview.appspot.com/1879042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@345 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
29cd91af
|
2010-07-16T19:30:45
|
|
Added an option for specifying language specification in preparation for supporting WebGL in addition to GLES2. This CL just replaces unused debugOptions variable with EShSpec variable.
BUG=11
Review URL: http://codereview.appspot.com/1692051
git-svn-id: https://angleproject.googlecode.com/svn/trunk@344 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
01b666f2
|
2010-07-16T19:27:45
|
|
Fixed compilation error on mingw. Used _MSC_VER for MSVC-specific code instead of WIN32. Recieved patch from cjacek.
BUG=12
Review URL: http://codereview.appspot.com/1694049
git-svn-id: https://angleproject.googlecode.com/svn/trunk@343 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
9abe956e
|
2010-06-24T13:02:21
|
|
Removed the precision check creating spurious error messages
TRAC #12641
The precision of compiler temporaries doesn't require checking,
and would be hard to determine at parse time. We only require
correct precisions for declarations, which is checked separately.
So we can safely remove the check for binary operations.
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@342 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
8187fa8f
|
2010-06-15T22:09:28
|
|
Added some includes.
My Unbuntu 10.04 gcc configuration seems to need <stdio.h> to use some of the string printf functions like vsnprintf.
The translator is building for me now.
Review URL: http://codereview.appspot.com/1717041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@337 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
cba04990
|
2010-06-14T20:36:41
|
|
Added parentheses around a few operators so that if they are used in a compound statement, order of operations is preserved.
BUG=5
TEST=OpenGL ES 2.0 conformance tests.
Review URL: http://codereview.appspot.com/1691041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@336 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
334aa1f3
|
2010-06-11T23:38:29
|
|
Handled case where selection nodes that use ternary operators are part of a sequence. Usually they are part of an assignment.
BUG=4
TEST=OpenGL ES 2.0 conformance tests, specifically operators test.
Review URL: http://codereview.appspot.com/1643043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@335 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
7d3849bd
|
2010-06-08T16:07:55
|
|
Fix build when a project patch contains spaces
Trac #11553
With improvements so it works in release mode and on Win7 as well.
Original-Author: Jim Hauxwell
git-svn-id: https://angleproject.googlecode.com/svn/trunk@334 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b0a1dccc
|
2010-06-07T02:06:26
|
|
Fix regression due to float printing changes
Trac #12501
This was caused by the change from printf to iostream printing.
Sets the float formatting to "default" which is neither fixed or scientific and request 8 digits of precision.
This appears to be mostly equivalent to the previous "%.8g".
If the non-fractional case, we set it to fixed and use 1 unit of precision after the decimal.
Signed-off-by: Andrew Lewycky
Signed-off-by: Shannon Woods
Signed-off-by: Ken Russell
git-svn-id: https://angleproject.googlecode.com/svn/trunk@331 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
9c212cae
|
2010-06-02T22:53:00
|
|
Fixed warnings in release build. Trace was not defined properly.
Review URL: http://codereview.appspot.com/1484041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@327 736b8ea6-26fd-11df-bfd4-992fa37f6226
|