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

376 Коммитов

Автор SHA1 Сообщение Дата
Jamie Madill 1f56ed2a9b Add WGLWindow and WGL test configs.
WGLWindow lets us use a Windows driver's bindings instead of ANGLE.
This only works if the underlying driver supports OpenGL ES
compatibility.

Also adds the WGL headers, WGL XML, and a specialized WGL loader.

Because of a small driver issue with NVIDIA I added a retry for the WGL
Window initialization.

Bug: angleproject:2995
Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec
Reviewed-on: https://chromium-review.googlesource.com/c/1366021
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 21:35:24 +00:00
Jamie Madill ad398ee839 Free OSWindow and EGLWindow through helpers.
This cleans up any potential problems with allocating and freeing
resources in different shared objects or DLLs. Previously we were
using a dynamically linked allocation function and then calling
the standard delete function.

Also adds a base class helper for EGLWindow. Will base the WGL
Window class on this.

Needed for running ANGLE tests against native drivers.

Bug: angleproject:2995
Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0
Reviewed-on: https://chromium-review.googlesource.com/c/1393443
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 18:42:50 +00:00
Jamie Madill ba319ba31c Re-land "Load entry points dynamically in tests and samples."
Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.

This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-01 18:56:45 +00:00
Yuly Novikov 9f088621eb Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7.

Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624

Original change's description:
> Load entry points dynamically in tests and samples.
> 
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
> 
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
> 
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
> 
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
> 
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org

Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 20:46:23 +00:00
Jamie Madill 03923558a7 Load entry points dynamically in tests and samples.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
Reviewed-on: https://chromium-review.googlesource.com/c/1359516
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-29 16:24:36 +00:00
Jamie Madill 4638dc9def Re-land "Load correct libGLESv2 on Linux and Mac."
Re-land fixes build to ensure commit_id is built before libEGL.

libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Bug: chromium:915731
Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab
Reviewed-on: https://chromium-review.googlesource.com/c/1380511
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 18:54:44 +00:00
Yuly Novikov 175d918a1f Revert "Load correct libGLESv2 on Linux and Mac."
This reverts commit dd815b623e.

Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006

Original change's description:
> Load correct libGLESv2 on Linux and Mac.
> 
> libEGL was implicitly loading libGLESv2 on startup. This is bad
> because on platforms like Linux and Mac we could sometimes use the
> incorrect rpath. This in turn meant we needed workarounds like using
> "_angle" extensions to our shared objects to get the correct loading
> behaviour.
> 
> Fix this by loading libGLESv2 dynamically in libEGL. We build the
> loader automatically from egl.xml. The loader itself is lazily
> initialized on every EGL entry point call. This is necessary because
> on Linux, etc, there is no equivalent to Windows' DLLMain.
> 
> We also use an EGL.h with different generation options so we have the
> proper function pointer types. A README is included for instructions
> on how to regenerate EGL.h.
> 
> The entry point generation script is refactored into a helper class
> that is used in the loader generator. Also adds the libGLESv2 versions
> of the EGL entry points in the DEF file on Windows. This allows them to
> be imported properly in 32-bit configurations.
> 
> Also fixes up some errors in ANGLE's entry point definitions. Also
> includes a clang-format disable rule for the Khronos headers.
> 
> This CL will help us to run ANGLE tests against native drivers.
> 
> Bug: angleproject:2871
> Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
> Reviewed-on: https://chromium-review.googlesource.com/c/1370725
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org

Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2871
Reviewed-on: https://chromium-review.googlesource.com/c/1378887
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-16 19:53:36 +00:00
Jamie Madill dd815b623e Load correct libGLESv2 on Linux and Mac.
libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
Reviewed-on: https://chromium-review.googlesource.com/c/1370725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-16 14:04:28 +00:00
Jamie Madill 35cd7332ab Refactor test shader style.
This change enforces a lot more consistency. We pass const char * to
the Compile functions instead of std::string. Also fixes the
indentation of C++11 block comments to be more consistent.

Bug: angleproject:2995
Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78
Reviewed-on: https://chromium-review.googlesource.com/c/1357103
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-03 13:20:23 +00:00
Jamie Madill f3acb8c133 Retool perf test running.
This change does a few things involving the way we run the perf tests:

- Perf test runner can capture different metrics

Useful for capturing the new "nanoSecPerIteration" metric.

- Removes the "score" metric

We'll move to the new time-based metrics. These new metrics are scaled
correctly with iteration counts.

- Runs three trials per perf test

This gives more measurements per test. Each trial is approximately one
second. First the perf tests set a fixed number of iterations after
calibrating the number of steps that we can run in one second. After
that the three trials are run. This should give more stable results.

- Apply more CPU stabilization on Windows

Use SetPriorityClass to apply more CPU priority. Also upgrade
SetThreadPriority to the highest level.

- Always build the Vulkan command buffer test

This catches build regressions more easily. We still skip the test on
non-Android platforms.

Bug: angleproject:2923
Change-Id: I7da234c5af07775ba4a232bb8d65e0138ee7073f
Reviewed-on: https://chromium-review.googlesource.com/c/1330262
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-11-15 01:00:06 +00:00
Shahbaz Youssefi 1c0f151e04 Implement missing posix utils
Bug: angleproject:2923
Change-Id: I35fee6303f07c7b3a931f876a8d9d4ba54c91630
Reviewed-on: https://chromium-review.googlesource.com/c/1315607
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-11-02 19:28:49 +00:00
Jamie Madill 3402d52309 Try to reduce variance in angle_perftests.
This change does a few things:

- make perf test runner script print % variation instead of stddev

This makes it a bit more clear how much variance there is.

- stabilize CPU in the render perf tests

Setting a thread affinity and priority should stop from switching cores
during the run. Hopefully can prevent background noise from changing
the test results.

- warm up the benchmark with a few iterations

This should hopefully make the test results a bit more stable.

- output a new normalized perf result value

The new result is normalized against the number of iterations. So it
should hopefully be stable even if the number of iterations is changed.

- increases the iteration count in the draw call perf tests.

These tests were completely dominated by SwapBuffers time. Increasing
the iterations per step means we actually are bottlenecked on CPU time
instead.

Bug: angleproject:2923
Change-Id: I5ee347cf93df239ac33b83dc5effe4c21e066736
Reviewed-on: https://chromium-review.googlesource.com/c/1303679
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-10-30 20:27:07 +00:00
Jamie Madill 3ce69ba3eb Fix Win32Timer's Frequency init.
This could cause some problems on the perf bots.

Bug: angleproject:2908
Change-Id: If12e5939ba80b3fd0b9609e7b76df6045e60cb94
Reviewed-on: https://chromium-review.googlesource.com/c/1301849
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-10-26 16:08:03 +00:00
Shahbaz Youssefi 479918ded7 Get absolute time from timers
Independent of start()/stop()/getElapsedTime() functionality,
getAbsoluteTime() is added to return the time regardless of whether the
timer is running.

Bug: angleproject:2908
Change-Id: I056aeb6eddfba8757a139934c1cf68e00e860de6
Reviewed-on: https://chromium-review.googlesource.com/c/1296952
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-25 17:03:54 +00:00
Yizhou Jiang 7818a85c33 Implement GL_ANGLE_texture_multisample API part
Support GL_ANGLE_texture_multisample extension.
This patch adds enums of multisampled texture and texStorage2DMultisampleANGLE
API.

TEST=angle_end2end_tests.exe --gtest_filter=TextureMultisampleTest*
TEST=angle_end2end_tests.exe --gtest_filter=NegativeTextureMultisampleTest.Negtive*

BUG=angleproject:2275

Change-Id: I2cab997edc33aa2d0be6082381545335423f64e0
Reviewed-on: https://chromium-review.googlesource.com/c/804613
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-22 02:53:04 +00:00
Olli Etuaho 624fbdcf55 Refactor CompileProgram utility
Tests often need to call gl functions to set up program related state
after glCreateProgram has been called but prior to glLinkProgram is
called. Add a callback function to the CompileProgram utility function
to fulfill this need. This reduces code duplication considerably in
several tests.

An alternative way to improve CompileProgram would be to split it into
several different utility functions. This might be slightly easier to
read, but would also be a larger refactoring and require more checks
at the call site.

This will make it easier to implement EXT_blend_func_extended tests,
which need to bind fragment outputs to different slots.

BUG=angleproject:1085
TEST=angle_end2end_tests

Change-Id: I3ac8b7bdc21c6a1f14517bc7df0cf6f35abd7612
Reviewed-on: https://chromium-review.googlesource.com/1254062
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-10-01 20:03:38 +00:00
Jamie Madill b36a4816a5 Vulkan: Add OpenGL line segment rasterization.
Line rasterization rules are implemented using a shader patch. The
patch does a small test and discards pixels that are outside of the
OpenGL line region.

The feature is disabled on Android until we can determine the root
cause of the test failures.

Bug: angleproject:2598
Change-Id: Ic76c5e40fa3ceff7643e735e66f5a9050240c80b
Reviewed-on: https://chromium-review.googlesource.com/1120153
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-09-25 15:05:29 +00:00
jchen10 a155bacf99 ParallelCompile: Parallelize shader translation
This changes to construct a new ShHandle of compiler for each Shader,
and use it to translate the shader source in a background thread.

Bug: chromium:849576

Change-Id: Ib49952c7292321ee6aa1c5996f8f7927f40d8f04
Reviewed-on: https://chromium-review.googlesource.com/1177195
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-09-19 00:49:23 +00:00
Olli Etuaho dff32a0da1 Support multisample arrays in shader programs
The added tests check that using textureSize() and texelFetch() on
textures with a fixed point format return expected results. texelFetch
is also covered for integer format textures.

dEQP GLES 3.1 tests also cover a variety of multisampled array texture
formats.

BUG=angleproject:2775
TEST=angle_end2end_tests, angle_deqp_gles31_tests

Change-Id: I99b422e24b39e3563ed72f0fb85c9c1907df807d
Reviewed-on: https://chromium-review.googlesource.com/1196521
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-09-06 15:44:35 +00:00
Tobin Ehlis 1bf963b629 Clean up PlatformMethods attribute enum
Centralize definition of EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX
in Platform.h.

Bug: angleproject:2528
Change-Id: Id2b022c4ea08d2e98cbd6c3b248b58d096c20dfb
Reviewed-on: https://chromium-review.googlesource.com/1144265
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-08-30 22:20:00 +00:00
Frank Henigman 44b2c0b1d3 Avoid rebase_path() in BUILD.gn.
Adjust source paths so we don't need to use rebase_path() on all of them.

BUG=angleproject:1569

Change-Id: I687dbb9378b1f054eb5664320c662fe4c882a82f
Reviewed-on: https://chromium-review.googlesource.com/1194619
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-30 18:45:22 +00:00
Frank Henigman ddc41208c1 Rename .gypi -> .gni.
Rename and reformat all gyp files.  They were previously converted to
gn but not renamed to preserve continuity in git.  This rename completes
the removal of all traces of gyp.

BUG=angleproject:1569

Change-Id: I50123105d8881583184ffc564bed65d9fbe4d41c
Reviewed-on: https://chromium-review.googlesource.com/1187885
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-29 21:00:11 +00:00
Frank Henigman a7f97a27eb Gyp is dead. Long live gn.
Remove the gyp build.  The .gypi files were not renamed so that diff and
rebase would work on this change.  They will be renamed in a separate
change.

BUG=angleproject:1569

Change-Id: If8a217027633293664b820104f91a4ca5889b24e
Reviewed-on: https://chromium-review.googlesource.com/1187380
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-08-29 19:26:38 +00:00
jchen10 7ae70d8fb3 ParallelCompile: Parallelize D3D linking
This adds a new linking state to Program. If a Program is in linking
state, on the one hand the foreground thread may continue issuing more
GL calls, and on the other hand the background linking threads may be
accessing Program internally too. Without a proper constraint there
must be conflicts between them. For this purpose, we block any further
GL calls to Program until it's actually linked. In addition, we
prohibit parallel linking an active program, so that ProgramD3D does
not have to worry about such similar conflicts.

Also changes the WorkerThread to support limiting the number of
concurrently running worker threads.

BUG=chromium:849576

Change-Id: I52618647539323f8bf27201320bdf7301c4982e6
Reviewed-on: https://chromium-review.googlesource.com/1127495
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-11 10:48:43 +00:00
Omar El Sheikh eb4b869758 Introduced eglMakeCurrent Perf Test
Currently disabled test on android

Also made the default EGL device type be
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE

Updated destroy function of RendererVk to properly
reset the mMemoryProperties member variable

Bug: angleproject:2735
Change-Id: Ie1f8ab1ac93b18eda4c10c3b10ecd4756f1d8543
Reviewed-on: https://chromium-review.googlesource.com/1140508
Commit-Queue: Omar El Sheikh <theoking@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-07-25 18:35:56 +00:00
Geoff Lang 24ddc7a894 WGL: Support unvirtualized contexts and unsafe multithreading.
When using unvirtualized contexts, DisplayWGL still creates a Renderer for
managing any internal GL resources such as emulated back buffers for
DXGISwapChainWindowSurfaceWGL or D3DTextureSurfaceWGL but also creates a new
Renderer for each GL context.  All created contexts share resources.

BUG=angleproject:2464

Change-Id: I945502514079368e062beef70bed49c61ed44403
Reviewed-on: https://chromium-review.googlesource.com/1097459
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-06-21 20:21:27 +00:00
Luc Ferron 071fc3f951 Fix build on Windows using Visual Studio
This is a follow-up of this change:
https://chromium-review.googlesource.com/c/angle/angle/+/1092101

Just to fix a warning that prevents building in Visual Studio
successfully.

Bug: angleproject:2306
Change-Id: Ib87d5cb349019fb6b2d7f75b46552146d41787de
Reviewed-on: https://chromium-review.googlesource.com/1095480
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Luc Ferron <lucferron@chromium.org>
2018-06-11 17:22:22 +00:00
Lingfeng Yang 45b5a8751c GLES1: Texture environment API
BUG=angleproject:2306

Change-Id: Ibb168d5c9f7aa96a48c96ffbe96ecead2276975e
Reviewed-on: https://chromium-review.googlesource.com/1092101
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-06-08 18:41:55 +00:00
Lingfeng Yang d0febe7aa2 Reland "GLES1: Entry points for lighting and materials"
This is a reland of 4a09c1a245

Entry points have been autogenerated again.

Original change's description:
> GLES1: Entry points for lighting and materials
>
> - glLight*/glMaterial and their queries
> - Use new packed enums in these entry points, except for lightmodel
> which stays GLenum to be consistent with other generic glGet's
> - State.cpp: New glGet* queries related to light model and
> light/normal rescale enablement
> - GLES1State.cpp: Functions to get/set lighting/material state
> - Validation for lighting/materials
>
> + Add a few convenience methods to random_utils for sampling
> non-negative floats and a sampler for random booleans
>
> BUG=angleproject:2306
>
> Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e
> Reviewed-on: https://chromium-review.googlesource.com/1065502
> Commit-Queue: Lingfeng Yang <lfy@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

Bug: angleproject:2306
Change-Id: I434273acd5200dd9f4925e239a032cc8db31a434
Reviewed-on: https://chromium-review.googlesource.com/1072849
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
2018-05-25 17:07:04 +00:00
Lingfeng Yang 668e507f99 Revert "GLES1: Entry points for lighting and materials"
This reverts commit 4a09c1a245.

Reason for revert: Seems to break the build

Original change's description:
> GLES1: Entry points for lighting and materials
> 
> - glLight*/glMaterial and their queries
> - Use new packed enums in these entry points, except for lightmodel
> which stays GLenum to be consistent with other generic glGet's
> - State.cpp: New glGet* queries related to light model and
> light/normal rescale enablement
> - GLES1State.cpp: Functions to get/set lighting/material state
> - Validation for lighting/materials
> 
> + Add a few convenience methods to random_utils for sampling
> non-negative floats and a sampler for random booleans
> 
> BUG=angleproject:2306
> 
> Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e
> Reviewed-on: https://chromium-review.googlesource.com/1065502
> Commit-Queue: Lingfeng Yang <lfy@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com

Change-Id: Ifabd708ded87c7484ad6d466508e2c2d6ea2557c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2306
Reviewed-on: https://chromium-review.googlesource.com/1071828
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-05-24 17:40:40 +00:00
Lingfeng Yang 4a09c1a245 GLES1: Entry points for lighting and materials
- glLight*/glMaterial and their queries
- Use new packed enums in these entry points, except for lightmodel
which stays GLenum to be consistent with other generic glGet's
- State.cpp: New glGet* queries related to light model and
light/normal rescale enablement
- GLES1State.cpp: Functions to get/set lighting/material state
- Validation for lighting/materials

+ Add a few convenience methods to random_utils for sampling
non-negative floats and a sampler for random booleans

BUG=angleproject:2306

Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e
Reviewed-on: https://chromium-review.googlesource.com/1065502
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-24 17:04:40 +00:00
Geoff Lang 3b9b027c59 Add basic tests of (unsafe) multithreaded contexts.
BUG=angleproject:2464

Change-Id: Ia0f0788a1bc4d2ecd883b058f15c629cac5fd166
Reviewed-on: https://chromium-review.googlesource.com/1036063
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-07 21:00:48 +00:00
Luc Ferron 94ae660d2c Vulkan: Create tests to validate we created the pipeline when needed
1- Link program with a shader and draw with it, relink with another shader and draw again.
2- Release program that is reading from a uniform.

Bug: angleproject:2397

Change-Id: Icb4211c5cf71efaf41833d9d5afd83ce8410c598
Reviewed-on: https://chromium-review.googlesource.com/1028580
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-01 17:49:58 +00:00
Olli Etuaho 5804dc8ea9 Refactor GL tests to use a shader library
Instead of having the same simple shaders repeated over and over in
the test code, reuse a single shader library.

BUG=angleproject:2474
TEST=angle_end2end_tests

Change-Id: I13f8ca8c0125e6d30f1761639bf8c3f69e0e77d2
Reviewed-on: https://chromium-review.googlesource.com/1012078
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-04-18 13:28:52 +00:00
Geoff Lang 0ab41fa5eb Add an EGL extension to disable GL extensions by default.
BUG=angleproject:2404

Change-Id: I2667ddc92d5c9ef6e0ef115f2fdf0c3d3643d945
Reviewed-on: https://chromium-review.googlesource.com/962702
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-03-14 20:46:16 +00:00
Jiawei Shao 4ed05da293 ES31: Add link validation on geometry shader itself
This patch intends to support program link validation on geometry
shader itself. A link error should occur when linking a program with
a geometry shader that lacks input primitive or output primitive or
the declaration of 'max_vertices'.

This patch also adds the support of linking a program with geometry
shader in angle_end2end_tests.

BUG=angleproject:1941
TEST=angle_end2end_tests
     dEQP-GLES31.functional.shaders.linkage.es31.geometry.varying.rules.unspecified_*

Change-Id: I25fb08514753102f5dd3ab86211c05d2ca4fd185
Reviewed-on: https://chromium-review.googlesource.com/898842
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-02-12 16:43:40 +00:00
Yuly Novikov 6108b766b3 Remove angle::Library and its usages
No longer needed after https://chromium-review.googlesource.com/513519
Loading libGLESv2 interferes with API tracing tools

BUG=angleproject:1892,angleproject:2343

Change-Id: I2ccbc99377d75d107fd644301402c52466dded21
Reviewed-on: https://chromium-review.googlesource.com/910094
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-02-09 22:58:38 +00:00
Jamie Madill 5dd4ad896b Vulkan: Add a perf test for the Pipeline cache.
This micro-benchmark can be used to measure the performance impact
of changing the Pipeline cache. For instance, we can check if changing
the size of the hash key affects performance significantly.

Also updates the build files so angle_perftests can see vulkan.h, and
makes the Vulkan headers an explicit source set.

This test currently shows that a lot of time is spent in PMurmurHash,
with some time also spent in memcmp.

Bug: angleproject:2163
Change-Id: Ie8bb3e31d58590f373d28cbbb59f7e372b80cc29
Reviewed-on: https://chromium-review.googlesource.com/884882
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-01-29 22:32:40 +00:00
Jamie Madill f3e2329595 EGL: Expose NULL driver device selection.
This makes the device type selection part of the ANGLE platform
extension. We currently support NULL driver selection on all
available back-ends (although on the NULL back-end, it already
has no device type). Optionally we could expose certain features
of this as separate extensions.

This currently also supports the old hidden enum, until we can
update Chrome and consolidate to the new exposed official enum.

Bug: angleproject:2159

Change-Id: I85d0811098e644e8192c207673af9e18ed7c1da2
Reviewed-on: https://chromium-review.googlesource.com/846021
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-01-05 00:08:29 +00:00
Frank Henigman 5b1180df68 Add gyp deprecation warning.
gyp_angle now prints a warning every time it is run.
All targets print the same warning as one of their build steps.
The DEPS change updates gypi_to_gn so it doesn't choke on
files with 'target_defaults' sections.

BUG=angleproject:1569

Change-Id: Ibdf277fcc14cf4ebc7b7db78270210752cd8ef9d
Reviewed-on: https://chromium-review.googlesource.com/711155
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2017-12-18 23:04:55 +00:00
Jamie Madill acf2f3adba Apply Chromium style fixes.
This addresses several minor code quality issues that are validated
in Chromium, but not yet applied to ANGLE:

* constructors and destructors must be defined out-of-line
* auto is not allowed for simple pointer types
* use override everywhere instead of virtual
* virtual functions must also be defined out-of-line

Slightly reduces binary size for me (~2k on Win, 150k on Linux).

Bug: angleproject:1569
Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6
Reviewed-on: https://chromium-review.googlesource.com/779959
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-11-22 06:34:40 +00:00
Jamie Madill 1fce3283f0 Samples: Add command line flag to select renderer.
This gives us the ability to test Vulkan without a special recompile,
and keeps the default setting to the default ANGLE renderer. Only
implemented for the hello_triangle sample currently.

Also includes an extra error message for missing EGL config, which is
where the Vulkan init fails right now, due to missing depth/stencil
support.

Also includes a hack to get Vulkan samples running without depth/
stencil.

BUG=angleproject:2167

Change-Id: I6925b9b84956fb69cbf602a828ea95d8c7125b68
Reviewed-on: https://chromium-review.googlesource.com/707688
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-10-10 14:58:03 +00:00
Geoff Lang b433e872c8 Change robust resource init into a context creation attribute.
Enabled support on OpenGL even through the extension is not fully
implemented so that testing with Chromium/Passthrough commmand decoder
is still possible.

BUG=angleproject:1635

Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3
Reviewed-on: https://chromium-review.googlesource.com/678479
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-10-06 14:23:12 +00:00
Olli Etuaho a20af6d7e8 Use C++11 raw string literals instead of SHADER_SOURCE macro
This is better in many ways:
1. It doesn't confuse clang format
2. \n doesn't need to be included after preprocessor directives like
   the version directive.
3. It's using built-in functionality instead of something custom.

Raw string literals should be the preferred way to include shader
source in C++ files going forward.

BUG=angleproject:2157
TEST=angle_end2end_tests

Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f
Reviewed-on: https://chromium-review.googlesource.com/671046
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2017-09-18 15:08:15 +00:00
Jiajia Qin 8a7b3a0ced Reland 'Remove IndexRange retrieving in validation'
This change adds GL_KHR_robust_buffer_access_behavior support.
The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413

BUG=755897, angleproject:1393, angleproject:1463

Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03
Reviewed-on: https://chromium-review.googlesource.com/640750
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-09-05 14:37:18 +00:00
Jamie Madill 401345e4a6 D3D11: Move more state into StateManager11.
This moves the input layout cache and vertex and index data managers
and related info into the state manager. This makes it easier to
manage the state application with regards to dirty bits.

Also updates the dirty current value handling in StateManager11.

BUG=angleproject:1156
BUG=angleproject:2052

Change-Id: I8de968a1f8416363aa1c49d9e9da129942d21275
Reviewed-on: https://chromium-review.googlesource.com/616783
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-08-21 21:12:18 +00:00
Geoff Lang 5505bdc707 Fix Win32Window::takeScreenshot.
Several parts of this function were incorrectly checking for errors or
passing the wrong parameters.  If screenshotting fails, throw an exception
in dEQP so that it is converted to a test failure instead of hanging the
test.

BUG=angleproject:2075

Change-Id: I19b55b273d0d3f1b47c1dac6affca69de8db21e0
Reviewed-on: https://chromium-review.googlesource.com/587300
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-07-26 20:58:00 +00:00
Jamie Madill 222c517f70 Control Debug layers in ANGLE_platform_angle.
Debug layers seem to be a universal thing among functional back-ends.
D3D, OpenGL and Vulkan all need some kind of controls for debugging,
so it seems to make sense to make this control part of the base
extension.

Default the extension to EGL_DONT_CARE, which allows the back-end to
have a lot of flexibility in terms of implementation.

Also enable the extension in the D3D11 and OpenGL back-ends, and set
the extension to enabled for angle_end2end_tests.

Remove EGLVulkanEXTTest since it no longer tests anything not tested
in the base ANGLETest class.

BUG=angleproject:2086

Change-Id: I52d8170effd1846b9afbe6e4052c699fe5cb0de8
Reviewed-on: https://chromium-review.googlesource.com/578369
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2017-07-19 22:18:10 +00:00
Jamie Madill 293e114db2 Add tests for the cache control extension.
A first test verifies the validation of the extension, and a second
compiles a simple shader and checks the cache behaviour.

These tests don't currently run since the extension is disabled,
but they will start running as soon as we expose it.

BUG=angleproject:1897

Change-Id: Id4a76b83090712a267576069b711eeee29aa81dd
2017-07-12 12:01:56 -04:00
Jamie Madill fe54834f9f Proliferate gl::Context.
This enables a few small things: it will enable making the platform
a property of the Display rather than a global. The same goes for the
global logging annotator. Also it ensures all back-end implementations
have access to the GL / EGL state when available.

Also introduces a smart pointer helper class to angleutils for objects
that prefer to be destroyed with a context (gl::Context/egl::Display)
parameter. We were using std::unique_ptr in a few places that would
not work well with these objects.

BUG=angleproject:1156

Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba
Reviewed-on: https://chromium-review.googlesource.com/529706
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-06-19 17:58:28 +00:00
Jamie Madill bd044ed8b1 Defer shader compiles when possible.
When using the program binary memory cache inside ANGLE, this will
give a potential fast path. If the user doesn't query the shader
compile status or info log before calling LinkProgram, then we can
check the program cache before translating the program, and if it
finds a hit, we don't even need to call the translator.

To preserve the shader settings at compile time, a reference to the
current shader translator is kept in a binding pointer on the call
to compile. This mirrors a similar implementation in Chromium's
command buffer. Also the compile options and source are cached at
compile to preserve the correct shader state.

BUG=angleproject:1897

Change-Id: I3c046d7ac8c3b5c8cc169c4802ffe47f95537212
Reviewed-on: https://chromium-review.googlesource.com/517379
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-06-05 20:45:48 +00:00
Jamie Madill 948bbe51db Redesign robust resource init as a display extension.
Also correct the enum allocation to values that are available to ANGLE.

BUG=angleproject:1635

Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e
Reviewed-on: https://chromium-review.googlesource.com/520002
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-06-01 19:19:35 +00:00
Jamie Madill 98de826c92 Platform: Fix initialization order in tests.
Because of the platform refactor in abf3857206 we broke the way
the tests override the D3D workarounds for the tiny depth/stencil bug.

This change passes a pointer to the platform directly in the EGL init
logic, which solves this issue. It also removes all decltype code in
the platform header which might fix the UBSAN problem we were seeing
previously.

Also change a present mode selection error into a warning in the Vk
back-end, since this was being triggered on AMD, but is safe.

BUG=angleproject:2042

Change-Id: Ibbd0c69ce11a840cf4b33c616f56020001e553aa
Reviewed-on: https://chromium-review.googlesource.com/513519
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-05-29 19:30:26 +00:00
Jamie Madill 6811a3160c Use GetPlatformDisplay instead of GetPlatformDisplayEXT.
This will allow us to use EGLAttrib and pass pointers as Display
init parameters if necessary.

BUG=angleproject:2042

Change-Id: Ib0f85d71bc9d3dff2db9453012f40303f3c3bd7c
Reviewed-on: https://chromium-review.googlesource.com/513518
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-05-25 17:52:52 +00:00
Yunchao He f81ce4a374 Refactoring: replace NULL by nullptr for pointers (3rd CL).
This CL mainly handles passing/returning NULL to/from a function.

BUG=angleproject:2001

Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009
Reviewed-on: https://chromium-review.googlesource.com/485060
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-04-25 14:32:47 +00:00
Bryan Bernhart (Intel Americas Inc) 151d5de65f Enable MSAA for texture client buffers
Enhancement to the EGL_ANGLE_d3d_texture_client_buffer extension to
allow use of a shared D3D texture that can be multi-sampled.

BUG=angleproject:1917

Change-Id: Iaf59bbd575a5dfb29345f55b549bc4017bf2d7d0
Reviewed-on: https://chromium-review.googlesource.com/446907
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2017-04-24 16:18:33 +00:00
Jamie Madill e08a1d368e Plumb robust resource init extensions.
This also cleans up a few minor glitches in the extension texts,
and renames the EGL extension for consistency.

It incidentally fixes a bug in our EGL init where we were checking
the wrong client versions for KHR_create_context.

It also implements a new feature for tests which allow them to defer
Context creation until the test body. This allows tests to check for
EGL extension available before trying to create a context with certain
extensions.

BUG=angleproject:1635

Change-Id: I9311991332c357e36214082b16f2a4a57bfa8865
Reviewed-on: https://chromium-review.googlesource.com/450920
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-03-08 00:54:23 +00:00
Tom Anderson 61f0db8e3e Fix GCC build
Change-Id: I30e6e8d82821ed86cc7f53a48b1b23fc0cbf060c
Reviewed-on: https://chromium-review.googlesource.com/446866
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-02-27 19:58:02 +00:00
Geoff Lang feb8c68685 Add extensions to disable client arrays.
Chrome doesn't allow any client data in its command buffer.  Add an ANGLE
extension to request a context that disallows client data.

BUG=602737

Change-Id: If9d5144daea3c629a73562396000df59a671aad3
Reviewed-on: https://chromium-review.googlesource.com/441986
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-02-15 17:31:55 +00:00
Fredrik Hubinette 5714a202bc D3D11: Add RGB10_A2 as a supported EGL pbuffer config format.
Update EGLWindow to select configs that exactly match the requested
config.  Too many tests make assumptions about the default framebuffer's
format.

BUG=angleproject:1662

Change-Id: I4cf8aedf51013ca0f3f40f6bbd40f24a4a90561f
Reviewed-on: https://chromium-review.googlesource.com/419681
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2017-02-01 19:36:29 +00:00
Geoff Lang c5a2a172ee Add EGL_EXT_pixel_format_float support, enables float EGL surfaces.
Add floating point EGL configs for the D3D11 backend.

BUG=angleproject:1707

Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf
Reviewed-on: https://chromium-review.googlesource.com/428294
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-01-30 23:36:54 +00:00
Jamie Madill cc6ac25e95 GLES: Expose OES_mapbuffer in GLES2 on GLES3.
This extension is mandatory for EXT_map_buffer_range support. We can
emulate it using GLES 3.0 core map functionality.

BUG=angleproject:1751

Change-Id: Idba09ce7276603d5556039f4a49aa0b87cae22aa
Reviewed-on: https://chromium-review.googlesource.com/431826
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2017-01-25 22:34:45 +00:00
Jamie Madill dcab56a1b8 Move some file utils to common.
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>
2017-01-05 23:41:59 +00:00
Jamie Madill 80ab03c58d Add angle_white_box_tests for libANGLE render tests.
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>
2017-01-04 19:24:32 +00:00
Jamie Madill 0448ec847d Vulkan: Enable validation layers on request.
Also adds the build files for the Vulkan layers.

The layers are enabled by default for the tests.

BUG=angleproject:1319

Change-Id: I0b442b36312a1299a932922e1c4e39f00801de49
Reviewed-on: https://chromium-review.googlesource.com/367751
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-12-23 20:43:56 +00:00
Jamie Madill a7d12dc7f5 Store uniform block bindings in program binaries.
This affects all back-ends - we weren't saving this. Note that
bindings can only be set after program linking. The spec is fairly
clear in that any programs saved must be loadable and runnable under
the same set of state, which would include block bindings.

Also add validation for zero binary formats in GetProgramBinary.

Also add a workaround for AMD where the block bindings were not
applied properly after link, similarly to our original bug.

This CL also includes a few fixups for GLProgram (raii).

BUG=angleproject:1637

Change-Id: Iae068eb4e1e4c763aa9f9332c033e38708026c8f
Reviewed-on: https://chromium-review.googlesource.com/418393
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-12-13 21:15:17 +00:00
Corentin Wallez 922cbfcb8e common: Add a vector arithmetic helper classes
Change-Id: I2f96baedf10d346eaa150bab04f8f6ca3ba573b9
Reviewed-on: https://chromium-review.googlesource.com/414272
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-12-02 15:28:39 +00:00
Corentin Wallez 7f07caa961 Rename the build/ directory.
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>
2016-11-08 14:48:42 +00:00
Corentin Wallez b526f54104 OSXWindow: ignore deprecated warnings
We can't fix them yet because our continuous testing doesn't compile
with the updated definitions yet.

BUG=angleproject:1598

Change-Id: I40bdeaa6bafbd03b5e3e6c16ac8485e3f488fe59
Reviewed-on: https://chromium-review.googlesource.com/406452
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-11-02 23:33:16 +00:00
Corentin Wallez 1c2faacb3e OSXWindow: Suppress a flaky crash when running end2end tests
For some reason while running the end2end tests, when the application
gets an NSAppKitDefinedEventType with subtype
NSApplicationActivateEventType (and of course window = 0), a null
dereference happens. The crash seems timing dependent, since the root
cause was not found and this is test code, add an ugly suppression.

BUG=angleproject:1570

Change-Id: I3af2188ddae8ca3c0a4458e15a8af01e66215e3f
Reviewed-on: https://chromium-review.googlesource.com/403049
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-10-25 15:51:56 +00:00
Jamie Madill 4c655248b8 D3D11: Fix unreferenced XFB vars getting dropped.
Our for-loop logic was confused so that some unreferenced
transform feedback varyings might get dropped.

BUG=chromium:651493

Change-Id: Id283230da0a47fc647b2a3862da60be5538e439e
Reviewed-on: https://chromium-review.googlesource.com/391945
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-10-04 15:45:38 +00:00
Geoff Lang f41a7151a5 Add an extension to disable resource generation on bind.
BUG=angleproject:1518

Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9
Reviewed-on: https://chromium-review.googlesource.com/386799
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-09-23 14:16:37 +00:00
Geoff Lang c287ea6e0a Add WebGL validation extensions to ANGLE.
BUG=angleproject:1523

Change-Id: I6fecb5055ed8087665aeee34b3a066ea8f38d51b
Reviewed-on: https://chromium-review.googlesource.com/386281
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-09-20 15:27:28 +00:00
Corentin Wallez adaeb85ffc Fix standalone tests failing to find angle_util.dylib on Mac
BUG=

Change-Id: I69bddf27c1b019f71382d69c03eba94a268d2025
Reviewed-on: https://chromium-review.googlesource.com/385497
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-09-14 16:39:50 +00:00
Jamie Madill d08163d704 Fix standalone build.
BUG=angleproject:1471

Change-Id: I52aadeb58f75d5b944421bd0cd4a5dddead3f6d1
Reviewed-on: https://chromium-review.googlesource.com/379916
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-09-01 20:47:12 +00:00
Yuly Novikov e3352f94a1 Change angle_util to be a shared library
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>
2016-08-30 20:50:59 +00:00
Martin Radev 4c4c8e7252 Add compute program compilation and linking support
Compute shaders can be now compiled and linked to create programs.
Some tests are added to verify successful and unsuccessful compute
shader linking.

The patch also replaces std::array<int, 3> with a custom struct
WorkGroupSize.

BUG=angleproject:1442

TEST=angle_end2end_tests
TEST=angle_unittests

Change-Id: I4ab0ac05755d0167a6d2a798f8d7f1516cf54d84
Reviewed-on: https://chromium-review.googlesource.com/366740
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-08-26 09:51:18 +00:00
Yuly Novikov 55033e583b Revert "Change angle_util to be a shared library"
This reverts commit 2f9b5e6f79.

Change-Id: I90a7ba0596e79795c9549bc268eabff69c96d572
Reviewed-on: https://chromium-review.googlesource.com/376079
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-08-25 18:12:11 +00:00
Yuly Novikov 2f9b5e6f79 Change angle_util to be a shared library
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>
2016-08-24 21:01:16 +00:00
Yuly Novikov ca05a08160 Compile deqp_gles2 on Android
Add some missing functions,
modify preprocessor conditions and build files
to include some other missing functions when building for Android.

BUG=angleproject:1471

Change-Id: Iadc0a0b9fed2444b8bc9a894ee65c8b66ea7f3c9
Reviewed-on: https://chromium-review.googlesource.com/368982
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-08-24 00:25:40 +00:00
Yuly Novikov a6426d6753 Android GL backend and end2end tests
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>
2016-06-07 02:19:07 +00:00
Yuly Novikov 87ae8cdf04 Fix Linux standalone compilation.
simple_texture_2d, hello_triangle, stencil_operations, simple_texture_cubemap
fail to compile after https://chromium-review.googlesource.com/342050.

BUG=angleproject:1319
TEST=ninja -C out/Release all

Change-Id: Ib70008036f8688b737f3f40b5224437a7afdea19
Reviewed-on: https://chromium-review.googlesource.com/346121
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-05-20 00:48:21 +00:00
Jamie Madill 776a75b45c Make Platform errors trigger test failures.
This can be useful in the Vulkan back-end to make validation layer
errors cause test cases to fail.

BUG=angleproject:1319

Change-Id: I523f3c874e892a2646600e4c5c554319ed8d770c
Reviewed-on: https://chromium-review.googlesource.com/342050
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-05-17 20:32:36 +00:00
Frank Henigman 538281f6e0 Initial Chrome OS support.
Samples and end2end tests mostly work.  Only one config, and no input.

BUG=angleproject:1297

Change-Id: I5b69babccc5b97e486d86e1721a0a1740ad80941
Reviewed-on: https://chromium-review.googlesource.com/319460
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2016-05-12 17:37:35 +00:00
Frank Henigman 7d52be028d Move -lrt where it belongs.
Only deqp uses librt so the dependency belongs there, not in util.gyp,
and the condition should be OS==linux, not use_x11.
This lets things work on Chrome OS.

BUG=angleproject:1297

Change-Id: If397da5463b9c2d5217eb3b20841fa5a44bf56a3
Reviewed-on: https://chromium-review.googlesource.com/334813
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2016-03-29 21:31:48 +00:00
Olli Etuaho 67946766c1 Improve info log length checks
Extend the info log length checks to shader_utils used by tests, and
treat info log with length 1 as empty, since it can only include the
null terminator. At least the Intel GL driver may generate "\0" as
info log in some situations, for example when compiling a user-defined
function with 50000 parameters.

BUG=angleproject:1323

Change-Id: I00f2965539ec235cb949c80c2a9e1d063d32fa15
Reviewed-on: https://chromium-review.googlesource.com/331461
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2016-03-08 17:33:15 +00:00
Austin Kinross 2a63b3f860 Re-land "Implement EGL_experimental_present_path_angle"
- Re-land with clang fix.

This allows ANGLE to render directly onto a D3D swapchain in the correct
orientation when using the D3D11 renderer.

The trick is to add an extra uniform to each shader which takes either
the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this
value to -1.0. When rendering to the default framebuffer, ANGLE sets
this value to +1.0. ANGLE multiplies vertex positions by this value in
the VS to invert rendering when appropriate. It also corrects other
state (e.g. viewport/scissor rect) and shader built-in values
(e.g. gl_FragCoord).

This saves a substantial amount of GPU time and lowers power
consumption. For example, the old method (where ANGLE renders all
content onto an offscreen texture, and then copies/inverts this onto the
swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame
on a Lumia 630.

Verification:
+ dEQP GL ES2 tests pass when "present path fast" is enabled
+ all ANGLE_end2end_tests pass when "present path fast" is enabled

BUG=angleproject:1219

Change-Id: I56b339897828753a616d7bae837a2f354dba9c63
Reviewed-on: https://chromium-review.googlesource.com/326730
Tryjob-Request: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-02-08 21:05:16 +00:00
Jamie Madill d1c46228ef Revert "Implement EGL_experimental_present_path_angle"
Compile failure on Clang/Win:

The reason for reverting is: FAILED: ninja -t msvc -e environment.x86 --
"..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo
/showIncludes /FC
@obj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj.rsp
/c ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp
/Foobj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj
/Fdobj\gpu\angle_end2end_tests.cc.pdb 
In file included from
..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp:7:
In file included from
..\..\third_party\angle\src\tests\test_utils/ANGLETest.h:13:
..\..\testing\gtest\include\gtest/gtest.h(1392,16) :  error: comparison of
integers of different signs: 'const int' and 'const unsigned int'
[-Werror,-Wsign-compare]
  if (expected == actual) {
      ~~~~~~~~ ^  ~~~~~~
..\..\testing\gtest\include\gtest/gtest.h(1422,12) :  note: in instantiation of
function template specialization 'testing::internal::CmpHelperEQ<int, unsigned
int>' requested here
    return CmpHelperEQ(expected_expression, actual_expression, expected,
           ^
..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp(281,9) :
 note: in instantiation of function template specialization
'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here
        ASSERT_EQ(mWindowWidth * 4, mappedSubresource.RowPitch);
        ^
..\..\testing\gtest\include\gtest/gtest.h(1960,32) :  note: expanded from macro
'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                               ^
..\..\testing\gtest\include\gtest/gtest.h(1943,67) :  note: expanded from macro
'GTEST_ASSERT_EQ'
                      EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                                                  ^

BUG=angleproject:1219

This reverts commit 6b3c1db517.

Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6
Reviewed-on: https://chromium-review.googlesource.com/326680
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-02-08 14:51:45 +00:00
Austin Kinross 6b3c1db517 Implement EGL_experimental_present_path_angle
This allows ANGLE to render directly onto a D3D swapchain in the correct
orientation when using the D3D11 renderer.

The trick is to add an extra uniform to each shader which takes either
the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this
value to -1.0. When rendering to the default framebuffer, ANGLE sets
this value to +1.0. ANGLE multiplies vertex positions by this value in
the VS to invert rendering when appropriate. It also corrects other
state (e.g. viewport/scissor rect) and shader built-in values
(e.g. gl_FragCoord).

This saves a substantial amount of GPU time and lowers power
consumption. For example, the old method (where ANGLE renders all
content onto an offscreen texture, and then copies/inverts this onto the
swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame
on a Lumia 630.

Verification:
+ dEQP GL ES2 tests pass when "present path fast" is enabled
+ all ANGLE_end2end_tests pass when "present path fast" is enabled

BUG=angleproject:1219

Change-Id: Ib6eeea46bafa6ebce4adada0ae9db3a433b8fc4c
Reviewed-on: https://chromium-review.googlesource.com/321360
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-02-05 20:14:18 +00:00
Corentin Wallez 5c8966911d X11Window: fix the behavior of setVisible
An obvious bug crept in setVisible where setVisible(true) twice would
end up hiding the window.

BUG=angleproject:1145

Change-Id: Iea8ca3de4ab8c05e6da66fb04c8d377824547b41
Reviewed-on: https://chromium-review.googlesource.com/324090
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>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-01-28 15:18:01 +00:00
Jamie Madill f83cbc6531 Use std::random functions for test and samples RNG.
These standard functions are much more powerful than the C random()
routines. Use them to improve the random utils, and use a class
to clean things up further.

This fixes a problem I was having using random_utils where I was
having trouble generating random 32 bit unsigned integers.

BUG=angleproject:1290

Change-Id: I5081764053d0667a4e323553b7dea531256aa778
Reviewed-on: https://chromium-review.googlesource.com/323440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2016-01-26 19:37:18 +00:00
Jamie Madill 60ec6ea703 Implement dirty bits for Framebuffer.
The dirty bits set the stage for performance improvements in D3D, but
don't actually reduce any of the redundant work just yet.

BUG=angleproject:1260

Change-Id: Ib84e6a9b7aa40c37c41790f492361b22faaf4742
Reviewed-on: https://chromium-review.googlesource.com/318730
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2016-01-25 20:34:18 +00:00
Frank Henigman 82e3f3de8e Cast display parm for eglGetPlatformDisplayEXT.
The native display parameter to eglGetPlatformDisplayEXT has type void*.
When building with -DUSE_OZONE the native display type is intptr_t so
a cast is needed.

BUG=angleproject:1297

Change-Id: I947f5f9016926b6e3d590a2e29b5ee1fc883384d
Reviewed-on: https://chromium-review.googlesource.com/323471
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Tested-by: Frank Henigman <fjhenigman@chromium.org>
2016-01-25 18:43:37 +00:00
Corentin Wallez 7acd7354a5 Revert "Revert "OSXWindow: fix window size and position computations""
This reverts commit 67d810449c.

Change-Id: I4fcaffeb161d22c1cea72fd764461b0c38024e01
Reviewed-on: https://chromium-review.googlesource.com/322214
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-21 15:26:00 +00:00
Corentin Wallez 67d810449c Revert "OSXWindow: fix window size and position computations"
This reverts commit 3408753302.

Change-Id: Ide87d79791aa37095127f048929e1b7a925259ab
Reviewed-on: https://chromium-review.googlesource.com/322391
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-19 15:29:19 +00:00
Corentin Wallez 3408753302 OSXWindow: fix window size and position computations
Also improve debug messages in window_test.

BUG=angleproject:1273

Change-Id: Ie47dc1d7ad3be5a55d2a199334bba606f2b45ad0
Reviewed-on: https://chromium-review.googlesource.com/322350
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-18 15:35:05 +00:00
Geoff Lang 732703e6bf Don't duplicate calls to X11Window's setVisible.
Calling setVisible multiple times in a row can cause a hang while
X11Window waits for events that will never be generted.

Change-Id: I43af8d4c79c7010dae78aa38c9716ed5b7b02865
Reviewed-on: https://chromium-review.googlesource.com/322380
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2016-01-15 19:06:21 +00:00
Geoff Lang 70d0f4996a Implement GL_KHR_debug.
BUG=angleproject:520

Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784
Reviewed-on: https://chromium-review.googlesource.com/319830
Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2016-01-02 15:09:23 +00:00
Geoff Lang 66988745f2 Revert "Implement GL_KHR_debug."
This reverts commit 6c521b7a70.

Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee
Reviewed-on: https://chromium-review.googlesource.com/319820
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-12-22 19:39:40 +00:00
Geoff Lang 6c521b7a70 Implement GL_KHR_debug.
BUG=angleproject:520

Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8
Reviewed-on: https://chromium-review.googlesource.com/317820
Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-12-22 15:36:53 +00:00
Sam Clegg 31aabdfbc0 gyp: Always use pkg-config wrapper
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>
2015-12-18 14:49:29 +00:00
Jamie Madill 90c253a616 Add an instancing perf test.
BUG=526217
BUG=angleproject:1164

Change-Id: Ia353a3b2fa0ab0e8b7fd15d72bb63e5ecb7833b1
Reviewed-on: https://chromium-review.googlesource.com/301469
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-12-16 14:04:14 +00:00
Corentin Wallez f33b58d0b7 Win32Window: Implement Event::EVENT_MOUSE_ENTERED
BUG=angleproject:1000

Change-Id: I9b61564fa086318c3ffa9a6b85bb100c52cfad54
Reviewed-on: https://chromium-review.googlesource.com/316590
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-12-14 19:47:23 +00:00
Jamie Madill 508a5b7d7d Windows: Write test name in debug log.
This helps isolate particular debug log messages to specific tests.

BUG=angleproject:667

Change-Id: I6be37d50cc41a13abbceb395e6e9b603bd44c7bd
Reviewed-on: https://chromium-review.googlesource.com/316611
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-12-09 19:16:58 +00:00
Corentin Wallez 3d677ea685 Implement EGL_ANGLE_x11_visual
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>
2015-12-01 18:50:33 +00:00
Jamie Madill 9fc3682c57 D3D: Rework varying packing code.
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>
2015-11-18 19:23:25 +00:00
Corentin Wallez b0228e1812 OSXWindow fix a use after free of the WindowDelegate
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>
2015-10-29 14:16:47 +00:00
Corentin Wallez 8fc63104cf OSXWindow release the tracking area instead of deallocing it
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>
2015-09-30 20:46:04 +00:00
Jamie Madill ad60e8ee26 Move more sample_util sources to util.
These sample utils can also be useful for writing perf tests.

BUG=angleproject:1164

Change-Id: I44b5d63b57bfce7a541442fd02cd729a1bab17f0
Reviewed-on: https://chromium-review.googlesource.com/301468
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-09-28 19:00:21 +00:00
Austin Kinross 9f2fd2b40d Add WinrtWindow.cpp and WinRT version of angle_util
Change-Id: If4ff4b966f5bd388d32c72a2d1bcf9cf29e6032d
Reviewed-on: https://chromium-review.googlesource.com/297308
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
2015-09-21 17:15:02 +00:00
Corentin Wallez 27593e05e3 Implement missing util/ functions on Mac
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>
2015-09-16 20:22:46 +00:00
Corentin Wallez 83634d6b61 Revert "Implement missing util/ functions on Mac"
This reverts commit 959e197c84.

BUG=

Change-Id: I71ea2894c74be8fda80a59c99bc53f4fcb7e9115
Reviewed-on: https://chromium-review.googlesource.com/299873
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-16 20:13:19 +00:00
Corentin Wallez 959e197c84 Implement missing util/ functions on Mac
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>
2015-09-16 17:48:07 +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 <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-15 17:07:24 +00:00
Corentin Wallez 2f29d78b53 Use SDKROOT in the paths to OSX framework to match Chromium
BUG=angleproject:891

Change-Id: I458a12bd6b4be3b262d76184c51bde1f2b803c67
Reviewed-on: https://chromium-review.googlesource.com/299730
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-14 23:44:02 +00:00
Corentin Wallez f0ca9a0c58 Remove the usage of some c++11 library features
That were causing compilation error in Chromium Mac builds

BUG=angleproject:891

Change-Id: I45777451b300928e8c8d232a5b7ecffa7f1c3cbe
Reviewed-on: https://chromium-review.googlesource.com/299721
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-14 21:56:01 +00:00
Corentin Wallez 178e59741b In Chromium Mac builds do not find cstdint, use stdint.h instead
BUG=angleproject:891

Change-Id: Idf2a89ad26955df3579bb2c1883137589f68f573
Reviewed-on: https://chromium-review.googlesource.com/299720
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-14 20:43:53 +00:00
Corentin Wallez b3c6a992ed OSXWindow::setMousePosition add a workaround for OSX 10.6 SDK
-[NSWindow convertRectToScreen] was introduced in OSX 10.7, use
convertBaseToScreen instead for OSX 10.6

BUG=angleproject:891

Change-Id: I255a71d98bc9bf22735a7cb8b9ce1ea24061742f
Reviewed-on: https://chromium-review.googlesource.com/299722
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-14 20:08:47 +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 <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
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 <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
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 <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2015-09-10 14:41:21 +00:00
Geoff Lang 5ade8459ad Properly check for EGL_KHR_create_context before creating ES3 context.
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>
2015-09-03 15:10:22 +00:00
Corentin Wallez beb81589d0 Make the end2end tests compile in the GN build.
BUG=angleproject:929

Change-Id: Ifc5ad03579c3e187721842f7585f3f06b69cbf45
Reviewed-on: https://chromium-review.googlesource.com/296682
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-02 20:46:28 +00:00
Jamie Madill ca03b35c19 Re-land "Compute packed varyings in ProgramD3D only."
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>
2015-09-02 17:59:51 +00:00
Jamie Madill c437046ffc Revert "Compute packed varyings in ProgramD3D only."
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>
2015-09-01 17:27:57 +00:00
Jamie Madill 532061bbfb Compute packed varyings in ProgramD3D only.
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>
2015-09-01 12:39:01 +00:00
Corentin Wallez 254fceac12 Fix two leaks and a delete vs delete[] reported by ASAN
BUG=angleproject:1137

Change-Id: Ic654b79aa56ae0c0a24097b85ab48f5af53ca1f7
Reviewed-on: https://chromium-review.googlesource.com/295154
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-08-25 21:20:24 +00:00
Cooper Partin 4d61f7edad Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'
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>
2015-08-13 13:28:42 +00:00
Cooper Partin 8168b4bd53 Fixed compiler warning C4838 'conversion from size_t to LONG requires a narrowing conversion'.
BUG=angleproject:1119

Change-Id: I2c879193dc122e6c45d0462abc91f39f5d332506
Reviewed-on: https://chromium-review.googlesource.com/292156
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-08-11 14:56:14 +00:00
Corentin Wallez b2e33b9026 X11Window::initialize remove a small code redundancy
BUG=

Change-Id: Id5f98332129b3cc854254187b494bf6a97921dbd
Reviewed-on: https://chromium-review.googlesource.com/289272
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-28 21:14:11 +00:00
Daniel Cheng 5bb9af2aab Fix a -Wswitch warning in ANGLE.
BUG=505308

Change-Id: I34ae3aa65ce55c4e04eecfef3c9cde9841e47140
Reviewed-on: https://chromium-review.googlesource.com/288245
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Daniel Cheng <dcheng@chromium.org>
2015-07-24 18:59:37 +00:00
Corentin Wallez f3357ee2ba EGLWindow: remove the unused width and height
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>
2015-07-23 15:25:26 +00:00
Geoff Lang 63046e2ba2 Add helpers for checking EGL extension availablity in tests.
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>
2015-07-21 20:05:15 +00:00
Corentin Wallez a6d4e601a8 X11Window::resize wait for the window to be resized before returning
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>
2015-07-17 14:59:53 +00:00
Corentin Wallez 40888aab89 EGLWindow: correctly retrieve mAlphaBits
BUG=angleproject:1065

Change-Id: I1e396d1bd4d1c65edc3ad07bb32f895135d59474
Reviewed-on: https://chromium-review.googlesource.com/285180
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-15 21:58:31 +00:00
Corentin Wallez 31658f9206 Implement OSXWindow.
BUG=angleproject:891

Change-Id: If8aefa4a37ba7d1b6b08921bee61463bb20550af
Reviewed-on: https://chromium-review.googlesource.com/285834
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-15 21:18:48 +00:00
Corentin Wallez 0dce07bc7d X11Window: Add missing handling of Keypad's '5' key.
BUG=angleproject:891

Change-Id: Icb0dc3449db6982979a93a394fb9e0c58413a256
Reviewed-on: https://chromium-review.googlesource.com/285836
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-15 20:33:11 +00:00
Corentin Wallez b29690a62a OSWindow: small fix to the formatting of key event debugging
BUG=

Change-Id: I09ab785311ec0fa7f3eecb6484a965378a1fef0d
Reviewed-on: https://chromium-review.googlesource.com/285835
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-15 20:29:46 +00:00
Corentin Wallez 3ebfcd62fd OSWindow: add KeyEvent debugging
BUG=angleproject:892

Change-Id: I35288ff43fb7a50a327047eacb8f41ca91e2b441
Reviewed-on: https://chromium-review.googlesource.com/283471
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-08 17:59:00 +00:00
Corentin Wallez 2be6405d51 X11Window: handle key presses and releases
BUG=angleproject:892

Change-Id: I66690ba49789faa672f6ed58e9eb8a2482eb4f6d
Reviewed-on: https://chromium-review.googlesource.com/283472
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-07-07 15:57:45 +00:00
Cooper Partin 1bd7dd45f9 Added 16-bit formats to GLConfigs to reduce offscreen texture memory usage.
BUG=angleproject:1042

Change-Id: I7024bd47601a21b08cafbf6460d512151b53d035
Reviewed-on: https://chromium-review.googlesource.com/277002
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-07-03 13:16:26 +00:00
Sam McNally fa2f73fd68 Fix a tautological comparison.
BUG=505309

Change-Id: I0e93139693206e766b91a5998d6e284c7a29fd14
Reviewed-on: https://chromium-review.googlesource.com/282450
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-06-29 14:01:18 +00:00
Corentin Wallez 87bef77c16 Compile end2end tests on MacOS
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>
2015-06-26 17:51:51 +00:00
Corentin Wallez 524452868f Add a OSPixmap class to have cross platform pixmaps
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>
2015-06-19 18:29:12 +00:00
Corentin Wallez ce991cf67f Add OSWindow::takeScreenshot to be used by some dEQP egl tests
This helps make dEQP support platform agnostic

BUG=angleproject:892

Change-Id: Ifd9436caa8c79018a053c27e32b514ef9ebee707
Reviewed-on: https://chromium-review.googlesource.com/273596
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-06-19 18:27:50 +00:00
Corentin Wallez 3c85635de1 Add SetLowPriorityProcess to utils and use it in dEQP support
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>
2015-06-19 18:09:49 +00:00
Jamie Madill 8e695edb8b Fix support for GL_MAX_ATTRIBS attributes.
*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>
2015-06-15 21:42:44 +00:00
Geoff Lang dd323e9568 Only run tests that the current hardware can support.
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>
2015-06-10 21:12:57 +00:00
Jamie Madill 39fcf2636a Use both null and real renders for draw call perf.
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>
2015-06-09 15:30:55 +00:00
Jamie Madill ce232678da Add a perf test for eglInitialize.
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>
2015-05-29 17:54:00 +00:00
Geoff Lang 4031b99416 Don't enable opengl on linux unless x11 is also available.
BUG=493682

Change-Id: I10d5b710fcc9b51160c3aff169d1af839212003c
Reviewed-on: https://chromium-review.googlesource.com/273976
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-05-29 15:37:32 +00:00
Corentin Wallez 51e2ad1457 Do not always use X11 for Linux builds, inherit Chromium's settings
This fixes project generation for Chromium for non-X11 builds

BUG=angleproject:1011

Change-Id: If528f63fb186d834d56a43ca379497d99e74777e
Reviewed-on: https://chromium-review.googlesource.com/273163
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-05-27 17:13:29 +00:00
Corentin Wallez 5c798fe97d Enable OcclusionQueriesTest on Linux
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>
2015-05-27 14:29:34 +00:00
Corentin Wallez db39e7f5dd Rename path_utils to system_utils
For inclusion of Sleep

BUG=angleproject:892

Change-Id: I1a9491102e9943d945eef0ba372a6779c30cd311
Reviewed-on: https://chromium-review.googlesource.com/273131
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-25 15:07:05 +00:00
Corentin Wallez fb28d3c5bd X11Window: handling of ConfigureNotify, work when reparented
BUG=angleproject:892

Change-Id: Ib201a5fbf4fca39c90464ed76434dac5e5ded381
Reviewed-on: https://chromium-review.googlesource.com/272683
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-22 17:16:22 +00:00
Corentin Wallez 5b2545bf24 Correct LinuxTimer time calculations
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>
2015-05-22 17:03:01 +00:00
Corentin Wallez 91c2fadfe6 Fix more warnings in samples and tests
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>
2015-05-19 14:38:33 +00:00
Corentin Wallez 4b6945a434 Add -lrt and -ldl to link flags on Linux builds
BUG=angleproject:892

Change-Id: Ic06b493cbfdc061565d94d98aabfc3b1f2d882c6
Reviewed-on: https://chromium-review.googlesource.com/271275
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-15 14:41:13 +00:00
Corentin Wallez 3730f644b2 Make X11Window::setVisible block until the window is mapped.
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>
2015-05-14 20:29:54 +00:00
Corentin Wallez 1f67547bb3 EGLWindow: remove redundant EGL_NONE to finish attrib list.
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>
2015-05-14 17:05:16 +00:00
Corentin Wallez 43b0c221cc X11Window: implement event handling and modifiers
BUG=angleproject:892

Change-Id: I65f251abdd28b273e2d3d574825f20bba8bb2532
Reviewed-on: https://chromium-review.googlesource.com/270452
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-12 17:43:05 +00:00
Corentin Wallez 938f1ca341 OSWindow: add optional debugging of events received
BUG=angleproject:830

Change-Id: Icd854ee152f15ec1de4293b5ed2ed49cb1a5fc2b
Reviewed-on: https://chromium-review.googlesource.com/270451
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-12 15:20:48 +00:00
Corentin Wallez 12fe4dc8ce Fix pointer to int conversion warning in EGLWindow.cpp
BUG=angleproject:892

Change-Id: Ic40f29c811d18efea0e081c269ca43d0170488a4
Reviewed-on: https://chromium-review.googlesource.com/269122
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/270125
2015-05-11 14:59:38 +00:00
Jamie Madill fa05f6076e Use value-paramaterized tests instead of by type.
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>
2015-05-08 19:12:52 +00:00
Corentin Wallez 2cf30bd09c Fix GetExecutablePath on Linux
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>
2015-05-08 17:14:02 +00:00
Corentin Wallez bf9e40509a EGLWindow: specify the device type only on d3d platform
BUG=angleproject:892

Change-Id: I0406e26910f5a012ccb9e533af18e831522161b1
Reviewed-on: https://chromium-review.googlesource.com/269666
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/269827
2015-05-07 17:49:55 +00:00
Corentin Wallez ec0b13622a Make util/win32 follow ANGLE conventions better
BUG=angleproject:892

Change-Id: I1ad366e16b135649fe1b0351081f9971db84df50
Reviewed-on: https://chromium-review.googlesource.com/269665
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-07 17:21:40 +00:00
Jamie Madill 4ea209f129 Revert "EGLWindow: specify the device type only on d3d platform"
Causing failures in EGLSurfaceTest.MakeCurrentTwice on Windows

BUG=angleproject:892

This reverts commit 118e7195fd.

Change-Id: Ifbb17d1c9bc0390abadbfb8f78cf14dbf1bb8e83
Reviewed-on: https://chromium-review.googlesource.com/269950
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-05-07 15:32:38 +00:00
Corentin Wallez 118e7195fd EGLWindow: specify the device type only on d3d platform
BUG=angleproject:892

Change-Id: I2dda3a8d15e58d15a401258a5a64c5783ea1a132
Reviewed-on: https://chromium-review.googlesource.com/269666
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-07 15:01:35 +00:00
Corentin Wallez fe2f3d634d Add a basic support for Linux for utils/
* Timer and path utils are done.
* Window only implements initialize and setVisible

BUG=angleproject:892

Change-Id: I3f49b68ef9ec5be324b25e211199bac2953ae11e
Reviewed-on: https://chromium-review.googlesource.com/269520
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-07 15:01:04 +00:00
Jamie Madill c07c43e43f Revert "Fix pointer to int conversion warning in EGLWindow.cpp"
Causes a compile error.

BUG=angleproject:892

This reverts commit d424da4a4c.

Change-Id: Ieb8bb99d02f7050306974db5dab72d26474891ac
Reviewed-on: https://chromium-review.googlesource.com/268996
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-05-04 18:20:48 +00:00
Corentin Wallez 72196b74f0 Add missing trailing newline before EGLWindow.cpp EOF
BUG=angleproject:892

Change-Id: Iaf175a310ce2acb5a8715902b3d367aa3dae8e2c
Reviewed-on: https://chromium-review.googlesource.com/269124
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 18:09:53 +00:00
Corentin Wallez 75af569cc1 Add missing include in EGLWindow.cpp
BUG=angleproject:892

Change-Id: I23cfbd9cfbe7d41e048a2b2a4eea048f5de72d12
Reviewed-on: https://chromium-review.googlesource.com/269123
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 18:09:42 +00:00
Corentin Wallez d424da4a4c Fix pointer to int conversion warning in EGLWindow.cpp
BUG=angleproject:892

Change-Id: If6f0eb13bca10f9328faeaab35665a67e7ef6e44
Reviewed-on: https://chromium-review.googlesource.com/269122
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 18:09:16 +00:00
Corentin Wallez fc69293423 Fix signed to unsigned integer conversion warning in EGLWindow.h
Change-Id: I7b4249e04c8fb76b60b4c837266b144fbd64cbf6
Reviewed-on: https://chromium-review.googlesource.com/269128
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 17:25:16 +00:00
Corentin Wallez 9946a61e3c Fix text trailing after preprocessor macro warning in util/Event.h
Change-Id: Ie977e6fce0e5e0efeb16f0387bf653bbd2d1cd93
Reviewed-on: https://chromium-review.googlesource.com/269127
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 17:23:58 +00:00
Corentin Wallez 8eb2d14cda Fix 'not all switch case are handled' warning in OSWindow.cpp
Change-Id: Ib4d1e4b04c73e5eb5e0e4f6c56212e99723d2ce0
Reviewed-on: https://chromium-review.googlesource.com/269126
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 17:23:34 +00:00
Corentin Wallez 6ba699a2b0 Add missing include in OSWindow.h
Change-Id: Ie1fd40c308ed9d0d90756e31dfe153f44510defa
Reviewed-on: https://chromium-review.googlesource.com/269125
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 17:23:00 +00:00
Corentin Wallez 96de96b7cd Initialize Win32Timer::mRunning as a bool
Change-Id: I1770684217239bcbdf2bb07f4867e1427577a01f
Reviewed-on: https://chromium-review.googlesource.com/269121
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-05-04 17:19:21 +00:00
Geoff Lang 681ad9d1bb Add a sample that uses multiple windows.
BUG=angleproject:521

Change-Id: I50858193518b4d07edcb2073caaa99ce37fcc4c3
Reviewed-on: https://chromium-review.googlesource.com/267000
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-27 14:00:48 +00:00
Jamie Madill 77a72f6ecf Release Surface when calling makeCurrent with null.
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>
2015-04-14 20:45:57 +00:00
Cooper Partin 97d61eb51c Add extension EGL_ANGLE_device_d3d
Access to the D3D device is needed for some advanced scenarios.
New entry points eglQueryDisplayAttribANGLE and
eglQueryDeviceAttribANGLE have been added in this change
to implement this extension.

BUG=angleproject:935

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

This reverts commit 6dacaff4e0.

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

BUG=angleproject:935

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

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

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

This reverts commit 3b26e231d9.

Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7
Reviewed-on: https://chromium-review.googlesource.com/264983
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-09 17:35:08 +00:00
Minmin Gong 3b26e231d9 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)
Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea
Reviewed-on: https://chromium-review.googlesource.com/264533
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-09 14:05:37 +00:00
Nico Weber 51a1db16d7 Give Timer a virtual destructor as it's deleted polymorphically.
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>
2015-04-06 17:35:28 +00:00
Gregoire Payen de La Garanderie 68694e9941 Add UBO offset support for D3D11.1.
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>
2015-04-01 18:52:18 +00:00
Geoff Lang 90a09b56ce Revert "Add UBO offset support for D3D11.1."
Failed on 32-bit builds.  See: https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Builder/builds/24828/steps/compile/logs/stdio

angle\src\libangle\validationes.cpp(1461) : error C2220: warning treated as error - no 'object' file generated
angle\src\libangle\validationes.cpp(1461) : warning C4018: '<' : signed/unsigned mismatch

This reverts commit 381f969315.

Change-Id: I05f09f19e40046994d34809c5b79095458f56148
Reviewed-on: https://chromium-review.googlesource.com/263474
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-04-01 18:21:45 +00:00
Gregoire Payen de La Garanderie 381f969315 Add UBO offset support for D3D11.1.
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>
2015-04-01 17:33:49 +00:00
Gregoire Payen de La Garanderie 3917f578c7 Revert "Add UBO offset support for D3D11.1."
Was ignoring the uniform block bindings.

This reverts commit 7159ea6778.

Change-Id: Ie7d2b40d3fb2adedd309f1162fb6fd33ab0b4c3c
Reviewed-on: https://chromium-review.googlesource.com/263420
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-04-01 14:20:22 +00:00
Jamie Madill 2d1eea098f Remove shared_utils.h, use angle_common instead.
*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>
2015-04-01 13:38:15 +00:00
Jamie Madill 61a5b33878 Revert "Remove shared_utils.h, use angle_common instead."
Causing a build conflig with Chromium's DISALLOW_COPY_AND_ASSIGN.

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

This reverts commit 3ad467df28.

Change-Id: I0cf13e3bc3af90303a123813052cced0ba086515
Reviewed-on: https://chromium-review.googlesource.com/263159
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-03-31 15:35:21 +00:00
Jamie Madill 3ad467df28 Remove shared_utils.h, use angle_common instead.
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>
2015-03-31 15:16:26 +00:00
Gregoire Payen de La Garanderie 7159ea6778 Add UBO offset support for D3D11.1.
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>
2015-03-30 19:49:13 +00:00