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

124 Коммитов

Автор SHA1 Сообщение Дата
Geoff Lang 7825f6199c Update ANGLE_platform_angle_d3d to use a device type enum instead of WARP bool.
BUG=angle:490

Change-Id: I1555e7f09b23138753e52ddf720d088587f7cadb
Reviewed-on: https://chromium-review.googlesource.com/232104
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-02-23 18:10:47 +00:00
Geoff Lang 15dc05fc49 Only request PostSubBuffer support when the extension is available.
BUG=angle:658

Change-Id: I6828290ef89c57e8c794f0fca6e5991c492b67aa
Reviewed-on: https://chromium-review.googlesource.com/242572
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-02-09 15:05:29 +00:00
Austin Kinross fcbf345b00 Add testfixturetypes.h to util.gyp
Change-Id: I562bdca2c5c693155333a0ce168310be05b37531
Reviewed-on: https://chromium-review.googlesource.com/245741
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
2015-02-03 18:08:28 +00:00
Nico Weber ce8bb2fa58 Improve standards conformance of ANGLE's testing code.
ANGLE's testing code recently got enabled in Chromium's builds. While it
builds fine with cl.exe, it isn't quite standards-conformant and doesn't
build with clang. Fix this.

There were three issues:

1. ANGLE_TYPED_TEST_CASE() is a variadic macro that tries to use
   __VA_ARGS__ as argument to a variadic template and then pass
   that template to another macro. However, [cpp.replace] describes
   that ANGLE_TYPED_TEST_CASE(Test, int, float) should be expanded
   to TYPED_TEST_CASE(Test, ::testing::Types<int, float>) which
   should be interpreted as a "call" of TYPED_TEST_CASE with the
   3 macro arguments `Test`, `::testing::Types<int`, and `float>`.
   As a fix, use a typedef for the variadic template and refer to
   it through the typedef in the macro call.

2. `#version` was used on its own line in a substitution of the
   SHADER_SOURCE macro. [cpp]p1 says that every line starting with
   a `#` is a preprocessing directive, and [cpp.replace]p11 says
   "If there are sequences of preprocessing tokens within the list
   of arguments that would otherwise act as preprocessing directives,
   the behavior is undefined" (with a footnote that this includes
   non-directives -- # followed by unknown text). As a fix, merge the
   `#version` line with the previous line. Now the line doesn't start
   with `#` and things are fine.

3. Unqualified lookup usually doesn't look into dependent bases. If
   this is desired, one usually has to make the call qualified, a
   good explanation for this is at
   http://eli.thegreenplace.net/2012/02/06/dependent-name-lookup-for-c-templates
   cl.exe doesn't implement this rule, and clang tries to emulate
   cl.exe's behavior to a certain extend when in Microsoft mode.
   However, that seems to not work for member templates with explicit
   types (filed http://llvm.org/PR22066 for this, but since it's not
   needed to parse Microsoft headers and not standards-conformant,
   I'm not sure if we'll fix that). As a fix, don't provide an explicit
   type, the inferred type is the same. This is also consistent with
   all the other tests in this file. (We might clean up -Wmicrosoft
   warnings in the future; if so I'll add the explicit this->s that
   are missing in this file when we do.)

BUG=chromium:445406

Change-Id: I77a2f3ab9601a1f0f39b56ed3d05217f123155b8
Reviewed-on: https://chromium-review.googlesource.com/238090
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-01-05 16:11:43 +00:00
Austin Kinross 0dbda057ed Add basic D3D11 Feature Level 9.3 support
Change-Id: I660c74791ddb9917bd4796bb652eefab2a3e4863
Reviewed-on: https://chromium-review.googlesource.com/233660
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
2014-12-09 22:01:05 +00:00
Geoff Lang 0d3683c425 Update ANGLE_platform_angle to allow requesting of Renderer versions.
Added enums to allow users to request major and minor versions of the
underlying API and if a WARP device is used.

BUG=angle:490

Change-Id: I0bfb2ac8d327da28a47cc8e6346300e47ab9538c
Reviewed-on: https://chromium-review.googlesource.com/225081
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-11-03 17:56:14 +00:00
Geoff Lang 7fa245c053 Use a new class name for each window.
If a previous window was not cleaned up properly due to a crash in a
test, the subsequent windows can fail to be created because the class is
not destroyed.  Work around this by always creating a unique class before
creating the window.

Change-Id: Ied6b2818ef03fa12b07111d8204c3c1a6a5bd5ac
Reviewed-on: https://chromium-review.googlesource.com/225080
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2014-10-23 13:58:27 +00:00
Jamie Madill 4119ed3da1 Make OSWindow a non-static member of ANGLETest.
BUG=angle:611

Change-Id: I455e1dd0ad5582191621e316c4808a2d753e9aaa
Reviewed-on: https://chromium-review.googlesource.com/219867
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-10-09 20:32:31 +00:00
Jamie Madill 91f2911f70 Add workaround for Unicode compile error.
Chromium builds define UNICODE, while we don't, which confuses
the built-in IDC_ARROW macro.

With this fix, and http://crbug.com/415983, we can build
angle_perf_tests in Chromium.

BUG=angle:744

Change-Id: I268a7c11a5b5355cb2485bf10faf750972cf4e30
Reviewed-on: https://chromium-review.googlesource.com/220363
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2014-10-09 18:13:07 +00:00
Jamie Madill fc63152a3b Use Chromium perf bot output style for perf test.
The Chromium style output will allow the perf bots to collect data
from our performance tests.

BUG=angle:744

Change-Id: I2ffdace688004edf2918ead2a3e2aa2a6c4daf95
Reviewed-on: https://chromium-review.googlesource.com/220361
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2014-10-09 18:08:22 +00:00
Jamie Madill b4fd0c96d2 Replace usages of std::vector::data in most cases.
In some parts of ANGLE code, we were using std::vector::data to get
a pointer to the first element. Sadly, this is c++11 only, which
isn't currently supported on Chromium. This was causing a breakage
on Android. We should probably refrain from using data except on
D3D-only code, which we know will be Visual Studio.

BUG=angle:767

Change-Id: Ibc10577368435a13f62d74d77c95076482cd8f82
Reviewed-on: https://chromium-review.googlesource.com/220920
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-10-01 21:43:30 +00:00
Austin Kinross 18b931d5e0 Configure Google Tests to run against multiple renderers/GLES versions
BUG=angle:611

Change-Id: I7d43612171c439045038db9ae82fd8716c0b31c6
Reviewed-on: https://chromium-review.googlesource.com/220400
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
2014-09-30 21:51:38 +00:00
Jamie Madill ea0e873313 Add a point sprite benchmark.
This benchmark will attempt to reproduce the slowdown we see
in D3D11 on the turbulenz GPU particles demo.

BUG=angle:705

Change-Id: I9c4c2f09d4282feae30f448fd374cdbb6bceae9b
Reviewed-on: https://chromium-review.googlesource.com/216467
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-09-25 18:40:48 +00:00
Jamie Madill 9e16d40de3 Fix Win32Window::resize breaking angle_tests.
We were messing up the client rect on resize, which caused the
ReadPixels checks to mess up around the window edges. Disabling
the window styles on the test windows masked this bug. Fix this
by using a style-less child window inside the parent window.
This gives us access to window styles for the samples project,
along with the ability to use tiny 1x1 windows for testing.

BUG=angle:730

Change-Id: Ic6dd931df7b4e32fbbcacbb004d3bbc49917f658
Reviewed-on: https://chromium-review.googlesource.com/217024
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-09-10 14:06:51 +00:00
Jamie Madill 33ea2f9776 Added BufferSubData benchmark.
BUG=angle:705

Change-Id: I65d557f35e4c9f1d94853a775330a92b7d428847
Reviewed-on: https://chromium-review.googlesource.com/213810
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-09-02 14:47:00 +00:00
Jamie Madill 0bab342bb6 Fix 64-bit use of Win32Window.
An incorrect call to SetWindowLongPtr was crashing the 64-bit test.

BUG=angle:705

Change-Id: I3815bb0a1308f5e66e74faead37c0ae09f975a10
Reviewed-on: https://chromium-review.googlesource.com/214883
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2014-08-29 19:13:25 +00:00
Jamie Madill 4477109981 Make OSWindow destructor virtual.
BUG=angle:734

Change-Id: I6deb639abc26a314dd890189613e0a3a2e1be1d2
Reviewed-on: https://chromium-review.googlesource.com/214714
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2014-08-28 18:23:22 +00:00
Jamie Madill 5704d6e886 Add some shared utility methods to the utils project.
BUG=angle:730

Change-Id: I268c7f76ee9a14ab82f646ae8ebf4eed100bf86d
Reviewed-on: https://chromium-review.googlesource.com/213509
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-08-27 17:36:58 +00:00
Jamie Madill 62af54670d Use EGLWindow in ANGLETests.
This completes the refactor to use the same code for EGL and OS
Window creation for samples and tests.

BUG=angle:730
TEST=angle_tests

Change-Id: Ib6de89f5bf83c0730a66f662cd1f87351f36a5f7
Reviewed-on: https://chromium-review.googlesource.com/213297
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-08-27 17:36:49 +00:00
Jamie Madill 3757a5ae00 Allow app to specify EGL Window extra parameters.
Extra parameters include pixel bit sizes, swap interval
and if we want multisampling. This gives parity between
the tests and samples EGL creation options.

BUG=angle:730

Change-Id: I68d619c2ea141794f0089456bb6bba3d3b1c2a07
Reviewed-on: https://chromium-review.googlesource.com/213296
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2014-08-26 20:41:02 +00:00
Jamie Madill 83da0ec52f Add OSWindow::setVisible.
BUG=angle:730

Change-Id: I9c9e2f3b694ba57df359906cd8517ede60af632d
Reviewed-on: https://chromium-review.googlesource.com/213294
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2014-08-26 15:50:22 +00:00
Jamie Madill 25f0e5e389 Add a Resize method to OSWindow.
BUG=angle:730

Change-Id: I64106f05eb4188305eb34bbabe7d1cde037e1948
Reviewed-on: https://chromium-review.googlesource.com/213293
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-08-26 15:50:15 +00:00
Jamie Madill 586666ceaa Make the sample app own the OS Window object.
This allows us to use OS Windows and EGL contexts differently
for different implementations - eg, tests and samples.

BUG=angle:730

Change-Id: I65e69fd829c3dbf2f1b406d90045bc296798ebb6
Reviewed-on: https://chromium-review.googlesource.com/213290
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-08-21 20:41:49 +00:00
Jamie Madill 1cfaaf8a3b Add a util project to share between samples and tests.
This code shares the Window and EGL logic between the two
projects.

BUG=angle:730

Change-Id: I8940371226a8f7b02579c332f51679c4a5d0e2a5
Reviewed-on: https://chromium-review.googlesource.com/212799
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2014-08-21 20:41:09 +00:00