|
e148f3d3
|
2015-06-17T11:41:28
|
|
Fix lots of compilation errors in generated GLSL functions.
Reformatted to improve readability.
BUG=angleproject:angleproject:947
Change-Id: I467f0396a0318b7a51d5cafce3f11e55d929c369
Reviewed-on: https://chromium-review.googlesource.com/278250
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
7b9b284b
|
2015-06-15T11:02:49
|
|
Refactor GLSL version calculations for emulated functions.
Pass the target GLSL version to InitBuiltInFunctionEmulatorForGLSL so that
it can be updated to generate emulated functions for multiple versions.
BUG=angleproject:1044
Change-Id: I34c408df52fd0f7d6c2f66d0579ac854afd93b87
Reviewed-on: https://chromium-review.googlesource.com/277700
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
e2adce1b
|
2015-06-19T23:06:32
|
|
Workaround for some STLs not parsing floats with a suffix
BUG=angleproject:1046
BUG=angleproject:891
Change-Id: I01c3f024142e573385a5f40d721171ad752ffd19
Reviewed-on: https://chromium-review.googlesource.com/278210
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
2539fffa
|
2015-06-16T17:56:09
|
|
Add ShClearResults() for clearing last compilation results.
This helps reclaiming memory used by the results when we don't need
them anymore.
BUG=492725
Change-Id: I4bc11be27b23589548120f0dc43e9979bf894089
Reviewed-on: https://chromium-review.googlesource.com/277808
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Dmitry Skiba <dskiba@google.com>
Tested-by: Dmitry Skiba <dskiba@google.com>
Reviewed-by: Dmitry Skiba <dskiba@google.com>
|
|
34482831
|
2015-06-10T15:16:07
|
|
Add missing newlines to BuiltInFunctionEmulatorGLSL.cpp and Pack_Unpack_test.cpp.
BUG=angleproject:947
Change-Id: I8cbcd99e8c2cb7c461b0c624596631a4dec6dcc8
Reviewed-on: https://chromium-review.googlesource.com/276668
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
03f3caec
|
2015-03-16T02:01:21
|
|
Emulate Missing pack_unpack functions from OpenGL 4.1
BUG=angleproject:947
TEST=angle_unittests, angle_end2end_tests
Change-Id: Id1afd7630d9720b6701225b7abf1ce4a3bf528b6
Reviewed-on: https://chromium-review.googlesource.com/260232
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a4aa4e30
|
2015-06-04T15:54:30
|
|
Record precision of constant variables when needed
Add a traverser that checks precision qualifiers of folded constants and
hoists them to separate precision qualified variables if needed.
Fixes sdk/tests/conformance/glsl/bugs/constant-precision-qualifier.html
TEST=WebGL conformance tests, angle_unittests
BUG=angleproject:817
Change-Id: I1639595e0e49470736be93274f0af07ee732e1fe
Reviewed-on: https://chromium-review.googlesource.com/275095
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b43846ee
|
2015-06-02T18:18:57
|
|
Unify aggregate operator folding with other constant folding
Setting the type for folded aggregate nodes should work in a similar way
as other constant folding. Common functionality between the different
folding functions is refactored into a single function.
TEST=dEQP-GLES3.functional.shaders.constant_expressions.*
BUG=angleproject:817
Change-Id: Ie0be561f4a30e52e52d570ff0b2bdb426f6e4f7a
Reviewed-on: https://chromium-review.googlesource.com/275186
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
95310b00
|
2015-06-02T17:43:38
|
|
Unify unary operator folding with binary operator folding
Implement unary operator folding in a similar way to binary operator
folding, so that the code is easier to understand.
TEST=dEQP-GLES3.functional.shaders.constant_expressions.*
BUG=angleproject:817
Change-Id: I069bdb38f965e1badb3e8f3f954386b205b7bb00
Reviewed-on: https://chromium-review.googlesource.com/275185
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
2c4b746c
|
2015-06-08T11:30:31
|
|
Revert "Revert "Make sure type gets set consistently in folded binary operations""
This patch was originally reverted only because a dependency patch failed a
buggy Chromium test.
This reverts commit aebd002d00d39858819c58bad1970df121b78e1b.
TEST=dEQP-GLES3.functional.shaders.constant_expressions.*
BUG=angleproject:817
Change-Id: Ia5acf15518ea89717c0cfe1398cb18ea27be5b19
Reviewed-on: https://chromium-review.googlesource.com/275811
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3d0d9a48
|
2015-06-01T12:16:36
|
|
Clean up TIntermTraverser usage
Remove default parameters from TIntermTraverser.
Also clean up a few dead function declarations in traversers.
TEST=angle_unittests, angle_end2end_tests
BUG=angleproject:1037
Change-Id: I8d126c6c2d5b53e8b14e23e3d102f204a59323b3
Reviewed-on: https://chromium-review.googlesource.com/275184
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
1155ddd2
|
2015-06-05T18:04:36
|
|
Revert "Revert "Add constant folding support for geometric built-ins""
Revert of revert as the issue is with the failing test itself.
This reverts commit b3da45c12d3eecdd319c0feb4d2b933e144f816a.
Change-Id: Ie2003c78527f87cad7f8ead0d87fee75ce032379
Reviewed-on: https://chromium-review.googlesource.com/275487
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
64f0be91
|
2015-06-03T17:38:34
|
|
Remove unused right-to-left AST traversal support
No code actually uses the right-to-left traversal. All it does is add
unnecessary complexity.
TEST=angle_unittests, angle_end2end_tests
BUG=angleproject:1037
Change-Id: Id15498343538c02c252ef0852f9a00c85ac3c4bb
Reviewed-on: https://chromium-review.googlesource.com/275183
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b3da45c1
|
2015-06-04T19:38:22
|
|
Revert "Add constant folding support for geometric built-ins"
This is failing gpu_unittests on Mac:
ShaderTranslatorTest.BuiltInFunctionEmulation:
../../gpu/command_buffer/service/shader_translator_unittest.cc:314: Failure
Value of: strstr(translated_source.c_str(), "webgl_dot_emu") != NULL
Actual: false
Expected: true
Reverting until we can fix the overly-narrow test.
BUG=angleproject:913
This reverts commit b50788d11dec046415565af1cc7da334e2979577.
Change-Id: I5bd9df83704e771e419339745eceaa43a20bd1e6
Reviewed-on: https://chromium-review.googlesource.com/275320
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
aebd002d
|
2015-06-04T19:43:44
|
|
Revert "Make sure type gets set consistently in folded binary operations"
This is blocking the revert of the geometric constant folding
patch, which is breaking gpu_unittests and blocking the roll.
BUG=angleproject:817
This reverts commit b07aba0798d3bba3118dac78933e73b3f08a601b.
Change-Id: Ia00fc45b1ddd9d3c079742dea0627aa12304f93b
Reviewed-on: https://chromium-review.googlesource.com/275321
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
b07aba07
|
2015-05-29T12:19:19
|
|
Make sure type gets set consistently in folded binary operations
Add a wrapper function that handles creating the folded node and setting the
right parameters on it, so that the folding function handles only
calculating the folded values.
This will fix the precision set to constant folded values in some cases.
Previously the precision was always set to be equal to one of the operands
to the binary operation, but now both operands are taken into account.
Folding binary operations is now in a separate function from folding unary
operations.
TEST=dEQP-GLES3.functional.shaders.constant_expressions.*
BUG=angleproject:817
Change-Id: Id97e765173c6110f49607e21c3fb90019b1ebac7
Reviewed-on: https://chromium-review.googlesource.com/274001
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b50788d1
|
2015-05-25T19:20:26
|
|
Add constant folding support for geometric built-ins
* re-land after mac compilation fix (unsupported c++11 initializer) *
This change adds constant folding support for following geometric
built-ins:
- length, distance, dot, cross, normalize, faceforward,
reflect and refract.
BUG=angleproject:913
TEST=angle_unittests, dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.geometric.*
(56 tests started passing with this change)
Change-Id: I236fc0c1af47a63f359564500c711e6bedf1c808
Reviewed-on: https://chromium-review.googlesource.com/274789
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
8f76bcc4
|
2015-06-02T13:54:20
|
|
Add unit test for RemovePow
Add two versions of the test - one with a single pow(), and another with
a nested pow().
TEST=angle_unittests
BUG=477306
Change-Id: Idb38e57a4b2522b7794996d6ea0f0456b349abf7
Reviewed-on: https://chromium-review.googlesource.com/274736
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
5bdb8472
|
2015-06-03T16:21:33
|
|
Remove unused QualifierAlive traverser
This class is not used anywhere in the code.
TEST=angle_unittests
Change-Id: Ib59573203636a669b136e3823d0abea8120f448e
Reviewed-on: https://chromium-review.googlesource.com/274896
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
2f4823bf
|
2015-06-03T12:39:22
|
|
Revert "Add constant folding support for geometric built-ins"
Breaks Mac build because of C++11 init syntax:
FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/tests/compiler_tests/angle_unittests.ConstantFolding_test.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=238013-3 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGL_APICALL= -DGL_GLEXT_PROTOTYPES= -DEGLAPI= '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll" }' -DANGLE_TRANSLATOR_STATIC -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -Igen -I../.. -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/compiler/preprocessor -I../../third_party/angle/src/tests -Igen/angle -I../../testing/gmock/include -I../../testing/gtest/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O0 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder__dbg_/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -fcolor-diagnostics -fno-strict-aliasing -fstack-protector-all -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -c ../../third_party/angle/src/tests/compiler_tests/ConstantFolding_test.cpp -o obj/third_party/angle/src/tests/compiler_tests/angle_unittests.ConstantFolding_test.o
../../third_party/angle/src/tests/compiler_tests/ConstantFolding_test.cpp:210:43: error: no matching constructor for initialization of 'std::vector<float>'
ASSERT_FALSE(constantVectorFoundInAST(std::vector<float>{1.0f, 1.0f, 1.0f}));
^ ~~~~~~~~~~~~~~~~~~
BUG=angleproject:913
This reverts commit 2decb4b1557a57a5a74e3ab98d8b25f9fc0f8557.
Change-Id: Iaf3c61a0c0ed591c17f50f2e3eafe2debf588c95
Reviewed-on: https://chromium-review.googlesource.com/274917
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
2decb4b1
|
2015-05-25T19:20:26
|
|
Add constant folding support for geometric built-ins
This change adds constant folding support for following geometric
built-ins:
- length, distance, dot, cross, normalize, faceforward,
reflect and refract.
BUG=angleproject:913
TEST=angle_unittests, dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.geometric.*
(56 tests started passing with this change)
Change-Id: I973689554bb8c30ee3ebdf71f1b8a051ceb5e0cf
Reviewed-on: https://chromium-review.googlesource.com/273097
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
5c407bb7
|
2015-06-01T12:20:39
|
|
Work around pow() issue in NVIDIA 331.x drivers
pow(x, y) when y is a certain kind of a constant vector can cause issues on
NVIDIA 331 series drivers. Add an option to replace pow(x, y) with
exp2(y * log2(x)) when y is a constant to work around this issue.
This is done with an AST traverser instead of BuiltInFunctionEmulator, since
there's no mechanism in BuiltInFunctionEmulator to apply the replacements
only to calls where the second parameter is constant.
TEST=WebGL conformance tests
BUG=chromium:477306
Change-Id: Ifb327d72659fca36868439f24705203014b3ce53
Reviewed-on: https://chromium-review.googlesource.com/274279
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
4785fec9
|
2015-05-18T16:09:37
|
|
Clean up most common extra semicolons and braces in HLSL output
Clean up extra semicolons and braces from loops and conditional statements
and extra braces from function definitions.
This makes the HLSL output considerably easier to read.
TEST=angle_unittests, angle_end2end_tests, dEQP-GLES3.functional.shaders.*,
WebGL conformance tests
BUG=angleproject:1013
Change-Id: I8180bab7b3d4bda1cdb8e4fb51cf9d8e384dd797
Reviewed-on: https://chromium-review.googlesource.com/273607
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
4d59f3c6
|
2015-05-28T17:33:53
|
|
Make false blocks produced by RewriteElseBlocks sequence nodes
All child nodes of selection should be sequence nodes, so that they will
output braces and extra braces can be removed from HLSL output.
Also make RewriteElseBlocks to reuse common IntermTraverser functionality
to simplify the code.
TEST=WebGL conformance tests on D3D9
BUG=angleproject:1013
Change-Id: Iafdc05468b22d110abcd020cf52c646dd98fb4a0
Reviewed-on: https://chromium-review.googlesource.com/273608
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
9d0b1f9b
|
2015-05-20T14:27:17
|
|
Constant fold vector relational built-ins
This change adds constant folding support for vector relational
built-ins.
BUG=angleproject:913
TEST=dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.vector_relational*
(Fixes all 138 tests)
Change-Id: I291e332f2afb3ce3d6596e634f509995dbf35164
Reviewed-on: https://chromium-review.googlesource.com/272344
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
4f1af784
|
2015-05-25T11:55:07
|
|
Handle function calls where returned array is not used
This is done by declaring a temporary variable which is passed as the
array out parameter defined by ArrayReturnValueToOutParameter.
SeparateExpressionsReturningArrays takes care of transforming the rest of
the cases where a function call returns an array into form that
ArrayReturnValueToOutParameter can handle.
BUG=angleproject:971
TEST=WebGL 2 conformance tests, dEQP-GLES3.functional.shaders.arrays.*
Change-Id: I70c07712ba5cd91efb4c2e575ecc49b9ef71bfd7
Reviewed-on: https://chromium-review.googlesource.com/273111
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
950457b3
|
2015-05-26T14:36:59
|
|
Fix destructing TStrings through BuiltInFunctionEmulator after free
BuiltInFunctionEmulator gets destructed after the PoolAllocator has already
freed memory. That's why BuiltInFunctionEmulator can't hold any objects that
contain parts stored in the memory pool that would be accessed in its
destructor. Use only pointers to TType objects inside
BuiltInFunctionEmulator, so that the BuiltInFunctionEmulator destructor doesn't
access TStrings which have data in the memory pool.
Also fix style issues in BuiltInFunctionEmulator.
BUG=angleproject:1010
TEST=dEQP-GLES3.functional.shaders.builtin_functions.*
Change-Id: Ic35caf80bf125d0427c2ed2024e98657756103b6
Reviewed-on: https://chromium-review.googlesource.com/272738
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
c378cd8a
|
2015-05-25T15:21:44
|
|
Check that #version 300 es directive is on the first line
ESSL3.00 and 3.10 specs don't allow even newlines before the version
directive.
BUG=angleproject:1009
TEST=WebGL 2 conformance tests, angle_unittests
Change-Id: Id7967829077e35e03572c724e0eafffbed0c975b
Reviewed-on: https://chromium-review.googlesource.com/272719
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
a357236f
|
2015-05-22T16:15:01
|
|
Fix small issues in array related AST transformations
Make sure that user-defined bit stays in place when copying function call
nodes, and that mInFunctionWithArrayReturnValue gets reset correctly in
ArrayReturnValueToOutParameter.
BUG=angleproject:971
TEST=WebGL 2 conformance tests
Change-Id: I385f4ce4990597e44ddad4f0fa6db23b661771dc
Reviewed-on: https://chromium-review.googlesource.com/273110
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
081c3f2e
|
2015-05-25T15:43:35
|
|
Report warning whenever constant folding results are undefined
With recent constant folding changes, we are reporting warnings
whenever constant folding results are undefined for values passed in,
this change adds that warning at all the places where it was missing.
BUG=angleproject:913
TEST=dEQP Tests, angle_unittests
Change-Id: Ief8380488e2a4807c91ddac06d342cb172433b9d
Reviewed-on: https://chromium-review.googlesource.com/272879
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
7e7e68de
|
2015-05-22T12:02:25
|
|
Fix styling issues in ParseContext.cpp
There were lot of styling issues in ParseContext.cpp, mostly related to
opening braces on same line as conditional statement and pointers and
references not being tight to the variable in variable declarations,
this change fixes them.
TEST=angle_unittests
Change-Id: Ia225726254bcf5f315c13054ff41c5ff9cfe0992
Reviewed-on: https://chromium-review.googlesource.com/272846
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a5316a18
|
2015-05-15T15:25:16
|
|
Separate expressions returning arrays for HLSL output
Complex array expressions need to be broken down in HLSL output so that they
are built out of simple combinations of operations and symbols.
In practice this means that array constructors, array assignments and functions
that return arrays inside complex expressions need to be replaced by symbols.
After this change, ANGLE passes all dEQP-GLES3.functional.shaders.arrays
tests.
The old SimplifyArrayAssignment stub is removed, the new name
SeparateExpressionsReturningArrays more closely reflects what the function
needs to do.
BUG=angleproject:971, angleproject:941
TEST=dEQP-GLES3.functional.shaders.arrays.*, WebGL 2 conformance tests
Change-Id: Iab8dde72b1126dc2f958ffb5b1b830fe3ce25912
Reviewed-on: https://chromium-review.googlesource.com/272122
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
d4f303ee
|
2015-05-20T17:09:06
|
|
Refactoring: Make creating temporary symbols in AST traversal reusable
Temporary symbols will also be needed to store temporary arrays when complex
array expressions are unfolded.
Also clear tree update related structures at the end of updateTree(), so that
the traverser can be reused for several rounds of replacement more easily, and
remove unnecessary InVisit step from UnfoldShortCircuitToIf.
BUG=angleproject:971
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: Iecdd3008d43f01b02fe344ccde8614f70e6c0c65
Reviewed-on: https://chromium-review.googlesource.com/272121
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
bf790420
|
2015-05-18T17:53:04
|
|
Add constant folding support for more built-ins
This change adds constant folding support for following built-ins:
- atan(two arguments), pow, mod, mix, step and smoothstep.
BUG=angleproject:913
TEST=dEQP tests
Following 80 tests from dEQP-GLES3.functional.shaders.constant_expressions
started passing with this change:
- builtin_functions.angle_and_trigonometry.atan_separate*
- builtin_functions.exponential.pow_*
- builtin_functions.common.mod_*
- builtin_functions.common.mix_*
- builtin_functions.common.step_*
- builtin_functions.common.smoothstep_*
Change-Id: I70f0a8837a82c480da8cff3f1382c6252a486fe4
Reviewed-on: https://chromium-review.googlesource.com/271753
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a588ef5b
|
2015-05-19T16:38:47
|
|
Fix most occurences of -Winconsistent-missing-override
Other occurences are in code generated by macro in googlemock.
BUG=angleproject:892
Change-Id: I8b2c6ad4b793be2d9a440687b1b010c9feb8bdae
Reviewed-on: https://chromium-review.googlesource.com/272224
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
7d7f8c44
|
2015-05-19T18:38:49
|
|
Ensure that conditional blocks and loop bodies are sequence nodes
AST transformations such as unfolding logical operations can only
create nodes inside sequence (block) nodes. This patch ensures that these
AST transformations work even inside conditional blocks and loop bodies
that were first parsed as single statements instead of blocks.
BUG=angleproject:971
TEST=WebGL conformance tests
Change-Id: If98cb7be653ec7b005537b89547f4f4cf1c07c72
Reviewed-on: https://chromium-review.googlesource.com/272141
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
56eea884
|
2015-05-18T12:41:03
|
|
Refactoring: make tracking parent block position in AST traversal reusable
Add a helper function to make it easier for traverser classes to insert
statements, and use it in UnfoldShortCircuitToIf.
BUG=angleproject:971
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: I141bdd8abf4b01988581e6cb27c2320bf38370ac
Reviewed-on: https://chromium-review.googlesource.com/272140
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
d94f6647
|
2015-05-18T16:25:12
|
|
Add ANGLE support for ESSL3 variant of mix()
This change adds support for ESSL3 variant of built-in function mix()
that takes last argument as a boolean vector. lerp() - HLSL equivalent
of mix() doesn't look to be supporting a variant that takes last
argument as a boolean vector so emulated it for HLSL.
BUG=angleproject:1006
TESTS=dEQP tests
Fixes "no matching overloaded function found " errors in below tests:
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.mix_*_b*
(Note: These tests still fail because of constant expression issues)
Change-Id: I79b353933cb450516b8678b1fdaeabe60417e9a7
Reviewed-on: https://chromium-review.googlesource.com/271751
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
bc99bb6b
|
2015-05-14T17:42:20
|
|
Enable more warnings on GCC and clang
BUG=angleproject:892
Change-Id: I74ca341f29b245f698d1e1ad43149a91db46817f
Reviewed-on: https://chromium-review.googlesource.com/271411
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
fd3b9be6
|
2015-05-18T17:07:36
|
|
Set mUsesDiscardRewriting more conservatively
This fixes a regression from recent refactoring of unfolding short-circuiting
operators. mUsesDiscardRewriting used to be set based on detecting patterns
that the AST traverser now overwrites before the code reaches OutputHLSL. With
this patch mUsesDiscardRewriting is set more conservatively, which ensures that
using discard works correctly also in case the input shader contains the same
kind of pattern as the short-circuiting operator unfolding creates.
TEST=WebGL conformance tests on D3D9
BUG=chromium:488552
Change-Id: Iea0103822a268079593b0913f0b6fc54c745c6e3
Reviewed-on: https://chromium-review.googlesource.com/271761
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
274f0709
|
2015-05-05T13:33:30
|
|
Add constant folding support for min,max and clamp
This change adds necessary mechanism to support constant folding of
built-ins that take more than one parameter and also adds constant
folding support for min, max and clamp built-ins.
BUG=angleproject:913
TESTS=dEQP tests
(126 tests started passing with this change)
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.min_*
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.max_*
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.clamp_*
Change-Id: Iccc9bf503a536f2e3c144627e64572f2f95db9db
Reviewed-on: https://chromium-review.googlesource.com/271251
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
14e95b38
|
2015-05-07T10:10:41
|
|
translator: Reject shaders that use both FragColor+FragData.
*re-land with fix for unused var in release*
We checked this at link time in the D3D back-end, but this
restriction applies to all shaders.
TEST=dEQP-GLES2.functional.shaders.fragdata.*
BUG=angleproject:995
BUG=478572
Change-Id: I63258f4de47e658812822f31601cc235f48c0826
Reviewed-on: https://chromium-review.googlesource.com/271470
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
0ea959f4
|
2015-05-13T14:51:59
|
|
Unfold sequence operator when operations inside need unfolding
Unfolding the sequence operator ensures correct evaluation order when parts of
the expression need to get hoisted out of the expression to the surrounding
scope.
BUG=angleproject:1001
TEST=WebGL conformance tests
Change-Id: Ifd3093c9fb63d3e9842ebb4b9531b2f46875ad8a
Reviewed-on: https://chromium-review.googlesource.com/270660
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d81ed841
|
2015-05-12T12:46:35
|
|
Defer executing if statements in the global scope
Unfolding of short-circuiting operators (ternary and logical operators) may
create if statements in the global scope, which is not valid HLSL. Use existing
deferred global initialization function to defer execution of if statements in
the global scope.
TEST=WebGL conformance tests
BUG=angleproject:819
Change-Id: I2b0afcc6824dab6bb87eb6abed609e75b1384dab
Reviewed-on: https://chromium-review.googlesource.com/270461
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a6f22096
|
2015-05-08T18:31:10
|
|
Make UnfoldShortCircuit to change AST instead of writing output
This is needed to make way for further AST transformations to handle array
expressions that need to work correctly together with unfolding short-
circuiting operators. This also improves the maintainability of HLSL output
by isolating the unfolding into a separate compilation step.
The new version of UnfoldShortCircuit traverser will traverse the tree until
an expression that needs to be unfolded is encountered. It then unfolds it and
gets reset. The traverser will be run repeatedly until no more operations to
unfold are found. This helps with keeping the traverser's design relatively
simple.
All declarations are separated to single declarations before short-circuit
unfolding is run. Previously OutputHLSL already output every declaration
separately.
BUG=angleproject:960
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
Change-Id: Id769be396adbd4c0223e418980dc464dd855f019
Reviewed-on: https://chromium-review.googlesource.com/270460
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
531e3d22
|
2015-05-15T11:01:27
|
|
Revert "translator: Reject shaders that use both FragColor+FragData."
The change introduced a warning in Windows release build.
This reverts commit b8e3a568bbd16fca1099a1b54cd82a981cd88a8e.
Change-Id: I77bbc35876043c9a164aa2665965f5189ee90052
Reviewed-on: https://chromium-review.googlesource.com/271430
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
e8675195
|
2015-05-14T15:31:36
|
|
Fix "unused private variable" warning in ParseContext
BUG=angleproject:892
Change-Id: I3d0c23f1c2d43477c8b4ff28a6db470b3491de0b
Reviewed-on: https://chromium-review.googlesource.com/271276
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
b8e3a568
|
2015-05-07T10:10:41
|
|
translator: Reject shaders that use both FragColor+FragData.
We checked this at link time in the D3D back-end, but this
restriction applies to all shaders.
TEST=dEQP-GLES2.functional.shaders.fragdata.*
BUG=angleproject:995
BUG=478572
Change-Id: I99111cc6aa05b9352693f9c3b5bc70d56c9842d4
Reviewed-on: https://chromium-review.googlesource.com/269846
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6e06b1f4
|
2015-05-14T10:01:17
|
|
Make TParseContext a class, with private data.
*re-land with build fix*
BUG=angleproject:995
Change-Id: I67d3ded8f6c705b54fb372857e07ce1a86b58475
Reviewed-on: https://chromium-review.googlesource.com/271162
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
749fe340
|
2015-05-13T21:07:55
|
|
Revert "Make TParseContext a class, with private data."
Causing build errors on Linux:
FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj.rsp /c ..\..\third_party\angle\src\compiler\translator\ParseContext.cpp /Foobj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj /Fdobj\third_party\angle\src\translator_lib.cc.pdb
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : error C2220: warning treated as error - no 'object' file generated
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : warning C4099: 'TParseContext' : type name first seen using 'class' now seen using 'struct'
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\parsecontext.h(28) : see declaration of 'TParseContext'
BUG=angleproject:995
This reverts commit 6c0c2987fba9dcf2a8d432534c9548092281bfa4.
Change-Id: I49a8b7df9bc8b7c4892bf3af5e2c7a6444fba890
Reviewed-on: https://chromium-review.googlesource.com/270767
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6c0c2987
|
2015-05-13T13:50:04
|
|
Make TParseContext a class, with private data.
BUG=angleproject:995
Change-Id: Ie077e3a4f0fd5ef840aa35edeb41d15a98b7c0ff
Reviewed-on: https://chromium-review.googlesource.com/270628
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
06145236
|
2015-05-13T13:10:01
|
|
Refactor style in ParseContext.h.
BUG=angleproject:995
Change-Id: I893785a068d0d5cf4afc18123896bf540e53a3e0
Reviewed-on: https://chromium-review.googlesource.com/270627
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
95d34aaf
|
2015-05-13T19:44:31
|
|
Revert "Add constant folding support for min,max and clamp"
This reverts commit 1137a2a6b4a68fe3f7497bb9289975b030576372.
Change-Id: I1493c2706e5f08a9f0001835e663a147be85a303
Reviewed-on: https://chromium-review.googlesource.com/270782
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b0c645e2
|
2015-05-12T14:25:36
|
|
Validate global initializer qualifiers
Allow only constants, other globals, temporaries, and uniforms to be used
in global variable initialization for now. The spec limits global
variable initialization further to only constant expressions, but fully
implementing this has a too large compatibility cost for ESSL 1.00, so
implement it only partially. In the case of ESSL 3.00 we can use stricter
validation, since there's no legacy to worry about.
Resubmitting the change, since the previous version neglected to remove
incorrect GLSL tests.
TEST=angle_unittests, WebGL conformance tests, angle_end2end_tests
BUG=angleproject:988
Change-Id: I1bb3b8dc305689a90eadfe8cc7705e5ac3829e03
Reviewed-on: https://chromium-review.googlesource.com/270651
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b6a52bb4
|
2015-05-13T12:41:24
|
|
Revert "Validate global initializer qualifiers"
Seems to be failing angle_end2end_tests:
GLSLTest.GlobalStaticAndVarying_0
GLSLTest.GlobalStaticAndVarying_1
GLSLTest_ES3.GlobalStaticAndInstanceID_0
http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15598
BUG=angleproject:988
This reverts commit 6caa5e815f7e3c11e4452ed5e60446b9943db183.
Change-Id: I394b571c9b4ee739721018c5287a45df49e1471c
Reviewed-on: https://chromium-review.googlesource.com/270589
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6caa5e81
|
2015-05-12T14:25:36
|
|
Validate global initializer qualifiers
Allow only constants, other globals, temporaries, and uniforms to be used
in global variable initialization for now. The spec limits global
variable initialization further to only constant expressions, but fully
implementing this has a too large compatibility cost for ESSL 1.00, so
implement it only partially. In the case of ESSL 3.00 we can use stricter
validation, since there's no legacy to worry about.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:988
Change-Id: I6a66f6a31130b44717dd2bef3082a0fc395a60b6
Reviewed-on: https://chromium-review.googlesource.com/270430
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
1137a2a6
|
2015-05-05T13:33:30
|
|
Add constant folding support for min,max and clamp
This change adds necessary mechanism to support constant folding of
built-ins that take more than one parameter and also adds constant
folding support for min, max and clamp built-ins.
BUG=angleproject:913
TESTS=dEQP tests
(126 tests started passing with this change)
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.min_*
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.max_*
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.clamp_*
Change-Id: I5d3e96ef2062116cbf164a7a42cba096bd4d5389
Reviewed-on: https://chromium-review.googlesource.com/269317
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
4f3b8f63
|
2015-05-11T16:56:21
|
|
Add missing EvqPointCoord to getQualifierString
Also sort enums in getQualifierString in the same order as in the enum
definition.
BUG=angleproject:999
TEST=WebGL conformance tests with --gl-shader-interm-output
Change-Id: I31aa2e4b2405a090f560bf4140d9ee66271e526c
Reviewed-on: https://chromium-review.googlesource.com/269941
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
37ad4744
|
2015-04-27T13:18:50
|
|
Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. A shading language version dependent varying
matching check is added to the translator API to facilitate this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
A previous revision of this change that broke API compatibility was
reverted since it broke Chromium FYI bots. This revision keeps deprecated
API functionality around for now so that changes can be rolled
step-by-step to Chromium without breakage.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: Iecb64e3afd23e267ba999bc17f44390affcdfc13
Reviewed-on: https://chromium-review.googlesource.com/269940
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
9e64edce
|
2015-05-07T14:08:06
|
|
Revert "Add support for parsing ESSL3 invariant qualifiers"
Build breaks in GPU FYI bots.
BUG=angleproject:987
This reverts commit 4008879357159c7850cf105f2ae842bc68dd3c18.
Change-Id: Ia88ad302c403c65516c050eb7741316b5097bcfb
Reviewed-on: https://chromium-review.googlesource.com/269847
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
40088793
|
2015-04-27T13:18:50
|
|
Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. The varying matching check in the translator
API is changed to be shading language version dependent to facilitate
this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: I3982feff7380c4dfc647940ee03a020692dd0c59
Reviewed-on: https://chromium-review.googlesource.com/267663
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
06e24a7e
|
2015-04-27T14:48:59
|
|
Track if a non-preprocessor token has been seen and validate #extension with it.
Reland: Only report a warning instead of an error.
BUG=angleproject:989
BUG=483252
Change-Id: Ife3e7759cdef6bc0f41cae3c58c307682b608279
Reviewed-on: https://chromium-review.googlesource.com/269404
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
4b6bfe10
|
2015-05-05T20:10:20
|
|
Revert "Track if a non-preprocessor token has been seen and validate #extension with it."
Causing failures in the GLES2 CTS "build", related to extensions.
BUG=483252
BUG=angleproject:989
This reverts commit bbdb9e2259c38454be097ce01505db83db3ad7a8.
Change-Id: I3e1ad989af645194c8ee9b9847b2131e289d09e1
Reviewed-on: https://chromium-review.googlesource.com/269403
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
bbdb9e22
|
2015-04-27T14:48:59
|
|
Track if a non-preprocessor token has been seen and validate #extension with it.
Reland: Only report a warning instead of an error.
BUG=angleproject:989
BUG=483252
Change-Id: Ibf9adbf423cd9dee20ec45b8d2ea42bcfd9311be
Reviewed-on: https://chromium-review.googlesource.com/269205
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
214c2d8e
|
2015-04-27T14:49:13
|
|
Separate invariance from qualifiers
ESSL3 makes it possible to combine invariant with several more different
qualifiers. To avoid combinatorial explosion of the qualifier enum, track
invariance with a separate boolean.
TEST=WebGL conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: I0c6629e5ca2ded06db9ac9e5bab2fb6480299a5a
Reviewed-on: https://chromium-review.googlesource.com/267662
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
bab4c08f
|
2015-04-24T16:38:49
|
|
Require size for empty array declarations
Passing dEQP tests requires this check, which seems to be a valid interpretation
of ESSL3 spec section 4.1.9.
BUG=angleproject:941
TEST=dEQP-GLES3.functional.shaders.arrays.invalid.*
Change-Id: Iae88e6bb8e4ec784a2f1c8a94554e1e5c5e3ee85
Reviewed-on: https://chromium-review.googlesource.com/267430
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b11e2483
|
2015-05-04T14:21:22
|
|
translator: Fix validation sometimes modifying builtins.
When validating some shaders with out-of-bounds array indexes,
we would write the sanitized index into the global symbol table.
We would then overwrite a wrong value for the builtin. This
fixes the WebGL test extensions/webgl-draw-buffers-max-draw-buffers.
Also mark const on as many uses ConstantUnion as we can.
BUG=angleproject:993
Change-Id: I110efaf1b7b0158b08b704277e3bc2472437902c
Reviewed-on: https://chromium-review.googlesource.com/268962
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
6ba6eadc
|
2015-05-04T14:21:21
|
|
Rename ConstantUnion to TConstantUnion.
This clarified that we're using the Pool allocator/deallocator for
this type.
BUG=angleproject:993
Change-Id: If8c95f6054d07291e7014be0d4e35766ba2e943b
Reviewed-on: https://chromium-review.googlesource.com/269131
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
a897542f
|
2015-05-01T11:09:12
|
|
vs2015: disable warning in generated code, fix another
Macro redefinition is for INT8_MIN, etc. which are generated by flex.
VS doesn't define __STDC_VERSION__ as >= C99 because it's still only
partial support in VS2015.
Fix a float->int conversion narrowing warning.
Change-Id: I5232eb23426eaf584218137c068e14d74119a1ef
Reviewed-on: https://chromium-review.googlesource.com/268821
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Scott Graham <scottmg@chromium.org>
|
|
55def583
|
2015-05-04T11:24:57
|
|
translator: Fix variable collection for gl_DepthRange.
*re-land with Linux fixes, and fix for locations*
This built-in uniform wasn't being collected in VariableInfo.cpp.
Also remove the existing workaround for D3D gl_DepthRange
collection.
BUG=angleproject:991
BUG=478570
Change-Id: Iba84651bfc58f82fd4ce039421874f561f83c348
Reviewed-on: https://chromium-review.googlesource.com/268840
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
26e1a466
|
2015-05-01T19:19:19
|
|
Revert "translator: Fix variable collection for gl_DepthRange."
Build errors on Linux:
error: comparison of integers of different signs: 'const int' and 'const unsigned int'
BUG=angleproject:991
BUG=478570
This reverts commit f1ae954b660cb058c40665b623f4d689b65180d4.
Change-Id: I217aba1b32dc0e70d6153337a1f0ccef0483a0e1
Reviewed-on: https://chromium-review.googlesource.com/268792
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
f1ae954b
|
2015-05-01T13:33:57
|
|
translator: Fix variable collection for gl_DepthRange.
This built-in uniform wasn't being collected in VariableInfo.cpp.
Also remove the existing workaround for D3D gl_DepthRange
collection.
BUG=angleproject:991
BUG=478570
Change-Id: Ie254132e37c307323ba9e6e1705d138eea67b520
Reviewed-on: https://chromium-review.googlesource.com/268524
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
4c8cae60
|
2015-05-01T16:46:16
|
|
Revert "Don't mark all macros with double underscores as reserved."
Fails a WebGL CTS test.
BUG=angleproject:989
This reverts commit 942e36254a1e3537371c39f3f23d1ce12f4c87e8.
Change-Id: I9f833366d5b69535ef74e358ac21efaccb1f1a3d
Reviewed-on: https://chromium-review.googlesource.com/268751
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
942e3625
|
2015-04-30T11:00:01
|
|
Don't mark all macros with double underscores as reserved.
Only __FILE__, __LINE__, __VERSION__ and GL_ES are reserved but it is
still not recommended to use a name with double underscores because it may
be used by the "underlying software layers".
Updated the tests to reflect that it is OK to define macros with double
underscores but it is not valid to make assumptions about their values.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.basic.identifier_with_double_underscore_vertex
dEQP-GLES2.functional.shaders.preprocessor.basic.identifier_with_double_underscore_fragment
BUG=angleproject:898
Change-Id: I77054d04c9935eedcdbb7304dc0c3b60b53994f9
Reviewed-on: https://chromium-review.googlesource.com/268434
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
2dc8bf8b
|
2015-04-30T15:56:52
|
|
translator: Fix C++11-deprecated register usage.
Define 'register' as an empty string if we're in a modern version
of C++.
BUG=255186
BUG=angleproject:463
Change-Id: Ied044fb87a9b05c91cb419c54295c39f0f0ab776
Reviewed-on: https://chromium-review.googlesource.com/268512
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b96687df
|
2015-04-30T15:56:51
|
|
translator: Regenerate with Bison 3.0.4.
BUG=angleproject:463
Change-Id: If89a29de8fb006e8e3b0483ac5df21c8833ce974
Reviewed-on: https://chromium-review.googlesource.com/268511
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9624e058
|
2015-05-01T14:04:24
|
|
Revert "Track if a non-preprocessor token has been seen and validate #extension with it."
Breaks some WebGL applications, holding off until a decision is made.
BUG=483252
BUG=angleproject:989
This reverts commit fa55bf1ed6a26341c57f45b3a3da8feda0b6c18d.
Change-Id: Iebef439095a95741c8502716a4ce90c4785561eb
Reviewed-on: https://chromium-review.googlesource.com/268742
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
2e295e23
|
2015-04-29T10:41:33
|
|
hlsl: Fix struct specifiers in uniforms.
We would miss the definition for structs specfied in uniforms. Fix
this by always checking to add the constructor. Fixes the WebGL
test 'glsl/misc/struct-specifiers-in-uniforms'.
BUG=angleproject:818
BUG=433412
Change-Id: I411e4a4477f7ef34fceb9faa77489f77d8efdce8
Reviewed-on: https://chromium-review.googlesource.com/267797
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
a1884f2b
|
2015-04-29T10:15:16
|
|
Fixes for the tagging of discontinuous loops
The first fix was for all loops being considered discontinuous in
OutputHLSL because of a typo that produced a tautology.
The error was not detected by the unit tests because as an optimization we
do not generate Lod0 calls when they are not needed for the callee
function (which was correctly detected by the analysis in this case).
Fixed the unit tests by adding a call to a builtin gradient operation.
The second fix was for discard not being taken into account in the
analyses of the AST, which caused a WebGL test regression after the first
fix for conformance/glsl/bugs/conditional-discard-in-loop
BUG=angleproject:982
Change-Id: I1315eac1ad36f726be52d7fda5facf3104341b1f
Reviewed-on: https://chromium-review.googlesource.com/267814
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
fa55bf1e
|
2015-04-27T14:48:59
|
|
Track if a non-preprocessor token has been seen and validate #extension with it.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.extensions.after_non_preprocessing_tokens_vertex
dEQP-GLES2.functional.shaders.preprocessor.extensions.after_non_preprocessing_tokens_fragment
BUG=angleproject:989
Change-Id: Ie0aba80b2fde0160e83fc95f545b62954af2e5fc
Reviewed-on: https://chromium-review.googlesource.com/267398
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
26be18da
|
2015-04-27T14:05:57
|
|
Validate that all preprocessor function arguments are unique.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.invalid_function_definitions.unique_param_name_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_function_definitions.unique_param_name_fragment
BUG=angleproject:989
Change-Id: I32198f1c9036c371b46e7ad2986a44e42fd38e20
Reviewed-on: https://chromium-review.googlesource.com/267396
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
95a423d0
|
2015-04-28T11:09:45
|
|
Unexpected tokens after conditionals should be an error instead of a warning.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_if_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_if_fragment
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_else_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_else_fragment
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_endif_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_endif_fragment
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifdef_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifdef_fragment
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifndef_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifndef_fragment
BUG=angleproject:989
Change-Id: I6511f7082c98206fb623775d81329b6bc7673c1a
Reviewed-on: https://chromium-review.googlesource.com/267638
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
d3c29f57
|
2015-04-28T11:23:02
|
|
Add pragma errors for malformed pragmas.
Instead of always warning on invalid pragmas, only warn when the pragma
type is not recognized and error when the syntax is invalid.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_vertex
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_fragment
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_vertex
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_fragment
BUG=angleproject:989
Change-Id: Ibd584dc08a2436e163dfc52eeffdf2dac8a22cb8
Reviewed-on: https://chromium-review.googlesource.com/267639
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b819d25d
|
2015-04-27T14:16:34
|
|
Validate that there are no tokens following #undef on the same line.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.definitions.undefine_object_invalid_syntax_vertex
dEQP-GLES2.functional.shaders.preprocessor.definitions.undefine_object_invalid_syntax_fragment
dEQP-GLES2.functional.shaders.preprocessor.invalid_definitions.undef_non_identifier_2_vertex
dEQP-GLES2.functional.shaders.preprocessor.invalid_definitions.undef_non_identifier_2_fragment
BUG=angleproject:989
Change-Id: I279a38aaae8010017ef6e3f1aa139ae03f374680
Reviewed-on: https://chromium-review.googlesource.com/267397
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
ad0d0799
|
2015-04-08T14:25:06
|
|
Expand ShShaderOutput for different GLSL versions
BUG=angleproject:968
Change-Id: I2d4c0a8e9a91a940922da4501c22124da0c0399c
Reviewed-on: https://chromium-review.googlesource.com/264840
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
d57e0db3
|
2015-04-24T15:05:08
|
|
Remove separate compilerdebug.h in favor of debug.h
This unifies the behavior across the compiler and rest of ANGLE - for
example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED
asserts in both the compiler and the rest of ANGLE. Compiler traces from
asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of
being directed through ParseContext.
The compiler build already includes the common sources, so no changes to
build config are needed.
The original version of this change was reverted due to release mode
build issues. This version adds UNUSED_ASSERTION_VARIABLE where needed.
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES3.functional.shaders.*
BUG=angleproject:983
Change-Id: I36929020a04251b8bc834fbb3c069e10128c3082
Reviewed-on: https://chromium-review.googlesource.com/267411
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a656490d
|
2015-04-27T14:30:32
|
|
Revert "Remove separate compilerdebug.h in favor of debug.h"
Causing compile warnings in Release:
1>compiler\translator\CallDAG.cpp(238): error C2220: warning treated as error - no 'object' file generated
1>compiler\translator\CallDAG.cpp(238): warning C4189: 'op' : local variable is initialized but not referenced
1>compiler\translator\IntermNode.cpp(1495): error C2220: warning treated as error - no 'object' file generated
1>compiler\translator\IntermNode.cpp(1495): warning C4189: 'replaced' : local variable is initialized but not referenced
1>compiler\translator\IntermNode.cpp(1517): warning C4189: 'replaced' : local variable is initialized but not referenced
This reverts commit 5271025865b34685da71d0309131c5aff2e32f71.
Change-Id: Icdf1c37eef22a13d083767609ab0b0285d3dc517
Reviewed-on: https://chromium-review.googlesource.com/267359
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
52710258
|
2015-04-24T15:05:08
|
|
Remove separate compilerdebug.h in favor of debug.h
This unifies the behavior across the compiler and rest of ANGLE - for
example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED
asserts in both the compiler and the rest of ANGLE. Compiler traces from
asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of
being directed through ParseContext.
The compiler build already includes the common sources, so no changes to
build config are needed.
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES3.functional.shaders.*
BUG=angleproject:983
Change-Id: Ifca4d16f667b1e5cf9c2e7cc4139940091917a1c
Reviewed-on: https://chromium-review.googlesource.com/266993
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
2cb7b835
|
2015-04-23T20:27:44
|
|
Clean up binary operation constant folding code
Fix mixed up comments, remove unnecessary type conversions, clarify
variable names and improve formatting in a few places.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:913
Change-Id: Ice8fe3682d8e97f42747752302a1fba116132df4
Reviewed-on: https://chromium-review.googlesource.com/266843
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
a8c414ba
|
2015-04-16T15:51:03
|
|
Add basic support for arrays as return values in HLSL output
In HLSL output, user-defined functions that have an array as their return value
get changed so that they have the array as an out parameter instead.
Still missing: support for calling a function that has array as a return value
without assigning the array. Also support for assignments inside complex
expressions.
TEST=dEQP-GLES3.functional.shaders.arrays.return.*
BUG=angleproject:941
Change-Id: I79f5170139116a3dcfb2be2df5f0f79a3d955ca8
Reviewed-on: https://chromium-review.googlesource.com/266003
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
c6833115
|
2015-04-22T15:15:54
|
|
Prune empty declarations from the AST
Empty declarations in ESSL shaders currently result in errors on several
platforms. Prune empty declarations that are not struct or interface block
declarations from the AST.
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
BUG=angleproject:980
Change-Id: I9e3abf8134e6dfed0253cc83f69ce0ee92b0e0e7
Reviewed-on: https://chromium-review.googlesource.com/266841
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
39282e1f
|
2015-04-23T15:41:48
|
|
Disallow length being called on expressions with side effects
ESSL 3.00 definition of expressions does not include calling length on
anything other than array names, so enforce this restriction in the
parser.
TEST=WebGL 2 conformance tests
BUG=angleproject:972
Change-Id: I893d3c468ff21cb419b3239738f2a41834298cf2
Reviewed-on: https://chromium-review.googlesource.com/266992
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
96e67388
|
2015-04-23T14:27:02
|
|
Fix array.length() to return a signed integer
array.length() should return a signed integer as specified in ESSL 3.00
section 4.1.9, not unsigned. Fix this and add a simple unit test - the
dEQP tests included in WebGL conformance are built in a way that they
don't catch the issue.
TEST=angle_unittests
BUG=angleproject:972
Change-Id: I1389f51751a6a25c1681f57ac3d2d52f31ecc8fb
Reviewed-on: https://chromium-review.googlesource.com/266991
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
8fee0ab8
|
2015-04-23T14:52:46
|
|
Fix build regression on Linux
Chromium's Linux toolchain doesn't implement the return value of
std::vector::insert correctly, causing a build failure. Remove an
unnecessary assignment of the return value to fix this build regression.
The regression was caused by the commit:
"Put each array declarator into a separate declaration in HLSL output"
TEST=angle_unittests
Change-Id: I2959122d28e4c7e6d6a4d842a97a8f1fd4f27ca1
Reviewed-on: https://chromium-review.googlesource.com/266990
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
78174db7
|
2015-04-21T16:14:00
|
|
Replace EvqInternal with a separate flag to make it more flexible
The internal flag disables decorating a given symbol in output, effectively
placing it to a different namespace than user-defined symbols. This enables the
compiler to insert symbols to the tree when transforming it to be suitable for
HLSL output without running into name conflicts. In this patch the flag is
separated from the qualifiers since sometimes different qualifiers need to be
used with these internal symbols.
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
BUG=angleproject:941
Change-Id: I7036bed98fdb1478a383bb959ca03b42c3cb8100
Reviewed-on: https://chromium-review.googlesource.com/266690
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
822fa84e
|
2015-04-16T14:26:10
|
|
Support array initialization in HLSL output
Do this by separating each array initialization into a declaration and an
assignment. Array assignment is already supported in HLSL output by replacing
it with a function call.
The functionality is tested by the struct array constructor tests in dEQP.
BUG=angleproject:941
TEST=dEQP-GLES3.functional.shaders.arrays.constructor.*
Change-Id: Ida84fc343b767bea8b2d04e91c60cb8197d39039
Reviewed-on: https://chromium-review.googlesource.com/266002
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
fc0e2bc0
|
2015-04-16T13:39:56
|
|
Put each array declarator into a separate declaration in HLSL output
Since HLSL doesn't support arrays as l-values, HLSL output needs to split
declarators that initialize arrays to variable declaration and assignment
implemented via a function call. To prepare for this, it is necessary that each
declarator has its own declaration.
BUG=angleproject:941
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: I43dee487578561c01dbde90c2f55a93dda2f057a
Reviewed-on: https://chromium-review.googlesource.com/266001
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
28eb65e3
|
2015-04-06T17:29:48
|
|
Support constant folding of exponential built-ins
This change adds constant folding support for unary exponential
built-ins - exp, log, exp2, log2, sqrt and inversesqrt.
BUG=angleproject:913
TEST= dEQP tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.exponential*
(48 out of 56 tests started passing with this change)
Change-Id: I4b98782c4c4b72dd7d60dfc4f18ba6961526ec41
Reviewed-on: https://chromium-review.googlesource.com/266797
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
fddc211a
|
2015-04-22T13:28:10
|
|
Revert "Revert "Use nullptr consistently in TIntermConstantUnion::fold""
Revert of revert as the new changes that use nullptr in fold function
are already in.
This reverts commit b775778a050739c4d802da8db7edb8c865602950.
Change-Id: Ifbdb35264132c66e5d1f2379932839b99291c54a
Reviewed-on: https://chromium-review.googlesource.com/266803
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
97dc22e0
|
2015-04-06T17:35:38
|
|
Support constant folding of common built-ins
This change adds constant folding support for unary common built-ins:
abs, sign, floor, trunc, round, roundEven, ceil and fract.
BUG=angleproject:913
TEST= dEQP tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common*
(80 out of 210 tests started passing with this change)
Change-Id: I46312fec43084601d4fca8195ddaaa5292f1c02a
Reviewed-on: https://chromium-review.googlesource.com/265967
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|