Commit Graph
19 Commits
Author SHA1 Message Date
Jamie Madill 360daeef19 Add platform hook for program cache updates.
This will need to be matched with a corresponding browser-side CL.
It will enable writing out binary shaders to disk.

BUG=angleproject:1897

Change-Id: I443281086050b9711b92a034cf37f808dd919007
Reviewed-on: https://chromium-review.googlesource.com/542963
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-06-29 17:16:07 +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 <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-05-29 19:30:26 +00:00
Jiawei-Shao 331f6dbde6 Tighten workaround on unary minus for Intel D3D drivers
This driver bug has been fixed in 20.19.15.4624.

BUG=chromium:644033

Change-Id: I6f621d7c4d4b823da29255f869af84097f4f7c2c
Reviewed-on: https://chromium-review.googlesource.com/476118
Reviewed-by: Yunchao He <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-04-24 14:52:12 +00:00
Jamie Madill abe89c7d32 Tweak platform method signatures.
This works around a limitation in UBSAN which can't handle decltype.
Instead use void * and typedef where appropriate.

BUG=chromium:692274

Change-Id: I4eab796db3aa2e51c0fc558170eb2af61f07223d
Reviewed-on: https://chromium-review.googlesource.com/443885
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-02-16 16:20:22 +00:00
Jamie Madill abf3857206 Remove old C++ ANGLE platform.
Now that the new platform is in place, we can remove the old methods.
Must be landed after https://codereview.chromium.org/2697463003/

BUG=angleproject:1892
BUG=chromium:678870

Change-Id: Ia29a3b120cf3521fc0409019c2e64e4dbc6f460d
Reviewed-on: https://chromium-review.googlesource.com/441274
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-02-15 00:32:55 +00:00
Jamie Madill dbffdfbda8 Fix counting of the new platform methods.
The context pointer was throwing off the count by one.
Also change the type to void * for ease of use.

BUG=angleproject:1892
BUG=chromium:678870

Change-Id: Iffac667f0aa896d9247e9ffddfeb3bc447a9692f
Reviewed-on: https://chromium-review.googlesource.com/441931
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-02-14 01:29:25 +00:00
Jamie Madill b1eeba1f20 Use a C API for the ANGLE platform.
The main purpose of this change is to fix a fuzzer bug where we would
trigger undefined behaviour calling between Chrome and ANGLE. It's
not specced how virtual function calls work if the shared objects are
not directly linked together, and ANGLE and Chrome are not linked.
Replace the old class-style API with a C dispatch table.

Follow-up work will make the Platform owned by the Display instead of
using global variables, but fixing this is a bit tricky.

BUG=angleproject:1892
BUG=chromium:678870

Change-Id: Iad188bc2e50f2b5e4a03ce0de233d686f569c705
Reviewed-on: https://chromium-review.googlesource.com/441273
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-02-13 23:12:23 +00:00
Qin Jiajia 4af4951ff9 Tighten the workaround for B5G6R5 on Intel drivers
This driver bug has been fixed in 20.19.15.4539.

BUG=chromium:644610
TEST=dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgb565*

Change-Id: I37556304ed4f70771fb88b792c01b6be5b3aa294
Reviewed-on: https://chromium-review.googlesource.com/424103
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-05 14:29:01 +00:00
Shao f165f0b4c6 Tighten the workarounds on isnan for Intel drivers
This driver bug has been fixed in 21.20.16.4542.

BUG=chromium:650547

Change-Id: I2a5c7c01bf48d854bd6c4c6a380e57617e00529a
Reviewed-on: https://chromium-review.googlesource.com/422992
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-12-27 19:26:20 +00:00
Jamie Madill 408293f8a4 D3D11: Fix stale SRVs with tiny depth textures.
When the tiny depth texture would get re-created on change, it was
not freeing any cached SRVs which were pointing to the old tex.
Fix this by erasing the cache entry if the texure is recreated.

Also include a test which hooks into the workarounds to force
testing on every platform.

Also narrow the workaround to only apply to depth/stencil textures
which use these mips in GL, rather than D3D, where we always create
a full mip chain.

BUG=angleproject:1664

Change-Id: If0ac396b8847e1bf9b50165e5332da573e9bb3e4
Reviewed-on: https://chromium-review.googlesource.com/421567
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-12-20 16:39:10 +00:00
Jacek Caban 464bfc8638 Use .def file to export functions using dllexport.
BUG=angleproject:1183

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

Change-Id: Iee2ab7e43ef0b98924f5759b5e1b333307052235
Reviewed-on: https://chromium-review.googlesource.com/304501
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-21 16:29:40 +00:00
Jamie Madill e826b9f722 Revert "Fixed compilation on mingw."
This causes some linker warnings. I don't think we should
add linker warnings to Chrome, so reverting this temporarily until
we can land your CL with the correct using of export keywords.

Please re-submit the fixed CL.

This reverts commit 5662732226.

Change-Id: I21fa623af31fac06de6afbefa50c9ea1ec157c15
Reviewed-on: https://chromium-review.googlesource.com/305000
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-09 16:41:41 +00:00
Jacek Caban 5662732226 Fixed compilation on mingw.
Change-Id: I5734f789f25fbc6b9b90f2043459a3a5f72008c4
Reviewed-on: https://chromium-review.googlesource.com/303602
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-06 14:26:18 +00:00
Jamie Madill 2e5797e3cd Log EGL initialize errors to the platform.
This will allow us to show more extended error info in about:gpu
in Chromium.

BUG=angleproject:966
BUG=515229

Change-Id: I24c8f33ac3576395ff13dbf7f4664c649af18e33
Reviewed-on: https://chromium-review.googlesource.com/289590
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-07-31 19:33:27 +00:00
Jamie Madill 72537ef13e Add collection of D3D11 and DXGI stats.
Will require a chromium-side patch to enable boolean histograms.

BUG=angleproject:966
BUG=436191

Change-Id: I3026c73894fbbff521503b377955816a8e831df8
Reviewed-on: https://chromium-review.googlesource.com/271174
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-05-14 17:59:24 +00:00
Jamie Madill ad0a486b94 Add D3D11CreateDevice timing histogram.
This should give us a bound on how much we can improve startup
time in ANGLE on D3D11 across all users.

BUG=angleproject:944
BUG=436191

Change-Id: Ie9047c0424429aecec5f6d7be8e119ebcc53fbe3
Reviewed-on: https://chromium-review.googlesource.com/266524
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-04-20 20:57:09 +00:00
Jamie Madill ae2d8a3af2 Add Platform methods for event tracing.
Event tracing requires pulling in timing counters, so we can sync
with Chromium's timestamps. It may require a bit more tricky stuff
to sync ANGLE's GPU timestamps with trace timestamps, but should
allow us to add GPU trace events in the future.

BUG=chromium:436191
BUG=angleproject:966

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

BUG=466735

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

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

BUG=436191

Change-Id: I05641b89a48a9cff81ced059518fceb5aa6c883b
Reviewed-on: https://chromium-review.googlesource.com/248631
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-02-18 18:21:42 +00:00