Port the angle_link_glx setting of the gyp build to the standalone gn build.
When set to true, libGL will be linked into libANGLE, instead of dlopen-ed.
This is useful when using apitrace.
BUG=angleproject:1569
Change-Id: I16a91504960169efdcde3b2c50b944de148d9ba6
Reviewed-on: https://chromium-review.googlesource.com/821691
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
This should fix undefined function call sanitizer warnings.
Re-land fixes the build and uses proper export annotation. Also fixes
the missing source includes in BUILD.gn for libANGLE so future
changes to Platform.h (and other includes) will get picked up by the
dependency analyzer step.
BUG=chromium:778918
Change-Id: I92cc8a43bbbdc70de50a67f73b223d8f903cd6cd
Reviewed-on: https://chromium-review.googlesource.com/767111
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Previously were enabled only on x86_64.
Also change from using target_cpu to current_cpu, as the doc recommends.
BUG=angleproject:1814
Change-Id: Ia7e8e930c76aab5cfb47b75e0ec78902ab313237
Reviewed-on: https://chromium-review.googlesource.com/737438
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This implements a NULL driver in OpenGL by stubbing out most of the
GL functions in FunctionsGL except a few static "Gets" that are needed
for initialization with Chromium and the tests. It is intended to be
used for performance testing ONLY and will not have correct behaviour.
It also adds a define to enable conditionally excluding the null entry
points for implementations that wish to save on a bit of binary size.
Also fixes some of the typedefs in functionsgl_typesdefs.h that were
turned up after implementing the direct assignment from NULL stub
entry point, generated from gl.xml, to the function pointer with type
defined from functionsgl_typedefs.h.
BUG=angleproject:2188
Change-Id: Ifa1e4739cb471ab6b52a4bf24c16d9eb4b334ac5
Reviewed-on: https://chromium-review.googlesource.com/727530
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
The current build configuration causes AFL based fuzzers to be built
with incorrect options.
Bug: 770970
Change-Id: I712dd72a0f680df538e98622032cb13f39ed8c63
Reviewed-on: https://chromium-review.googlesource.com/707933
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This should do the same things as the stand-alone gyp build, but with gn.
You should switch to gn as gyp support will go away.
You need a recent enough version of gn. If yours is too old try this one:
./buildtools/linux64/gn
If "gclient sync" or anything fails with an ImportError on gyp stuff,
try running it with the following PYTHONPATH in the environment:
PYTHONPATH=tools/gyp/pylib
BUG=angleproject:1569
Change-Id: I56d19bec2d8b649a7bd65062c656cbfc69ea3dd8
Reviewed-on: https://chromium-review.googlesource.com/642588
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
This is useful for building the sample within Chromium rather than
in ANGLE's standalone build, which has other requirements like a
full Visual Studio installation.
BUG=angleproject:2095
Change-Id: I785d87ecb5166d8f640a5c8a5f321c3209017cc5
Reviewed-on: https://chromium-review.googlesource.com/553399
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This merges the mrucache and numerics into one folder, to prevent
having to make two identical versions of logging.
BUG=angleproject:2044
Change-Id: Iba6dab05b21eb9ba0de44f27a90579c590a9a7fd
Reviewed-on: https://chromium-review.googlesource.com/522870
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This library comes from Chromium's base, and is useful for many use
cases in ANGLE. It can replace the custom MRU code we use in the
RenderStateCache. It will also be useful for implementing a program
binary cache.
BUG=angleproject:2044
Change-Id: Iba166fe380d7ed4e3123428b0227b9d299f756d1
Reviewed-on: https://chromium-review.googlesource.com/516384
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Our test sets (e.g. angle_perftests) were not having the config
applied.
BUG=angleproject:747
Change-Id: Idd3a2cba214d38a923c1936787f9dec4bd016326
Reviewed-on: https://chromium-review.googlesource.com/487730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Refactor display and surface classes into Win32 and Linux parts and
add Linux parts to gn and gyp builds.
BUG=angleproject:1668
Change-Id: I2a7d29c35f4f42fa0035bd97938d3770f3627672
Reviewed-on: https://chromium-review.googlesource.com/412426
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Adds a new custom bitset template to handle packing as many bits as
possible into a single variable. Intelligently select the right class
depending on platform features and bit sizes.
For now, always use a packed 64-bit set on 64-bit, instead of using
a 32-bit set for smaller bitsets.
BUG=angleproject:1814
Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b
Reviewed-on: https://chromium-review.googlesource.com/471827
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This is the third stage of 05356e35d3
and is necessary for projects putting use_libpci in the gn args, like
headless Chrome.
BUG=angleproject:1874
Change-Id: I03a010ababf08f992f0fb26ff87ddc48afd5a237
Reviewed-on: https://chromium-review.googlesource.com/457277
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
We want to move the definition of use_libpci from gpu/config to ANGLE.
To avoid breaking compilation we should do it in three steps:
- Make ANGLE not redefine use_libpci
- Remove definition of use_libpci from Chrome
- Make ANGLE define use_libpci unconditionnaly
This commit is the first step.
BUG=angleproject:1874
Change-Id: I08d0996ca536c51e1617f656171d696f05605725
Reviewed-on: https://chromium-review.googlesource.com/450037
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Also adds a test that prints the gathered information for manual
checking and to help know what the system is when looking at the logs.
BUG=angleproject:1874
Change-Id: Icb0cc390c9808fd8db0f966d667b94dde4b94e62
Reviewed-on: https://chromium-review.googlesource.com/443845
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
The Vulkan GLSL translator back-end will handle validating and
translating our WebGL/ESSL shaders into Vulkan-specific GLSL.
glslang (the Vulkan one) accepts both GLSL and GLSL ES shaders
as inputs, and both the desktop and ESSL back-ends give
incompleteness warnings when used. For now, use the desktop GL
450 as a target for Vulkan GLSL.
The Vulkan-specific changes are currently only to add locations
to every vertex input and fragment output.
BUG=angleproject:1575
Change-Id: I7c3f32f522e9d18e5f8618eb7927336bf4fbdcf2
Reviewed-on: https://chromium-review.googlesource.com/412266
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Since common is shared through all ANGLE code (libANGLE/tests/samples)
this is the most general place for these utils, and will give libANGLE
access to them. We'll need them to get the current executable dir for
loading the Vulkan layers.
This also means we'll need to fix the global static variable use when
we have the ability.
BUG=angleproject:1319
BUG=chromium:677841
Change-Id: I7af61920635135b28a2f02f4a8d019ee88c9dd28
Reviewed-on: https://chromium-review.googlesource.com/425440
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
angle_end2end_tests included tests that used both the entry points
from our shared libraries as well as calling libANGLE classes like
gl::Context directly. Split these into a new test executable.
This also removes the libANGLE code from all the end2end tests.
It's necessary to add static versions of libEGL and libGLESv2 so
that we call safely call methods in libANGLE an the entry points
from the same target.
BUG=angleproject:1660
Change-Id: I6d82021b9300231ddb5fee435e5d77728f8f1292
Reviewed-on: https://chromium-review.googlesource.com/419175
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This CL moves the varying packing from the D3D layer up to Program.
This is necessary for WebGL validation, and gives us consistency
for the various back-ends. There may be some additional cleanup work
on the VaryingPacking class, because it does some work that is D3D-
specific.
WebGL requires strict varying packing. Instead of allowing success
unconditionally, it's an explicit error to succeed to pack a set of
varyings that the sample algorithm would fail to pack.
Introduce a new packing mode option to the varying packing class to
handle this different packing style, while keeping our old more
relaxed packing method for ES code.
BUG=angleproject:1675
Change-Id: I674ae685ba573cc2ad7d9dfb7441efa8cb2d55fc
Reviewed-on: https://chromium-review.googlesource.com/423254
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
libEGL should use libGLESv2 for EGL implementation,
to prevent libANGLE global variables being duplicated.
BUG=angleproject:1660
Change-Id: I84c1e22fcce8f4a21acfb1fcde0c84ebd77204f8
Reviewed-on: https://chromium-review.googlesource.com/422574
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This integrates the build files for the loader SDK, and tests the
compilation by calling InitInstance. There's no current way to
test the runtime behaviour since there's no way for the tests to
initialize the Vulkan back-end, that will come in the next CL.
BUG=angleproject:1319
Change-Id: Ia8bf96ca068eaf40744c9753b59ffaaa5ada8a73
Reviewed-on: https://chromium-review.googlesource.com/367519
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This code doesn't actually call any D3D runtime methods, so it can be
included in our cross platform unit tests. Just include the varying
packing code for now.
BUG=angleproject:1296
BUG=angleproject:1638
Change-Id: I5c0ccccb00e1c13ca98448256be048f7cd0968ce
Reviewed-on: https://chromium-review.googlesource.com/417116
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reland with a Windows build fix.
We want to move the Chromium initialization of the ANGLE platform from
being Windows-specific to being EGL-specific. Because the mechanisms by
which the ANGLE library is loaded are OS-specific, it is inconvenient to
use dlsym and friends to get the ANGLEPlatform entry points. Instead
we expose the through eglGetProcAddress which is readily available in the
EGL-specific part of Chromium.
BUG=angleproject:1621
Change-Id: I022a39493756a3b5d1ed626fd05e74af3f043211
Reviewed-on: https://chromium-review.googlesource.com/410066
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
GYP related files went in gypfiles/, and the gni went in gni/ this
changes frees up the build/ directory name for Chromium's build/
directory.
BUG=angleproject:1569
Change-Id: I76fe343d569239c2732ba87986fcf7debc21d417
Reviewed-on: https://chromium-review.googlesource.com/403029
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
- Use full header paths in includes
- Use ASSERT instead of assert
- Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN
- Use range-for in a couple places
- Remove pp_utils.h
BUG=angleproject:1522
Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232
Reviewed-on: https://chromium-review.googlesource.com/387212
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
It contains defines that need to be consistent between the header and
the implementation.
BUG=angleproject:1522
BUG=chromium:647807
Change-Id: Ica144c455b7366bd9939a07b171edffe5af8bf35
Reviewed-on: https://chromium-review.googlesource.com/386945
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
When we want to use GN standalone, the fuzzer_test template won't exist.
Instead make the fuzzer a source set that is used by a target in Chrome.
BUG=angleproject:1522
Change-Id: I347e633448d508eb124d0861b0fb28315923016c
Reviewed-on: https://chromium-review.googlesource.com/386636
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
So that there will be one instance of static thread synchronization variables
in AndroidWindow.
Previously there was one instance in lib_angle_deqp_gles2_tests__library
and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize
waiting forever.
Also make the change in GYP build to fix standalone build,
and fix rpath issues on Mac.
BUG=angleproject:1471
TEST=end2end and deqp tests on standalone Win10 and end2end on GN Mac 10.11
Change-Id: I731578459400bb47d269df129aabed9b67b555e6
Reviewed-on: https://chromium-review.googlesource.com/376202
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
So that there will be one instance of static thread synchronization variables
in AndroidWindow.
Previously there was one instance in lib_angle_deqp_gles2_tests__library
and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize
waiting forever.
BUG=angleproject:1471
Change-Id: Ia529c91e34960eb352730c1bb89a91ce6336c8a0
Reviewed-on: https://chromium-review.googlesource.com/368983
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Some warnings were enabled only in standalone builds. Enabling them in
the GN config will prevent standalone build breakage and also make
some potentially harmful warnings more visible to non-Windows devs.
BUG=angleproject:1449
Change-Id: I11fe9bac957864d37af37b3860a22fcbd91946ac
Reviewed-on: https://chromium-review.googlesource.com/360961
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Since the newer driver versions are required for WebGL 2 conformance,
we need a solution that can detect a driver version to know if we
should apply the workaround.
Use a modified copy of Chrome's Windows GPU driver detection code.
In the future we should extend this to a full module when we port
the command buffer workarounds.
BUG=angleproject:1452
Change-Id: I783d5726454671cc22585a2bf990c071d539aa9f
Reviewed-on: https://chromium-review.googlesource.com/361962
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Using "no_chromium_code" is a bit less strict, but ANGLE should be
able to handle slightly stricter warnings.
Re-land with fix for Clang build.
BUG=angleproject:1449
Change-Id: I8988287d630a6258f2f9ee90e7bfef5f2d5799cd
Reviewed-on: https://chromium-review.googlesource.com/361331
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Using "no_chromium_code" is a bit less strict, but ANGLE should be
able to handle slightly stricter warnings.
BUG=angleproject:1449
Change-Id: Ifaf77201085dd70cf5ff628b1aa02de55c5e96ba
Reviewed-on: https://chromium-review.googlesource.com/360940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The :angle-image_util target was a source_set rather than a
static_library(), causing us to link in loadimage.cpp, which
pulled in mathutils.cpp, which contains a static initializer.
Switching :angle_image_util to a static library (which is what GYP
does) solved the problem.
R=rsesek@chromium.org, cwallez@chromium.org
BUG=628052
Change-Id: I63387b3fc9d799c92f7c1b49a1c7c7435e70a951
Reviewed-on: https://chromium-review.googlesource.com/360228
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Just checking use_ozone fails when building an ozone platform which
doesn't have gbm, e.g. chromecast.
BUG=angleproject:1439
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_chromeos_rel;tryserver.chromium.android:android_compile_dbg
Change-Id: Idec14441ce30dd872b3bfddfe844abfeb910cc02
Reviewed-on: https://chromium-review.googlesource.com/358860
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Allows for chromium to make use of some of the functionality.
BUG=612205
Change-Id: Ib4435ca44775a3a554b0fb3bd384bd4d31d7952d
Reviewed-on: https://chromium-review.googlesource.com/351753
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This is more accurate, and doesn't break platforms with no pkgconfig,
e.g. Android.
BUG=angleproject:1297
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_chromeos_rel;tryserver.chromium.android:android_compile_dbg
Change-Id: Iafbd66a5e81467d2a5431c3bb1ddd26a837888e7
Reviewed-on: https://chromium-review.googlesource.com/356481
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Just the bare minimum implementation for end2end tests to run.
BUG=angleproject:1362
TEST=angle_end2end_tests on Nexus 5X
Change-Id: I92293e0f8bdc2ffaa5d4661927750d7cb3d931e6
Reviewed-on: https://chromium-review.googlesource.com/349353
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This replaces are "IsUnsignedXXXSafe" family of methods.
Also add overflow checks to unpack block sizes.
BUG=angleproject:1397
Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340
Reviewed-on: https://chromium-review.googlesource.com/348062
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This will mainly affect the Chromium bots.
BUG=angleproject:790
Change-Id: I0c4318e83eedba851f15b3b139551cdb6a2fde12
Reviewed-on: https://chromium-review.googlesource.com/346103
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Currently enabled for Windows by default.
BUG=angleproject:1319
Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This should ensure that d3dcompiler_47.dll is saved into an isolate in
chromium, as it's used at runtime.
BUG=611235
Change-Id: I64801f00bf90f2be68c7a691724609bbf4d28dfa
Reviewed-on: https://chromium-review.googlesource.com/344351
Tryjob-Request: John Bauman <jbauman@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: John Bauman <jbauman@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Some GPU driver bug workarounds should be active only for specific
driver version ranges. This adds NVIDIA Linux driver detection using
the XNVCtrl X11 extension.
BUG=590870
Change-Id: I8cbf692a0c8a6da7473169f29d720bdc2d07663d
Reviewed-on: https://chromium-review.googlesource.com/329637
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
They are no longer needed by Chromium.
BUG=522967
Change-Id: I187eed52378a58f3ea24c3e21082c6a93e56da7f
Reviewed-on: https://chromium-review.googlesource.com/325330
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This error was introduced in 82b5ab606f
where the translator's essl and glsl sources are compiled in both
the translator and translator_lib targets. As translator depends on
translator_lib this caused symbols to be defined multiple times.
BUG=angleproject:1250
Change-Id: I50bab7112d1460e14710f50250fa2417b2163236
Reviewed-on: https://chromium-review.googlesource.com/321770
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reland with a link fix for Clang on Windows
In order to implement the --use-gl=angle Chrome flag on Linux, we need
to have the ANGLE .so directly in the build directory however GYP
places shared_libraries under lib/ on Linux. On the contrary loadable_modules
cannot be linked against so we need to keep the shared_library targets.
This commit adds _ANGLE versions of the libEGL and libGLESv2 targets as
loadable module that depend on their respective shared library.
BUG=522967
Change-Id: Iad968ab786b94b6041c279921de99633d23b48a7
Reviewed-on: https://chromium-review.googlesource.com/318470
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
This is Windows-only for now, but will be expanded to Linux. Also do
a bit of refactoring in our deqp.gypi file.
BUG=angleproject:1272
Change-Id: I526a99fe3b91a2d9e8901c7e033a4916a06780be
Reviewed-on: https://chromium-review.googlesource.com/320800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
In WinRT we only use the HLSL code, so the GLSL/ESSL output code
is not necessary and is only adding to our binary size.
BUG=angleproject:1250
Change-Id: I9363ca3981bde50a230f8353c1bcc09f6ea209cb
Reviewed-on: https://chromium-review.googlesource.com/317358
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Austin Kinross <aukinros@microsoft.com>
Tested-by: Austin Kinross <aukinros@microsoft.com>
The root_build_dir variable yields the root of the build tree.
But when the component is being built under a non-default
toolchain, its output files are delivered to a toolchain
subdirectory instead. The copy_compiler_dll rule should put its
output next to where libANGLE and things built using it will go,
which is root_out_dir. This fixes cases where the angle GN
component is instantiated under more than one toolchain, which
heretofore would produce multiple Ninja rules for the same target
file $root_build_dir/d3dcompiler_47.dll and thus get complaints
from Ninja.
BUG=512869
Change-Id: I9fe83c5c5fa74902ef270654d3707636588af6b7
Reviewed-on: https://chromium-review.googlesource.com/320119
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Roland McGrath <mcgrathr@chromium.org>
This reverts commit 6beb0bfdd0.
It caused compile failures on win_clang_dbg because when building libEGL_ANGLE.dll DllMainCRTStartup wasn't defined.
Change-Id: I8080f8db373f5988d86560da1b8b2a1bae30d3ea
Reviewed-on: https://chromium-review.googlesource.com/318460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
In order to implement the --use-gl=angle Chrome flag on Linux, we need
to have the ANGLE .so directly in the build directory however GYP
places shared_libraries under lib/ on Linux. On the contrary loadable_modules
cannot be linked against so we need to keep the shared_library targets.
This commit adds _ANGLE versions of the libEGL and libGLESv2 targets as
loadable module that depend on their respective shared library.
BUG=522967
Change-Id: I08f2ce0ee0430eff5bee852f09cd7d30b94d6266
Reviewed-on: https://chromium-review.googlesource.com/316421
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
This makes sure that EGL_EGLEXT_PROTOTYPES is defined in the
same places as GL_GLEXT_PROTOTYPES.
BUG=angleproject:1190
Change-Id: I0e55aad5728df765bff495822570e7590b157d68
Reviewed-on: https://chromium-review.googlesource.com/315208
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Without this fix, angle_end2end_tests links fine on Trusty
but not on Precise or older versions of Linux (util/linux/LinuxTimer.cpp
calls clock_gettime(), which is part of libc on newer versions of the
OS but requires -lrt on older versions. GYP had the dependency specified
but GN didn't).
R=cwallez@chromium.org
BUG=432959, 531296
Change-Id: I70e1f701d099f3ba72c7e5dfd7af6d47658ffad9
Reviewed-on: https://chromium-review.googlesource.com/312298
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
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 <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Issues with GN build.
This reverts commit 8284436798.
Change-Id: I99d186019135bbbe250e95c9567854108d31c556
Reviewed-on: https://chromium-review.googlesource.com/299870
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This changes angle_unittests.gypi to use a variable per list of files so
that we can grab the list of files in conditions in BUILD.gn
BUG=angleproject:929
Change-Id: I7fc73fd84d8efc1ea545fe672b1dba1c429b317f
Reviewed-on: https://chromium-review.googlesource.com/296443
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
The solution is the same as in GYP version:
1. Check if .git/index is available in angle directory.
2. Use generated commit.h file if git is available or copy the default
file instead.
Change-Id: Ic3cedf6793c368070228a63c0eb270ca6fb47f81
Reviewed-on: https://chromium-review.googlesource.com/289391
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Tomasz Moniuszko <tmoniuszko@opera.com>
The D3D11 renderer must choose the D3D9 debug annotator because the D3D11 interface
method ID3DUserDefinedAnnotation::GetStatus on desktop builds doesn't work with the Graphics
Diagnostics tools in Visual Studio 2013.
The D3D9 annotator works properly for both D3D11 and D3D9.
Incorrect status reporting can cause ANGLE to log unnecessary debug events.
Change-Id: I9a31c63cbc506904eb39577826fc4df8d503f03a
Reviewed-on: https://chromium-review.googlesource.com/278162
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cooper Partin <coopp@microsoft.com>
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
All other targets that remove chromium_code add
no_chromium_code; looks like not doing this here was an
oversight.
BUG=491209
Change-Id: Id5c81d019603b428561a23aaa4dbe4427e43e751
Reviewed-on: https://chromium-review.googlesource.com/275316
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Tested-by: Nico Weber <thakis@chromium.org>
The translator_static dependency is missing from libANGLE.
GYP has this dependency.
Change-Id: I30165a041f88f7e3c6f550744d2c7a4103d0f520
Reviewed-on: https://chromium-review.googlesource.com/264425
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
cpu_arch has been replaced by target_cpu and current_cpu in GN.
R=geofflang@chromium.org
BUG=344767
Change-Id: Id1c0e37238db5fac41572244aeac0908ac5a412a
Reviewed-on: https://chromium-review.googlesource.com/260971
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <bratell@opera.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Re-re-land with fixes for Linux and Android.
We were getting multiply defined symbol errors on Linux for some
stuff in the common sources. Switch to using a static lib target
for the common sources, and also sync BUILD.gn with the latest gyp.
BUG=angle:773
Change-Id: Ia2d52978a167c532e5e76cb711de589855eff44e
Reviewed-on: https://chromium-review.googlesource.com/240553
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Still more build failures, different ones this time.
This reverts commit 9f8a57c641.
Change-Id: I7bea8e24403d92ca4ecb2ee0f24f9e065db5366d
Reviewed-on: https://chromium-review.googlesource.com/240550
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Re-land with fixes for Android.
We were getting multiply defined symbol errors on Linux for some
stuff in the common sources. Switch to using a static lib target
for the common sources, and also sync BUILD.gn with the latest gyp.
BUG=angle:773
Change-Id: Id3edecc633b1c4be205558137c91baf87f256156
Reviewed-on: https://chromium-review.googlesource.com/240145
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
We were getting multiply defined symbol errors on Linux for some
stuff in the common sources. Switch to using a static lib target
for the common sources, and also sync BUILD.gn with the latest gyp.
BUG=angle:773
Change-Id: I212284cfa90cd117a784a5f17057f47dd08900d1
Reviewed-on: https://chromium-review.googlesource.com/239193
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This allows libANGLE to only be included in libGLESv2 and moves all TLS
data to libGLESv2.dll.
BUG=angle:733
Change-Id: I34f0b47987a5efbe906c290d3ca656142e69ea9a
Reviewed-on: https://chromium-review.googlesource.com/232962
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Chromium directly includes our common/version.h and couldn't build after this change.
This reverts commit f0a2c7727f.
Change-Id: Iafc41b1a3973f609518fe3588fdb64cecc285332
Reviewed-on: https://chromium-review.googlesource.com/231840
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
This reverts commit 3cbdc34d4e.
This reverts back to using 8.1 and d3dcompiler_47, as chrome is now rolled forward.
Change-Id: I7ef4ebdbc32146b9ba6f551e376ac03ac71131ba
Reviewed-on: https://chromium-review.googlesource.com/229990
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Tested-by: Scott Graham <scottmg@chromium.org>
This reverts commit e1425d95ba.
This is to keep the GPU fyi bots green until the chrome side is landed. Chrome will be rolling to e1425d95...
Change-Id: Iff1c60eeb7143fb72afa8525b31f8f0de9385897
Reviewed-on: https://chromium-review.googlesource.com/229497
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Change-Id: If43c7861ab7f47448fd726fd0b5c35f3a6eeb362
Reviewed-on: https://chromium-review.googlesource.com/229616
Commit-Queue: Scott Graham <scottmg@chromium.org>
Tested-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
glGetTranslatedShaderSourceANGLE() returns the glsl code, the initial translated hlsl code,
the final translated hlsl code and the disassembly of the generated binary with the compiler configuration.
This enhancement is only available if the define ANGLE_GENERATE_SHADER_DEBUG_INFO exists.
This define is set in the debug configurations for the Windows platform.
BUG=angle:751
Change-Id: I8b15e8b25fbb0c0575a73cc876bf8f1fa7ed142a
Reviewed-on: https://chromium-review.googlesource.com/221059
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Required pulling angle_enable_d3d{9,11} into angle.gypi and definition
of angle_libangle_win_sources. Pull in those sources in BUILD.gn.
Tested with local GYP build on Windows. Did not test GN build yet.
BUG=angleproject:773
Change-Id: Ia3703fe4fa2bc8a1682c1fa1667ca36268b36cc7
Reviewed-on: https://chromium-review.googlesource.com/221785
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Kenneth Russell <kbr@chromium.org>
libGLESv2_static and libGLESv2 can re-use the same object files.
BUG=angle:733
Change-Id: I894f4b5b6fbc1fc47812609d9e996691daf9f318
Reviewed-on: https://chromium-review.googlesource.com/214188
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This will allow us to use these methods when compiling the translator
as a DLL.
BUG=angle:466,697
Change-Id: Ic9169fb7c69fe0bf5f98addfc128a30ee6b2159d
Reviewed-on: https://chromium-review.googlesource.com/208752
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Our build in GN differed slightly from our gyp build, causing the
linker to complain about inconsistent linkage. Also remove some
stray definitions of EGLAPI from our headers.
Change-Id: I5d3a09ccb0cec528ead33944ce0996cceed32d86
Reviewed-on: https://chromium-review.googlesource.com/210821
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
In a previous fix to a Clang build error, we had neglected to update
the GN build. Broken in commit 07d49ef535.
BUG=angle:707
Change-Id: Ic11aa907d591540e915bec60f3bafaea471689d5
Reviewed-on: https://chromium-review.googlesource.com/210652
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Translator headers that are included by dependent code
(example: ShaderLang.h) expect to be able to include files from
"includes" (example: "KHR/khrplatform.h"). This automatically
applies this include path to dependent targets.
Change-Id: I6990f66132562f142a6cdf8b8c434d2dbaad1c98
Reviewed-on: https://chromium-review.googlesource.com/209452
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Removes shelling out to enumerate_files for the main targets (tests
and examples are currently unchanged) in favor of explicitly listing
out the files in the build.
There are a number of reasons. My immediate reason is that doing this
allows the file lists to be shared with the GN build so the GYP and GN
builds of angle should mostly automatically stay in sync now. In
addition, I don't think we should be enumerating files in GYP. No
other Chrome sub-projects do this, and Chrome engineers expect files
to be listed in .gyp* files. It's also slower to shell out a bunch of
times to get the file lists (this matters more in the GN build which
runs very quickly).
Updates the GN build to share these file lists. This unbreaks the
Windows GN Angle build.
BUG=angle:698
Change-Id: Iab8829628aeb7232bb64f4c247c35c6485bba3ee
Reviewed-on: https://chromium-review.googlesource.com/208461
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
* Move "private" functions into generatemip.inl.
* Use size_t for all dimensions.
* Use uint8_t pointers instead of unsigned char pointers.
BUG=angle:666
Change-Id: I8a1324802e4d670c042e0961c2b6f6fd53f4ebc7
Reviewed-on: https://chromium-review.googlesource.com/202503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
* Capitalize the function names to fit the style guide.
* Use explicit sizes in the function names to avoid any confusion about
input or output sizes.
* Use explicit sized types in the functions to avoid potential issues on
new platforms since a lot of bit-twiddling is used.
* Use size_t for all sizes.
* Use uint8_t for all binary data for input and output data so that pointer
arithmetic is much easier.
* Move templated function definitions into an .inl file so that
loadimage.h looks as clean as possible.
BUG=angle:665
Change-Id: Id7173ed66d9e1b7ee3261eea11e77d838cbd2951
Reviewed-on: https://chromium-review.googlesource.com/202590
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>