Calling pkg-config directly doesn't work when building
with a sysroot image as it will looks for host libraries
rather than those within the sysroot.
BUG=chromium:569947
Change-Id: I6f3e63c1816cd9393110cb3060744a69a93c9a2e
Reviewed-on: https://chromium-review.googlesource.com/318771
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Sam Clegg <sbc@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reland with a fixed tests on AMD.
This extension will be used by Chrome to advertise the visual it will
use for its windows. Having ANGLE use the same visual will bring
several benefits:
- A blit will be avoided, and the content of the window might be
rendered on the system framebuffer directly.
- There will be less latency when resizing windows which will make it
much less likely to see a black border when resizing.
BUG=522149
Change-Id: I66004b6ac45453330af7c4c810ddf2c26941be42
Reviewed-on: https://chromium-review.googlesource.com/314661
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
In D3D we pack varyings by making a register map, and using the
recommended GLSL ES algorithm to reserve register space. We use
this map to assign row and column slots to each varying and then
produce a semantic index value.
The existing scheme had a number of bugs, and was failing several
angle_end2end_tests. The new design cleans up the code somewhat
and uses a different counting scheme for the semantic indexes:
just sort the varyings in packing order and use a simple
incrementing semantic index per varying. In SM4+, the HLSL compiler
sorts and packs the varyings correctly itself, and in SM3, handle
the cases we don't support by returning an error instead of a D3D
compiler link error.
Also refactor how we store varying information for TF Feedback/
StreamOut. Only store the necessary D3D information, instead of
extra information like the name and type.
This fixes several tests in GLSLTest/*. This also will allow us to
fix interpolation qualifier packing and the structure packing in
HLSL, which seems to work differently than the rest of the varying
types.
BUG=angleproject:1202
TEST=bots,dEQP-GLES3.functional.transform_feedback.*
Change-Id: Ie5bfbb4f71d8bf97f39115fc46d2e61b131df639
Reviewed-on: https://chromium-review.googlesource.com/311241
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This use after free was triggered when a window was made key and
destroyed, then another window was made key. dedResignKey was called on
the former's WindowDelegate which had already been freed, causing a
crash.
BUG=angleproject:891
Change-Id: If47e88419f9a407a6a77c5cd9853b7b4860dc698
Reviewed-on: https://chromium-review.googlesource.com/305817
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
The Mac AMD GPU FYI bots were crashing on end2end tests exit because the
NSView was trying to deallocated an NSTrackingArea that had been
previously deallocated.
BUG=angleproject:891
Change-Id: I933e437254cad65f18cb0518a401b8b8e9dc59a0
Reviewed-on: https://chromium-review.googlesource.com/303302
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
SetLowPriorityProcess's implementation can be shared between Mac and
Linux so even though it isn't using a Posix API, it lives in the posix
file.
CreateOSPixmap needed to be implemented but will never be used by dEQP
as our Mac EGL backend doesn't expose configs supporting pixmaps.
Reland with a Linux compilation fix (forgot to delete
SetLowPriorityProcess).
BUG=angleproject:891
Change-Id: If8145501e1787d08d82402a6baa60a5404cac6b1
Reviewed-on: https://chromium-review.googlesource.com/299773
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
SetLowPriorityProcess's implementation can be shared between Mac and
Linux so even though it isn't using a Posix API, it lives in the posix
file.
CreateOSPixmap needed to be implemented but will never be used by dEQP
as our Mac EGL backend doesn't expose configs supporting pixmaps.
BUG=angleproject:891
Change-Id: I7b53b44b3465045954ec8e5997f703525ece92d0
Reviewed-on: https://chromium-review.googlesource.com/299851
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@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 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 <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Mark EGL_KHR_create_context as supported in the DisplayGLs.
BUG=angleproject:1149
Change-Id: I20671535680eb2c3b9c08205cee243b3aa5c5821
Reviewed-on: https://chromium-review.googlesource.com/297080
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Instead of storing varying information in the shader, use a temporary
set when linking a D3D program. This also means we won't have to
modify information in the Shader object when linking a D3D program.
This completes the refactoring for PackedVaryings.
Re-land with fix for missing init of PackedVarying::vertexOnly.
BUG=angleproject:1123
Change-Id: If110809c3817d88b0370ac575d739d7385b067d9
Reviewed-on: https://chromium-review.googlesource.com/296731
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Likely the cause of Windows bot failures.
BUG=angleproject:1123
This reverts commit 532061bbfb.
Change-Id: Ia4f0161b97bfbf2adb4cafaa5fa5484f04fad245
Reviewed-on: https://chromium-review.googlesource.com/296710
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Instead of storing varying information in the shader, use a temporary
set when linking a D3D program. This also means we won't have to
modify information in the Shader object when linking a D3D program.
This completes the refactoring for PackedVaryings.
BUG=angleproject:1123
Change-Id: I241610e87f7d14f3e18b0d8bd84f1a3509c05dfd
Reviewed-on: https://chromium-review.googlesource.com/295193
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Additional warnings found with more testing and added C4267 warning disable only for angle_libpng
BUG=angleproject:1120
Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb
Reviewed-on: https://chromium-review.googlesource.com/293028
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
EGLWindow does nothing with it per se, but some code was relying on it
to store it. Add width and height to ANGLETest and SampleApplication
instead. Also fix a typo in PerfTestParams, widowWidth -> windowWidth.
BUG=angleproject:1105
Change-Id: I26da607a2e6342864b508a50ee3cf8944608f868
Reviewed-on: https://chromium-review.googlesource.com/287379
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Also make sure that EGL_EGLEXT_PROTOTYPES is always defined so that
extension functions can be used without loading them.
BUG=angleproject:970
Change-Id: I33fa3e8ed68aeda55ad69e1bc7826646f5e3ce29
Reviewed-on: https://chromium-review.googlesource.com/287161
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
This will help address a bug in glReadPixels performed after a resize.
BUG=angleproject:1050
Change-Id: Ie204dec229582ec0e990c6f7fa22cfd44048d46e
Reviewed-on: https://chromium-review.googlesource.com/286250
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
This includes an implementation of OSX timer and path_utils.
BUG=angleproject:891
Change-Id: Id5440a8321bcfd4a61f3fe35b4a3fc0c651f564f
Reviewed-on: https://chromium-review.googlesource.com/278211
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
This will help make the deqp support code platform agnostic.
BUG=angleproject:892
Change-Id: I6f8c738ed8125057db87afea2079583f8feac977
Reviewed-on: https://chromium-review.googlesource.com/276201
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
This provides a cross-platform way to make sure dEQP runs in a low
priority process.
BUG=angleproject:892
Change-Id: I0d12f1eacb78be43edcdb6622f945734c0b377ff
Reviewed-on: https://chromium-review.googlesource.com/273595
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
*re-land with fix for AMD/ES2/OpenGL.*
An off-by-one bug slipped in that broke support for these edge case
shaders.
Bug introduced in https://chromium-review.googlesource.com/#/c/266928/
BUG=angleproject:1045
BUG=500116
Change-Id: If44f809d432221d1e17afc407d49e87e0cb7504c
Reviewed-on: https://chromium-review.googlesource.com/277664
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
For each config, determine if a context can be created at test
instantiation time. This allows skipping of ES3 tests when the hardware
does not support ES3.
Updated the perf_tests to use the EGLPlatformParameters struct so that
they can be filtered in the same way.
Change-Id: If664604b057cec4005eb4b63bebd83cd4964b7b2
Reviewed-on: https://chromium-review.googlesource.com/276460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Introduce a "null" GL renderer for this specific benchmark, which
does not do any work on drawArrays and drawElements. We could use
the same kind of trick for buffer and texture updates, if we need
it. This gives us a good baseline for comparing GL and D3D perf.
BUG=angleproject:1040
Change-Id: I4bf7c75df01932de45ddd0a4e42e8fc82f15e37e
Reviewed-on: https://chromium-review.googlesource.com/276192
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Also shutdown performance, since it's not easy to only test one.
BUG=angleproject:1014
Change-Id: I9d06426788ed336031271f8876589b111f1294b7
Reviewed-on: https://chromium-review.googlesource.com/273974
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This includes an implementation of a cross platform Sleep function
BUG=angleproject:892
Change-Id: I1087a00ab204b37bafc5e95a9766962b194d97ef
Reviewed-on: https://chromium-review.googlesource.com/273133
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Changes to CLOCK_MONOTONIC as CLOCK_PROCESS_CPUTIME counts only
user time and not kernel time.
BUG=angleproject:892
Change-Id: I3d5aee26ee2bacd7449fdd7795ad8c2b289d7324
Reviewed-on: https://chromium-review.googlesource.com/272652
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
These warnings are currently disabled because these files are not with
angle_code set to 1 in the gyp files to avoid gtest's code warnings.
We hope to either fix warnings in gtest or change our build system to
not use warnings for gtest.
BUG=angleproject:1003
Change-Id: I281781b77f92ef8c394dd53fbbd50d525e4da5c9
Reviewed-on: https://chromium-review.googlesource.com/271412
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
That way the code calling setVisible knows it can safely create a
framebuffer for this window without having its content be undefined.
BUG=angleproject:830
Change-Id: Ia694f50ac20e1d510d0c0f899226ed241d9a5a3a
Reviewed-on: https://chromium-review.googlesource.com/271156
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Only one EGL_NONE is needed to signal the end of the list.
BUG=angleproject:892
Change-Id: I7de349bef9d674344ccd1b2c4801d8b42c801299
Reviewed-on: https://chromium-review.googlesource.com/271157
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
This should fix our non-standard template use, which causes compile
errors for the tests on GCC/Clang.
BUG=angleproject:997
Change-Id: Id1bb15231eda445f37e53a5b33d4684ec6618d8e
Reviewed-on: https://chromium-review.googlesource.com/269858
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
It was using lstat to get the size of /proc/self/exe but
it always returns 0, so we just use a big buffer on the
stack instead.
BUG=angleproject:892
Change-Id: I6d88efeb4ec5de7a78cb3668e3d78520203ad1d5
Reviewed-on: https://chromium-review.googlesource.com/269990
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Refactorings to egl::Surface to enable ref-counting were causing
a situation where we could have two Window surfaces alive at the
same time. This would confuse the window procedure logic in
SurfaceD3D. Releasing the surface fixes this issue and conforms
closely to the wording on the spec on when Surfaces should be
deleted. Also add a test for message loops and surfaces.
BUG=475085
BUG=angleproject:963
Change-Id: Icdee3a7db97c9b54d779dabf1e1f82a89fefc546
Reviewed-on: https://chromium-review.googlesource.com/265064
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
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>
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>
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>
Found by clang:
..\..\third_party\angle\src\common/angleutils.h(66,5) : error: delete called on 'Timer' that is abstract but has non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
delete resource;
^
..\..\third_party\angle\src\tests\perf_tests\ANGLEPerfTest.cpp(26,5) : note: in instantiation of function template specialization 'SafeDelete<Timer>' requested here
SafeDelete(mTimer);
^
BUG=chromium:82385
Change-Id: I69033b1802b5dffbdf2d80889aca7019d710d481
Reviewed-on: https://chromium-review.googlesource.com/264061
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Also fixes the uniform count upper limit in glGetActiveUniformsiv,
as well as an assert hit with used but unbound uniform buffer.
BUG=angleproject:507
BUG=angleproject:962
Change-Id: I096fe1c9b4f0f398f3a638cd8311278987dfb7dc
Reviewed-on: https://chromium-review.googlesource.com/263404
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Also fixes the uniform count upper limit in glGetActiveUniformsiv,
as well as an assert hit with used but unbound uniform buffer.
BUG=angleproject:507
BUG=angleproject:962
Change-Id: I263b14df41d4e45a67304c1d145646398721cf0a
Reviewed-on: https://chromium-review.googlesource.com/263412
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
*re-land with fix for Chromium compile*
This saves us from needing to replicate the same code in two places.
BUG=angleproject:956
Change-Id: I68dffee715df03bd25685e3ed5c0506ffc41c3b9
Reviewed-on: https://chromium-review.googlesource.com/263258
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This saves us from needing to replicate the same code in two places.
BUG=angleproject:956
Change-Id: Ibc80997eec184d0d5aa9c6c076c9d4507fbf8caa
Reviewed-on: https://chromium-review.googlesource.com/262776
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Also fixes the uniform count upper limit in glGetActiveUniformsiv.
BUG=angleproject:507
Change-Id: Icfc90ed64cf94b1bab2d4cc93a8fb5e11b28d666
Reviewed-on: https://chromium-review.googlesource.com/261874
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
These perf tests use the D3D NULL renderers to measure pure CPU
time, with no GPU limitations. Also fix our D3D9 SwapChain code
to skip creating a SwapChain for NULLREF D3D9 devices, and the
vertex decl code to reinitialize the formats when finding a
mismatch with the previous value.
BUG=angleproject:955
Change-Id: I449e63177b48afd1559c36244de0bc252814e813
Reviewed-on: https://chromium-review.googlesource.com/262208
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Add OpenGL and OpenGLES platform types for the ANGLE tests.
Comment out some UNIMPLEMENTEDs that tests using OpenGL trigger.
BUG=angle:882
Change-Id: I7f85eed184f7cebd25e2521d793fc9c394b704ce
Reviewed-on: https://chromium-review.googlesource.com/252252
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
ANGLE's testing code recently got enabled in Chromium's builds. While it
builds fine with cl.exe, it isn't quite standards-conformant and doesn't
build with clang. Fix this.
There were three issues:
1. ANGLE_TYPED_TEST_CASE() is a variadic macro that tries to use
__VA_ARGS__ as argument to a variadic template and then pass
that template to another macro. However, [cpp.replace] describes
that ANGLE_TYPED_TEST_CASE(Test, int, float) should be expanded
to TYPED_TEST_CASE(Test, ::testing::Types<int, float>) which
should be interpreted as a "call" of TYPED_TEST_CASE with the
3 macro arguments `Test`, `::testing::Types<int`, and `float>`.
As a fix, use a typedef for the variadic template and refer to
it through the typedef in the macro call.
2. `#version` was used on its own line in a substitution of the
SHADER_SOURCE macro. [cpp]p1 says that every line starting with
a `#` is a preprocessing directive, and [cpp.replace]p11 says
"If there are sequences of preprocessing tokens within the list
of arguments that would otherwise act as preprocessing directives,
the behavior is undefined" (with a footnote that this includes
non-directives -- # followed by unknown text). As a fix, merge the
`#version` line with the previous line. Now the line doesn't start
with `#` and things are fine.
3. Unqualified lookup usually doesn't look into dependent bases. If
this is desired, one usually has to make the call qualified, a
good explanation for this is at
http://eli.thegreenplace.net/2012/02/06/dependent-name-lookup-for-c-templates
cl.exe doesn't implement this rule, and clang tries to emulate
cl.exe's behavior to a certain extend when in Microsoft mode.
However, that seems to not work for member templates with explicit
types (filed http://llvm.org/PR22066 for this, but since it's not
needed to parse Microsoft headers and not standards-conformant,
I'm not sure if we'll fix that). As a fix, don't provide an explicit
type, the inferred type is the same. This is also consistent with
all the other tests in this file. (We might clean up -Wmicrosoft
warnings in the future; if so I'll add the explicit this->s that
are missing in this file when we do.)
BUG=chromium:445406
Change-Id: I77a2f3ab9601a1f0f39b56ed3d05217f123155b8
Reviewed-on: https://chromium-review.googlesource.com/238090
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Added enums to allow users to request major and minor versions of the
underlying API and if a WARP device is used.
BUG=angle:490
Change-Id: I0bfb2ac8d327da28a47cc8e6346300e47ab9538c
Reviewed-on: https://chromium-review.googlesource.com/225081
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
If a previous window was not cleaned up properly due to a crash in a
test, the subsequent windows can fail to be created because the class is
not destroyed. Work around this by always creating a unique class before
creating the window.
Change-Id: Ied6b2818ef03fa12b07111d8204c3c1a6a5bd5ac
Reviewed-on: https://chromium-review.googlesource.com/225080
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Chromium builds define UNICODE, while we don't, which confuses
the built-in IDC_ARROW macro.
With this fix, and http://crbug.com/415983, we can build
angle_perf_tests in Chromium.
BUG=angle:744
Change-Id: I268a7c11a5b5355cb2485bf10faf750972cf4e30
Reviewed-on: https://chromium-review.googlesource.com/220363
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
The Chromium style output will allow the perf bots to collect data
from our performance tests.
BUG=angle:744
Change-Id: I2ffdace688004edf2918ead2a3e2aa2a6c4daf95
Reviewed-on: https://chromium-review.googlesource.com/220361
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
In some parts of ANGLE code, we were using std::vector::data to get
a pointer to the first element. Sadly, this is c++11 only, which
isn't currently supported on Chromium. This was causing a breakage
on Android. We should probably refrain from using data except on
D3D-only code, which we know will be Visual Studio.
BUG=angle:767
Change-Id: Ibc10577368435a13f62d74d77c95076482cd8f82
Reviewed-on: https://chromium-review.googlesource.com/220920
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This benchmark will attempt to reproduce the slowdown we see
in D3D11 on the turbulenz GPU particles demo.
BUG=angle:705
Change-Id: I9c4c2f09d4282feae30f448fd374cdbb6bceae9b
Reviewed-on: https://chromium-review.googlesource.com/216467
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
We were messing up the client rect on resize, which caused the
ReadPixels checks to mess up around the window edges. Disabling
the window styles on the test windows masked this bug. Fix this
by using a style-less child window inside the parent window.
This gives us access to window styles for the samples project,
along with the ability to use tiny 1x1 windows for testing.
BUG=angle:730
Change-Id: Ic6dd931df7b4e32fbbcacbb004d3bbc49917f658
Reviewed-on: https://chromium-review.googlesource.com/217024
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This completes the refactor to use the same code for EGL and OS
Window creation for samples and tests.
BUG=angle:730
TEST=angle_tests
Change-Id: Ib6de89f5bf83c0730a66f662cd1f87351f36a5f7
Reviewed-on: https://chromium-review.googlesource.com/213297
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Extra parameters include pixel bit sizes, swap interval
and if we want multisampling. This gives parity between
the tests and samples EGL creation options.
BUG=angle:730
Change-Id: I68d619c2ea141794f0089456bb6bba3d3b1c2a07
Reviewed-on: https://chromium-review.googlesource.com/213296
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This allows us to use OS Windows and EGL contexts differently
for different implementations - eg, tests and samples.
BUG=angle:730
Change-Id: I65e69fd829c3dbf2f1b406d90045bc296798ebb6
Reviewed-on: https://chromium-review.googlesource.com/213290
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This code shares the Window and EGL logic between the two
projects.
BUG=angle:730
Change-Id: I8940371226a8f7b02579c332f51679c4a5d0e2a5
Reviewed-on: https://chromium-review.googlesource.com/212799
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>