Граф коммитов

4068 Коммитов

Автор SHA1 Сообщение Дата
Geoff Lang def624bc0b Move maxSamples from Extensions to Caps because it is an ES3 limit.
BUG=angleproject:886

Change-Id: Ibcfc2f06e8308e2e6eb1a6c38206b803f689d7af
Reviewed-on: https://chromium-review.googlesource.com/265470
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-14 19:34:32 +00:00
Geoff Lang a836e8830b Don't set a null current WGL context in the Surface destructor.
By setting a null current context, there is a brief window where all GL
calls will fail.  Since there is only one WGL context, just leave in on
the unreferenced window until a new window is made current.

BUG=angleproject:890

Change-Id: I51eadf23ca61e274f7d174ac5a9e0592bcdadebc
Reviewed-on: https://chromium-review.googlesource.com/265483
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-14 19:28:55 +00:00
Jamie Madill b1eee7afaf D3D11: Only use share handles with HW driver.
WARP does not support surface sharing like native D3D11. This,
combined with a Chromium-side change, should fix WARP rendering
in Chrome.

BUG=angleproject:973
BUG=429792

Change-Id: I41e778625e8697e45657843f2f337bcffe7ddbe2
Reviewed-on: https://chromium-review.googlesource.com/265611
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 19:00:46 +00:00
Jamie Madill 31906ecf14 Generate blit shaders on demand.
This saves a ms or two on D3D11 startup.

Change-Id: I156c25029a0b2aeb48e5b76b31737c155111e07f
Reviewed-on: https://chromium-review.googlesource.com/264936
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 18:57:55 +00:00
Jamie Madill c9d13d2d4f Add trace events for D3D11 initialization.
This helps a local user profile their D3D11 startup time.

BUG=436191
BUG=angleproject:966

Change-Id: Ib1b3d62194233cd502980d87c316a95e9bd3a04c
Reviewed-on: https://chromium-review.googlesource.com/264935
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 18:57:26 +00:00
Jamie Madill d8b36d45c8 Remove SetTraceFunctionPointers and update APIs.
Now that Chromium is switched to ANGLE's new Platform tracing
methods, we can junk the old APIs.

BUG=angleproject:966
BUG=436191

Change-Id: Ie2564eed9e5ce4604e0dcd4582618e7467b2d590
Reviewed-on: https://chromium-review.googlesource.com/264934
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2015-04-14 18:51:12 +00:00
Cooper Partin 97d61eb51c Add extension EGL_ANGLE_device_d3d
Access to the D3D device is needed for some advanced scenarios.
New entry points eglQueryDisplayAttribANGLE and
eglQueryDeviceAttribANGLE have been added in this change
to implement this extension.

BUG=angleproject:935

Change-Id: Ie39e86a2b6c6d8d05a08964b2907fb9fba5dec13
Reviewed-on: https://chromium-review.googlesource.com/265591
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 17:37:48 +00:00
Jamie Madill bc7093399c Revert "Support constant folding of trigonometry built-ins"
Part of a chain causing compile errors on Mac. Example:

../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'?

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747

This reverts commit 1767e6b4f9.

Change-Id: Ie39b1bf9a08da61aa0b16e219b34d1ba0b6f6c0f
Reviewed-on: https://chromium-review.googlesource.com/265587
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 15:32:43 +00:00
Jamie Madill 3c772f3623 Revert "Support constant folding of exponential built-ins"
Part of a chain causing compile errors on Mac. Example:

../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'?

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747

This reverts commit 62e2c8d2bc.

Change-Id: Id20f7f4efbc3df7756161b192d4858caeeb0572f
Reviewed-on: https://chromium-review.googlesource.com/265627
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 15:32:04 +00:00
Jamie Madill d1e9a0f488 Revert "Support constant folding of common built-ins"
Part of a chain causing compile errors on Mac. Example:

../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'?

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747

This reverts commit 2b1da6ed1d.

Change-Id: I5d48932a6254d6d1e78966bb3891913d9450e08e
Reviewed-on: https://chromium-review.googlesource.com/265612
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 15:31:24 +00:00
Jamie Madill b775778a05 Revert "Use nullptr consistently in TIntermConstantUnion::fold"
Part of a chain causing compile errors on Mac. Example:

../../third_party/angle/src/compiler/translator/IntermNode.cpp:1216:89: error: no member named 'sin' in namespace 'std'; did you mean 'sinf'?

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33747

This reverts commit 72ed20d4bb.

Change-Id: Ia6119f6081b3184deef3deef25b9e3f43ff2e2a6
Reviewed-on: https://chromium-review.googlesource.com/265586
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-14 15:29:58 +00:00
Geoff Lang 1ea8284d03 Revert "Add extension EGL_ANGLE_device_d3d"
Compile error on clang:
src/libANGLE/Display.cpp:259:23: error: allocation of incomplete type 'egl::Device'
        mDevice = new Device(this, impl);
                      ^~~~~~
src/libANGLE/Display.h:36:7: note: forward declaration of 'egl::Device'
class Device;
      ^
In file included from src/libANGLE/Display.cpp:11:
In file included from src/libANGLE/Display.h:17:
In file included from src/libANGLE/Error.h:80:
In file included from src/libANGLE/Error.inl:9:
src/common/angleutils.h:66:5: error: deleting pointer to incomplete type 'egl::Device' may cause undefined behavior [-Werror,-Wdelete-incomplete]
    delete resource;
    ^      ~~~~~~~~
src/libANGLE/Display.cpp:209:5: note: in instantiation of function template specialization 'SafeDelete<egl::Device>' requested here
    SafeDelete(mDevice);
    ^
src/libANGLE/Display.h:36:7: note: forward declaration of 'egl::Device'
class Device;
      ^
2 errors generated.

This reverts commit 6dacaff4e0.

Change-Id: Ide348e156324a5af668604362c0b249ea73b6083
Reviewed-on: https://chromium-review.googlesource.com/265626
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-14 15:29:23 +00:00
Cooper Partin 6dacaff4e0 Add extension EGL_ANGLE_device_d3d
Access to the D3D device is needed for some advanced scenarios.
New entry points eglQueryDisplayAttribANGLE and
eglQueryDeviceAttribANGLE have been added in this change
to implement this extension.

BUG=angleproject:935

Change-Id: Id1560b0887fa5882b9858af7bad9043ada67038d
Reviewed-on: https://chromium-review.googlesource.com/251610
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-04-14 14:30:39 +00:00
Arun Patole 72ed20d4bb Use nullptr consistently in TIntermConstantUnion::fold
Newly added code in TIntermConstantUnion::fold uses nullptr where as
remaining part of the function uses NULL. This change removes NULL and
consistently uses nullptr in complete function.

Change-Id: I600dcf11b686d8d72b2bcdac88b7158288c68105
Reviewed-on: https://chromium-review.googlesource.com/265395
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-14 09:10:34 +00:00
Arun Patole 2b1da6ed1d 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: I06800ed0e03764c0f7aab6bcd45c4f122de5a3c1
Reviewed-on: https://chromium-review.googlesource.com/265394
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-14 09:10:21 +00:00
Arun Patole 62e2c8d2bc 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: Ie7808cd57d6ed7598c642a9a0940b8f5bd293741
Reviewed-on: https://chromium-review.googlesource.com/265393
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-14 09:10:07 +00:00
Arun Patole 1767e6b4f9 Support constant folding of trigonometry built-ins
This change adds constant folding support for trigonometry built-in
functions. Constant folding for these functions also fixes constant
expression issues where constant initializer is a built-in trignometry
function whose arguments are all constant expressions.

BUG=angleproject:913
TEST= dEQP tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.angle_and_trigonometry*
(112 out of 120 tests pass with this change)

Change-Id: I66275b2ae9faecef63d76763d21a9b67d9bb68fa
Reviewed-on: https://chromium-review.googlesource.com/265392
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-14 09:09:47 +00:00
Jamie Madill 835be965a8 perf_tests: Only print final score result.
Don't print all the other measurements and values, since they'll
just add noise to the perf bot dashboards. Also increase the
run time of the DrawCallPerfTest to 10.0 seconds.

BUG=angleproject:744
BUG=468852

Change-Id: If076055ad46b4e6923f39687edcaa25930b188a7
Reviewed-on: https://chromium-review.googlesource.com/265464
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-04-13 19:40:18 +00:00
Geoff Lang 90d443e76c Delete Image.h.
Change-Id: I83135eabfe5c71f8b07338e2552d1ddd89f150c2
Reviewed-on: https://chromium-review.googlesource.com/265233
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-04-13 15:50:10 +00:00
Olli Etuaho 2935c581e6 Simplify code related to variable declaration
Rename nonInitErrorCheck to declareVariable to clarify that it declares
variables. Merge arrayErrorCheck with that so that logic that is common
between array and non-array declarations is only in one place. This
will simplify adding array initializer handling. This also enables
redeclaring gl_LastFragData using ESSL3 array type syntax.

Comments in executeInitializer claimed that the TVariable object was
needed for error recovery, but that was not actually true, so it can also
use the new declareVariable method. Make "variable" a local variable
instead of a parameter to executeInitializer, since the parameter was
never used by callers of the function.

TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:941

Change-Id: Ie133be62afc3e1f997370803cf21cada4e738935
Reviewed-on: https://chromium-review.googlesource.com/264674
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-04-13 07:55:17 +00:00
Geoff Lang 1c906c2e2b Skip Pbuffer tests depending on Pbuffer support.
BUG=angleproject:890

Change-Id: Ie10276453c35c65ffa0e26f8039db3ec3e65064e
Reviewed-on: https://chromium-review.googlesource.com/265187
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-10 15:42:45 +00:00
Jamie Madill b4a058bb6a Revert "Support constant folding of trigonometry built-ins"
Part of a chain breaking the clang build:

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588

This reverts commit af930db150.

Change-Id: Ic0bf09b4088a1ee285fed0fbd77dfc4c682fcd12
Reviewed-on: https://chromium-review.googlesource.com/265144
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-10 14:51:09 +00:00
Jamie Madill 50b7178d38 Revert "Support constant folding of exponential built-ins"
Part of a chain breaking the clang build:

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588

This reverts commit 1c89caef47.

Change-Id: I36e080d8f64d4d4ca5de04bebbd119db83956d0e
Reviewed-on: https://chromium-review.googlesource.com/265185
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-10 14:50:37 +00:00
Jamie Madill 3cf271fe45 Revert "Support constant folding of common built-ins"
Part of a chain breaking the clang build:

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588

This reverts commit 0273c68c50.

Change-Id: I00d7617a7c380f2a5ea3f38ec14948a598aa5c1a
Reviewed-on: https://chromium-review.googlesource.com/265184
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-10 14:49:59 +00:00
Jamie Madill 7c9e8c9631 Revert "Use nullptr consistently in TIntermConstantUnion::fold"
Part of a chain breaking the clang build:

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/33588

This reverts commit 5f2feee429.

Change-Id: I5ad54b05148ae2d4f19e50a67aded2bad4f55f91
Reviewed-on: https://chromium-review.googlesource.com/265143
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-10 14:48:58 +00:00
Geoff Lang b811e1a2c5 Add tests for FenceNV and FenceSync objects.
BUG=angleproject:888

Change-Id: Ic5eca4d88854f8127114d6b54666f32d5d6df9f2
Reviewed-on: https://chromium-review.googlesource.com/264588
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-10 14:34:54 +00:00
Olli Etuaho 3873cd0beb Fix issues with computing discontinuous loops
AST analysis to narrow down usage of [[loop]] and [[unroll]] failed to account
for break statements inside switch statements. Add switch statement handling.
This fixes asserts/crashes in dEQP tests.

BUG=angleproject:937
TEST=dEQP-GLES3.functional.shaders.switch.*

Change-Id: I04fdfe4733772a2a234934123bbfacf0376df562
Reviewed-on: https://chromium-review.googlesource.com/265191
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-04-10 14:01:41 +00:00
Arun Patole 5f2feee429 Use nullptr consistently in TIntermConstantUnion::fold
Newly added code in TIntermConstantUnion::fold uses nullptr where as
remaining part of the function uses NULL. This change removes NULL and
consistently uses nullptr in complete function.

Change-Id: Ieaada3cf46bf3e16d3ef91b300c86537f778c33f
Reviewed-on: https://chromium-review.googlesource.com/264632
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-10 11:32:24 +00:00
Arun Patole 0273c68c50 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: I09f2f99b3108e0d2fb1919a0631e4317b6a28be3
Reviewed-on: https://chromium-review.googlesource.com/263709
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-10 11:16:58 +00:00
Arun Patole 1c89caef47 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: I22af56876d1b7ce305697bf9bf43ad9ec5d8a3a5
Reviewed-on: https://chromium-review.googlesource.com/263708
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-10 11:04:19 +00:00
Arun Patole af930db150 Support constant folding of trigonometry built-ins
This change adds constant folding support for trigonometry built-in
functions. Constant folding for these functions also fixes constant
expression issues where constant initializer is a built-in trignometry
function whose arguments are all constant expressions.

BUG=angleproject:913
TEST= dEQP tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.angle_and_trigonometry*
(112 out of 120 tests pass with this change)

Change-Id: I2ed4360532469fe0d70048d5f2300a8db6f9fcda
Reviewed-on: https://chromium-review.googlesource.com/263679
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-10 10:55:53 +00:00
Olli Etuaho 6ed7bbe848 Clean up arrayErrorCheck
Remove some unnecessary TPublicType/TType conversions from the code, and
clean up code style. voidErrorCheck is changed to take TBasicType so that
it can be used with both TType and TPublicType.

TEST=angle_unittests
BUG=angleproject:941

Change-Id: I6f6cbc0761a4fc971299bad48864309009c54e7f
Reviewed-on: https://chromium-review.googlesource.com/264673
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-10 09:03:14 +00:00
Olli Etuaho 43ce600c57 Fix a bunch of mistakes in MalformedShaderTest
A number of mistakes had slipped in to this test that made the
compilation of some shaders always fail regardless of the semantic checks
applied by the parser.

TEST=angle_unittests
BUG=angleproject:941

Change-Id: I9906792e2c7fe3805288255b855afb46840a77a7
Reviewed-on: https://chromium-review.googlesource.com/264811
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-04-10 08:16:43 +00:00
Corentin Wallez 4176cd64b7 Remove now unused DetectDiscontuinity.h/.cpp
BUG=angleproject:937
BUG=395048

Change-Id: Ie8e520267d594a595201cb7c2438a2202d9adf25
Reviewed-on: https://chromium-review.googlesource.com/263745
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-09 21:49:15 +00:00
Geoff Lang 029c78cd0e Ignore visual studio profiler and nsight files.
Change-Id: I01cb029300760341262fb27cafc32d4366d161c0
Reviewed-on: https://chromium-review.googlesource.com/265005
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-09 21:36:08 +00:00
Geoff Lang 0305320fe1 WGL Pbuffer implementation.
BUG:angleproject:890

Change-Id: Id6e04117ddf7bde3ffb0d9e4cef6db3d07039a54
Reviewed-on: https://chromium-review.googlesource.com/261410
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-09 21:35:46 +00:00
Corentin Wallez 1239ee94fb Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.

Adds unit tests for LOOP, FLATTEN and Lod0 generation.

The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
 * dev.miaumiau.cat/rayTracer "Skull Demo"
 * The turbulenz engine particle demo
 * Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
 * Google Maps Earth mode
 * Lots of Chrome Experiments
 * Lagoa
 * madebyevan.com/webgl-water
 * SketchFab
 * Unit Tests

BUG=angleproject:937
BUG=395048

Change-Id: I856de9025f10b79781929ec212dbffc2064a940e
Reviewed-on: https://chromium-review.googlesource.com/264791
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-09 21:01:35 +00:00
Minmin Gong 794e0009ef Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)
Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82
Reviewed-on: https://chromium-review.googlesource.com/265020
Tested-by: Minmin Gong <mgong@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-04-09 20:13:48 +00:00
Jamie Madill b3584fb490 Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)"
Causing a build failure on Mac/Clang:

./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens]
#else if defined(_MSC_VER)

http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136

This reverts commit 3b26e231d9.

Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7
Reviewed-on: https://chromium-review.googlesource.com/264983
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-09 17:35:08 +00:00
Geoff Lang 0ca42a5f2e Add tests of basic Pbuffer functionality.
BUG=angleproject:890

Change-Id: I8f82414d1875f80269bd9dd1f629e5b7903cb584
Reviewed-on: https://chromium-review.googlesource.com/264380
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-09 14:18:57 +00:00
Minmin Gong 3b26e231d9 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)
Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea
Reviewed-on: https://chromium-review.googlesource.com/264533
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-09 14:05:37 +00:00
Olli Etuaho 47fadcb975 Remove code related to redeclaration of arrays
It should not be possible to redeclare arrays. This seems to be another
thing left over from earlier erroneous code which allowed declaring
unsized arrays.

TEST=angle_unittests
BUG=angleproject:941

Change-Id: I711565230b35df077f268cec6fdeac6c4c03b4cd
Reviewed-on: https://chromium-review.googlesource.com/264672
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-09 09:00:05 +00:00
Olli Etuaho 3739d235f8 Make checking for array non-constness depend on input version
First, remove duplicate check for const qualifier on arrays. Only keep
the check inside arrayQualifierErrorCheck().

Second, ESSL3 will introduce array initializers and by extension constant
arrays, so it should allow const qualifier on arrays. These checks are
somewhat superfluous in ESSL1 as well, since the parser already checks
for missing initializers, but it's useful to keep the informative error
messages around.

Add a few tests to make sure that when the ESSL3 implementation
progresses, it still checks for missing initializers on constant arrays.

TEST=angle_unittests
BUG=angleproject:941

Change-Id: Id871c872c5b92e2a5bf81c00080ac23004916a75
Reviewed-on: https://chromium-review.googlesource.com/264671
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
2015-04-09 08:59:13 +00:00
Corentin Wallez 938f0029d4 Revert "Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]"
Caused linking failures on mac because the unit test asks for TranslatorHLSL which is not compiled.

This reverts commit 3342e01f2a.

Change-Id: I02b2f54ca5b90611f11b7a549e75bf2e8310639d
Reviewed-on: https://chromium-review.googlesource.com/264790
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-08 19:38:56 +00:00
Corentin Wallez 3342e01f2a Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.

Adds unit tests for LOOP, FLATTEN and Lod0 generation.

The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
 * dev.miaumiau.cat/rayTracer "Skull Demo"
 * The turbulenz engine particle demo
 * Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
 * Google Maps Earth mode
 * Lots of Chrome Experiments
 * Lagoa
 * madebyevan.com/webgl-water
 * SketchFab
 * Unit Tests

BUG=angleproject:937
BUG=395048

Change-Id: If7baddae1cdae0b3a414aa49e5a4c4babedbfe50
Reviewed-on: https://chromium-review.googlesource.com/261263
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-08 19:18:15 +00:00
Geoff Lang 1a0847caf9 Temporarily disable the RenderToMipmap on Intel OpenGL.
BUG=angleproject:905

Change-Id: If398b7f3cb60f3efdafce0f3709f965120977603
Reviewed-on: https://chromium-review.googlesource.com/264665
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-08 18:04:45 +00:00
Geoff Lang e42753b24b Implement GL_VENDOR and GL_RENDERER strings for RendererGL.
Change-Id: Ib83faa605fd1b992e19ddc2b72c7917d82245d32
Reviewed-on: https://chromium-review.googlesource.com/264664
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-04-08 18:04:35 +00:00
Corentin Wallez 5093145941 Implement discontinuous loops AST analysis
This will allow narrowing down which usages of
[[flatten]] and [[unroll]] are actually useful.

BUG=angleproject:937
BUG=395048

Change-Id: I091e647e3053d22edadd0cabb7c50bd5efa690b2
Reviewed-on: https://chromium-review.googlesource.com/263776
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-08 17:23:38 +00:00
Corentin Wallez f4eab3b961 Implement gradient operation AST analysis
This will allow narrowing down which usages of
[[flatten]] and [[unroll]] are actually useful.

BUG=angleproject:937
BUG=395048

Change-Id: Ib8d7b98431b8cd3563e1eff8ecc9ed5df1a9b7d6
Reviewed-on: https://chromium-review.googlesource.com/263775
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-08 17:22:38 +00:00
Corentin Wallez a094a8a981 Add a compiler option to prune unused function and prototypes
Also adds a simple unit test checking the pruning

BUG=angleproject:937
BUG=395048

Change-Id: I88440378f66178dcebebcd596f8f80235903f20e
Reviewed-on: https://chromium-review.googlesource.com/264568
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-04-08 16:48:45 +00:00