Commit Graph
179 Commits
Author SHA1 Message Date
Jacek Caban 464bfc8638 Use .def file to export functions using dllexport.
BUG=angleproject:1183

This is a reland of part of commit 5662732226.
The original commit caused warnings on 64-bit MSVC linker. This version
removes declspec(dllexport) from exported ANGLE APIs (for which we need
a new ANGLE_PLATFORM_EXPORT macro). It also makes those APIs stdcall on
Windows builds.

Change-Id: Iee2ab7e43ef0b98924f5759b5e1b333307052235
Reviewed-on: https://chromium-review.googlesource.com/304501
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-21 16:29:40 +00:00
Olli Etuaho a6996685a0 Automatically enable highp in fragment shaders on ESSL3
Most code using the translator already enables highp with the resources
flag when a shader spec that accepts ESSL3 is used, but for example the
shader_translator utility doesn't. This fix makes sure that highp is
always enabled when a fragment shader written in ESSL3 or newer is being
compiled. This will make shader_translator easier to use for testing
ESSL3 shaders.

BUG=541550
TEST=angle_unittests

Change-Id: Ia1911677c55f3c5d921829a8cbb808847ac8b636
Reviewed-on: https://chromium-review.googlesource.com/305190
Tryjob-Request: Olli Etuaho <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-10-14 07:36:53 +00:00
Jamie Madill e826b9f722 Revert "Fixed compilation on mingw."
This causes some linker warnings. I don't think we should
add linker warnings to Chrome, so reverting this temporarily until
we can land your CL with the correct using of export keywords.

Please re-submit the fixed CL.

This reverts commit 5662732226.

Change-Id: I21fa623af31fac06de6afbefa50c9ea1ec157c15
Reviewed-on: https://chromium-review.googlesource.com/305000
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-09 16:41:41 +00:00
Jacek Caban 5662732226 Fixed compilation on mingw.
Change-Id: I5734f789f25fbc6b9b90f2043459a3a5f72008c4
Reviewed-on: https://chromium-review.googlesource.com/303602
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-06 14:26:18 +00:00
Corentin Wallez d4b5054dc4 compiler: Rewrite do-while loops as while loops
This works around a Mac driver shader compiler bug that makes many
do-while loops cause GPU-hangs when ran.

BUG=angleproject:891

Change-Id: I29828d6ea9e887ad0ed0c577f1deb41fb632a900
Reviewed-on: https://chromium-review.googlesource.com/302465
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-09-30 20:49:42 +00:00
Geoff Lang ee48376c1f Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Re-land fixes double define from different style defines in libGLESv2.gypi
and other projects.

Re-land fixes missing defines in angle_util project in gn.

Change-Id: I1952413cd4390e6f5450df809f8f5867bf6f49e2
Reviewed-on: https://chromium-review.googlesource.com/299771
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-09-15 20:13:55 +00:00
Geoff Lang 0393310feb Revert "Update to the latest versions of the GL and EGL headers."
Issues with GN build.

This reverts commit 8284436798.

Change-Id: I99d186019135bbbe250e95c9567854108d31c556
Reviewed-on: https://chromium-review.googlesource.com/299870
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-09-15 17:07:24 +00:00
Geoff Lang 8284436798 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Re-land fixes double define from different style defines in libGLESv2.gypi and
other projects.

Change-Id: I6204dc767bd83b7aa7e4d6e2fa338b2ce7f304d8
Reviewed-on: https://chromium-review.googlesource.com/299401
Tested-by: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-09-11 20:25:50 +00:00
Geoff Lang e12150fe9c Revert "Update to the latest versions of the GL and EGL headers."
Linux compile failures to do gyp defines.

This reverts commit 8bbeabc179.

Change-Id: Icb31dd817414b3a9ab36e88cedab9c725af26b6b
Reviewed-on: https://chromium-review.googlesource.com/299173
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-09-11 20:06:38 +00:00
Geoff Lang 8bbeabc179 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Change-Id: Icaa444efa52f3b9d1497189da92bc364545a6e3a
Reviewed-on: https://chromium-review.googlesource.com/299172
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-09-11 19:33:49 +00:00
Jamie Madill 7aef6020a0 Revert "Update to the latest versions of the GL and EGL headers."
Broke the Clang compile.

In file included from ../../third_party/angle/include/GLSLANG/ShaderLang.h:28:
../../third_party/angle/include/KHR/khrplatform.h:282:30: error: no newline at end of file [-Werror,-Wnewline-eof]
#endif /* __khrplatform_h_ */

Several other similar errors.

BUG=None

This reverts commit aac2035d85.

Change-Id: I407e7e65bb6a46d1d941c54cdf14a14758e22d96
Reviewed-on: https://chromium-review.googlesource.com/298834
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-11 19:06:12 +00:00
Geoff Lang aac2035d85 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Change-Id: I8e9df6262dc1b2536a409c5791734e4a4d63b115
Reviewed-on: https://chromium-review.googlesource.com/299341
Tryjob-Request: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-09-11 18:35:35 +00:00
Corentin Wallez 86f8dd7c36 Implement a minimal EGL -> CGL backend
This succesfully renders HelloTriangle and some samples but fails on a
lot of tests. In particular it doesn't handle resizing the window and
doesn't have depth or stencil buffers.

BUG=angleproject:891

Change-Id: I16356471b470f764acb38e8dd3589e9c0129829d
Reviewed-on: https://chromium-review.googlesource.com/290770
Tested-by: Corentin Wallez <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-09-10 14:41:21 +00:00
Jamie Madill a0a9e12ded translator: Add sh::OutputVariable type.
This replaces the dual-use of sh::Attribute, which can be a bit
confusing to people expecting a literal output variable.

Currently not used in Chromium, so should be safe to land.

BUG=angleproject:1146

Change-Id: I436f2bc9dc4ddc3709369cb2baa344c6b13a21a2
Reviewed-on: https://chromium-review.googlesource.com/296683
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-02 21:04:35 +00:00
Kimmo Kinnunen b18609b9f5 Implement ES 2,3 parts of EXT_blend_func_extended for shader translation
Exposes gl_SecondaryFragColor, glSecondaryFragData[] and
gl_MaxDualSourceDrawBuffers to GLES SL 1.0.

Relaxes rules for undefined output locations for GLES SL 3.0
and exposes gl_MaxDualSourceDrawBuffers.

If the output GL context is GL ES 2.0 or 3.0:
The emulation layer is expected to turn on EXT_blend_func_extended
if the output GL context supports it.

If the output GL context is GL:
The emulation layer is expected to turn on EXT_blend_func_extended
if the output GL context supports ARB_blend_func_extended or if GL
context is 3.2 or later.

If the source shader spec is GLES SL 2.0: The emulation layer is
expected to inspect the shader compilation output variables upon
linking. If output target is GL SL, the emulation layer should bind
color location 0, index 1 to "angle_SecondaryFragColor" if variable
"gl_SecondaryFragColorEXT" is used. Alternatively, emulation layer
should bind "angle_SecondaryFragData" to locations 0,1,2,3,..., all
color index 1, if "gl_SecondaryFragData" array is used.
(The caller can not bind the locations or specify output variables.)

If the source shader spec is GLES SL 3.0:
The emulation layer is expected to do location auto-resolve of the
the output variables that have undefined output locations that have
not been bound by the caller.
(The caller can not use gl_ built-ins, so nothing to do with those.)

BUG=angleproject:1085
TEST=angle_unittest

Change-Id: I5cafe205b0c29478b0dcd24aa89a7b0000f5d046
Reviewed-on: https://chromium-review.googlesource.com/287580
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Kimmo Kinnunen <[email protected]>
2015-08-07 16:47:11 +00:00
Jeff Muizelaar d17c016bd4 Add support for RESOURCE_MISC_SHARED_KEYEDMUTEX
Change-Id: I225f38b4616ac47e690dccbcb67074fedc571d61
Reviewed-on: https://chromium-review.googlesource.com/225642
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-07-31 20:00:38 +00:00
Jamie Madill 2e5797e3cd Log EGL initialize errors to the platform.
This will allow us to show more extended error info in about:gpu
in Chromium.

BUG=angleproject:966
BUG=515229

Change-Id: I24c8f33ac3576395ff13dbf7f4664c649af18e33
Reviewed-on: https://chromium-review.googlesource.com/289590
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-07-31 19:33:27 +00:00
Austin Kinross da0564680b For WinRT, add EGLRenderSurfaceScaleProperty to specify swapchain scaling factor
Change-Id: Iede6682306082346cf2a3a55fe58f732b7a453df
Reviewed-on: https://chromium-review.googlesource.com/277931
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-07-07 13:59:05 +00:00
Geoff Lang 8273e006fe Add new GLSL target versions.
Test the emulated GLSL functions against multiple GL versions.

BUG=angleproject:1044

Change-Id: I1e12523301042f0d541ab2f4e73f02319d1584ef
Reviewed-on: https://chromium-review.googlesource.com/277702
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-29 17:29:24 +00:00
Michael Spang 6e56faae63 Add opaque definitions of EGL platform types for ozone chromium builds
These are copied from chromium's modified eglplatform.h. It is necessary
in order to build ANGLE for freon Chrome OS boards because X11 headers
aren't included in the SDK.

BUG=504501
TEST=cros chrome-sdk --board link
  gclient runhooks
  ninja -C out_link/Release chromium_builder_tests

Change-Id: I37c3cba280689ec8d8a13e8946b1401d4bba7ea8
Reviewed-on: https://chromium-review.googlesource.com/281992
Tested-by: Michael Spang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Michael Spang <[email protected]>
2015-06-25 20:44:35 +00:00
Dmitry Skiba 2539fffa36 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 <[email protected]>
Commit-Queue: Dmitry Skiba <[email protected]>
Tested-by: Dmitry Skiba <[email protected]>
Reviewed-by: Dmitry Skiba <[email protected]>
2015-06-17 18:51:47 +00:00
Olli Etuaho 5c407bb7c9 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 <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-06-02 10:40:42 +00:00
Jamie Madill 72537ef13e Add collection of D3D11 and DXGI stats.
Will require a chromium-side patch to enable boolean histograms.

BUG=angleproject:966
BUG=436191

Change-Id: I3026c73894fbbff521503b377955816a8e831df8
Reviewed-on: https://chromium-review.googlesource.com/271174
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-05-14 17:59:24 +00:00
Olli Etuaho 37ad4744bb 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 <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-05-07 14:34:41 +00:00
Jamie Madill 9e64edce11 Revert "Add support for parsing ESSL3 invariant qualifiers"
Build breaks in GPU FYI bots.

BUG=angleproject:987

This reverts commit 4008879357.

Change-Id: Ia88ad302c403c65516c050eb7741316b5097bcfb
Reviewed-on: https://chromium-review.googlesource.com/269847
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-05-07 14:08:23 +00:00
Olli Etuaho 4008879357 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 <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-05-07 13:37:22 +00:00
Jamie Madill 55def58323 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-05-04 17:21:28 +00:00
Jamie Madill 26e1a466df 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 f1ae954b66.

Change-Id: I217aba1b32dc0e70d6153337a1f0ccef0483a0e1
Reviewed-on: https://chromium-review.googlesource.com/268792
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-05-01 19:19:34 +00:00
Jamie Madill f1ae954b66 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 <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-05-01 18:43:52 +00:00
Qingqing Deng ad0d0799db Expand ShShaderOutput for different GLSL versions
BUG=angleproject:968

Change-Id: I2d4c0a8e9a91a940922da4501c22124da0c0399c
Reviewed-on: https://chromium-review.googlesource.com/264840
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-04-28 17:31:45 +00:00
Jamie Madill ad0a486b94 Add D3D11CreateDevice timing histogram.
This should give us a bound on how much we can improve startup
time in ANGLE on D3D11 across all users.

BUG=angleproject:944
BUG=436191

Change-Id: Ie9047c0424429aecec5f6d7be8e119ebcc53fbe3
Reviewed-on: https://chromium-review.googlesource.com/266524
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-04-20 20:57:09 +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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-04-14 17:37:48 +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 <[email protected]>
Tested-by: Geoff Lang <[email protected]>
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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-04-14 14:30:39 +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 <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-04-08 16:48:45 +00:00
Jamie Madill 78b3a8b921 Revert "Add a compiler option to prune unused function and prototypes"
Compile error on Mac:

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

This reverts commit e423d9ca6e.

Change-Id: Ie08d7f2bf86089a006f3177480aa7491a9405257
Reviewed-on: https://chromium-review.googlesource.com/264585
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-04-08 16:04:36 +00:00
Corentin Wallez e423d9ca6e 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: I49904c34d1a72949cdc579569967d99c736c7237
Reviewed-on: https://chromium-review.googlesource.com/264415
Reviewed-by: Kenneth Russell <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-04-08 15:18:03 +00:00
Jamie Madill ae2d8a3af2 Add Platform methods for event tracing.
Event tracing requires pulling in timing counters, so we can sync
with Chromium's timestamps. It may require a bit more tricky stuff
to sync ANGLE's GPU timestamps with trace timestamps, but should
allow us to add GPU trace events in the future.

BUG=chromium:436191
BUG=angleproject:966

Change-Id: Ie1dc2981650d96888f988fa74b6fa435fbe8edc2
Reviewed-on: https://chromium-review.googlesource.com/263781
Reviewed-by: Brandon Jones <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-04-07 19:19:46 +00:00
Jamie Madill 6bd5831261 Make Platform methods global.
This will allow them to be imported dynamically without name
mangling. This is necessary because sometimes SwiftShader
overrides libGLESv2 and libEGL, so we need to determine at
run-time if we are running with "actual" ANGLE.

BUG=466735

Change-Id: I396d717b79066feb8ed0d577ee7386b33eb1d160
Reviewed-on: https://chromium-review.googlesource.com/259954
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-03-17 19:12:36 +00:00
Cooper Partin 0110e17264 Update ANGLE_platform_angle_d3d to be able to disable automatic trim.
BUG=angleproject:946

Change-Id: I5652495842b057998318b1583f8e1a586eba39aa
Reviewed-on: https://chromium-review.googlesource.com/258940
Tested-by: Cooper Partin <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-03-17 15:34:38 +00:00
Zhenyao Mo 05b6b7fcdf Add an SH_GLSL_CORE_OUTPUT profile.
So we could generate shaders for Apple using core GL profile.

By switching to core profile, we still pass most WebGL conformance tests 1.0.2 on Linux, but not all, so apparently more work is needed.

However, I think it's OK to check this CL in because this output profile will be only used behind a chromium switch.

BUG=angleproject:933
TEST=webgl conformance tests

Change-Id: Iad70e1aebf82349d3fc5f4116c1d6bc4448193fd
Reviewed-on: https://chromium-review.googlesource.com/255282
Tested-by: Zhenyao Mo <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-03-03 19:39:36 +00:00
Jamie Madill e9cc469fd6 Accept mismatching auxiliary interpolations.
The ES3.1 spec, and discussion on Khronos.org, confirm that dEQP is
correct in accepting mismatching centroid specifiers in shader
linkage. Mismatching flat/smooth is still a link error.

Fixes:
shaders.linkage.varying.rules.differing_interpolation_2

Change-Id: I3016f4147e7c1b16b02371ee95866c8daf826212
Reviewed-on: https://chromium-review.googlesource.com/251205
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-02-26 15:56:38 +00:00
Daniel Bratell 73941deb4f Disable the HLSL code in Angle if it is not being used.
We're only using the HLSL code in Windows so
it's not necessary to compile and distribute it on other platforms.

This adds a defined ANGLE_ENABLE_HLSL that can be checked in files that
are used by non-HLSL code as well. Mostly the HLSL code is just not
include by the build system.

Details of the space savings (heavily truncated)

Total change: -165717 bytes
===========================
 -606 - Source: angle/src/common/utilities.cpp
 -627 - Source: angle/src/compiler/translator/FlagStd140Structs.cpp
 -695 - Source: /usr/include/c++/4.8/bits/stl_algo.h
 -710 - Source: angle/src/compiler/translator/TranslatorHLSL.cpp
 -713 - Source: angle/src/compiler/translator/IntermNode.h
 -863 - Source: /usr/include/c++/4.8/bits/stl_map.h
 -935 - Source: angle/src/compiler/translator/blocklayout.cpp
 -1515 - Source: angle/src/compiler/translator/BuiltInFunctionEmulator.cpp
 -1655 - Source: angle/src/compiler/translator/UnfoldShortCircuit.cpp
 -2375 - Source: /usr/include/c++/4.8/bits/vector.tcc
 -3135 - Source: angle/src/compiler/translator/RewriteElseBlocks.cpp
 -4656 - Source: angle/src/compiler/translator/UtilsHLSL.cpp
 -5265 - Source: angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
 -6505 - Source: /usr/include/c++/4.8/bits/stl_tree.h
 -11480 - Source: angle/src/compiler/translator/UniformHLSL.cpp
 -13580 - Source: angle/src/compiler/translator/StructureHLSL.cpp
 -18964 - Source: ??
    (constant strings and a few vtbls)
 -89332 - Source: angle/src/compiler/translator/OutputHLSL.cpp

Change-Id: I23ccc98abd0a21f847dd34f9482800b3ba679d56
Reviewed-on: https://chromium-review.googlesource.com/251528
Tested-by: bratell at Opera <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-02-25 16:27:01 +00:00
Geoff Lang 7825f6199c Update ANGLE_platform_angle_d3d to use a device type enum instead of WARP bool.
BUG=angle:490

Change-Id: I1555e7f09b23138753e52ddf720d088587f7cadb
Reviewed-on: https://chromium-review.googlesource.com/232104
Reviewed-by: Shannon Woods <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-02-23 18:10:47 +00:00
Jamie Madill 5feea56239 Add ANGLE platform implementation template.
The platform implementation allows the app layer to pass in an
object, on which ANGLE can call virtual methods. Our current
platform will handle trace events, for app profiling, and
histogram records for statistics. The platform approach gives
a much more robust approach than using entry points for every
piece of functionality, and is based on the interop with Blink.

The default platform implementation does a no-op on every call.
The destructor is also private, to ensure we do not call the
destructor of the passed-in class.

BUG=436191

Change-Id: I05641b89a48a9cff81ced059518fceb5aa6c883b
Reviewed-on: https://chromium-review.googlesource.com/248631
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-02-18 18:21:42 +00:00
Jamie Madill cae611655e Update egl.h from khronos source.
Our header was out-of-date with some EGL 1.5 Image-related stuff.
This fixes the new dEQP compile which relies on the entry points
being defined.

BUG=angle:901

Change-Id: Ic6ecf45c9e626e4b8e5f715f5301a9fbba295f3e
Reviewed-on: https://chromium-review.googlesource.com/244443
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-01-30 15:36:24 +00:00
Austin Kinross 2bdcbb9a37 Enable Windows Phone 8.1 project generation
Change-Id: Iab44f6d634bdcd01348aa49de28b96c3b6086df7
Reviewed-on: https://chromium-review.googlesource.com/241945
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Austin Kinross <[email protected]>
2015-01-23 21:07:27 +00:00
Jamie Madill 3b141a6c63 Add OSX cases to EGL headers.
These changes we'll have to upstream at a later time.

BUG=angle:773

Change-Id: I18feb84ae58cb16e3e555c9ab65b6925ba35048e
Reviewed-on: https://chromium-review.googlesource.com/238443
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-01-05 21:07:27 +00:00
Erik Dahlström ea7a21219b Add GLSL/ESSL validator/translator support for GL_EXT_shader_framebuffer_fetch.
BUG=angle:834

Change-Id: I2d4e25909a8e1266b9bb7f1d4421324143157c8a
Reviewed-on: https://chromium-review.googlesource.com/231032
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Erik Dahlström <[email protected]>
2014-12-03 16:32:39 +00:00
Olli Etuaho 853dc1abd3 Add mediump and lowp precision emulation support for GLSL output
This implements the rounding as specified in WEBGL_debug_shader_precision
extension proposal for desktop GLSL and ESSL output. The bulk of the new
functionality is added in the form of a new EmulatePrecision AST
traverser, which inserts calls to the rounding routines angle_frm and
angle_frl in the appropriate places, and writes the rounding routines
themselves to the shader.

Compound assignments which are subject to emulation are transformed from
"x op= y" to "angle_compound_op_frm(x, y)", a call to a function which
does the appropriate rounding and places the result of the operation to
x.

The angle_ prefixed names should not clash with user-defined names if
name hashing is on. If name hashing is not on, the precision emulation
can only be used if the angle_ prefix is reserved for use by ANGLE.

To support the rounding routines in output, a new operator type is added
for internal helper function calls, which are not subject to name
hashing.

In ESSL output, all variables are forced to highp when precision
emulation is on to ensure consistency with how precision emulation
performs on desktop.

Comprehensive tests for the added code generation are included.

BUG=angle:787

Change-Id: I0d0ad9327888f803a32e79b64b08763c654c913b
Reviewed-on: https://chromium-review.googlesource.com/229631
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2014-11-26 14:57:35 +00:00