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

298 Коммитов

Автор SHA1 Сообщение Дата
Jamie Madill a9f11bf14b GN: Separate out constructor/destructor warnings.
This will allow for the capture/replay sample to disable the warnings.
We'd like to keep them enabled for most of ANGLE code.

Bug: angleproject:3611
Change-Id: I3cc7af26fa54c03cc5b79727e7b403a1b218a903
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869544
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-10-23 05:38:12 +00:00
Le Quyen a48f95abef Move Vulkan GlslangWrapper code to a shared location.
Metal backend will reuse Vulkan's GlslangWrapper code.
The Metal backend will use this code to translate glsl to spirv then
cross compile to Metal Shading Language using spirv-cross.
So the source code of GlslangWrapper should be moved outside vulkan folder.

Bug: angleproject:2634
Change-Id: I208062daf0d77756c9d32cfdab925b7dfdf83e05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1858042
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-23 04:49:21 +00:00
Tobin Ehlis 93121f36a8 Make invalid extension directive a CHROMEOS warning
This change allows extension directive after ESSL1.0 non-preprocessor tokens on CHROMEOS.
CHROMEOS kiosks have a video player that violates this spec requirement so just flagging
as a warning to prevent failed video playback.

Added ANGLE_PLATFORM_CHROMEOS define to build config in order to only make this a warning
on CHROMEOS. Split the ESSL1 & ESSL3 cases back out as ESSL3 had always been an error
on all platforms in the past and so want to keep it that way.

Bug: 1003005
Bug: angleproject:4023
Change-Id: Ia931b3a8dad82dbda4c9c9e49a9c1090116397b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866464
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-10-17 19:38:23 +00:00
Jamie Madill 48aa52f730 Fix broken GN "all_dependent_configs".
This regressed with http://crrev.com/c/1864726 . Only fails in configs
that specify 'use_fuzzing_engine'.

Bug: angleproject:4021
Change-Id: I7cd4ab1d91525074c44a6ea2a9d8c41d9b9e437e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866074
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-17 12:55:53 +00:00
Jamie Madill ed6e230ec6 Vulkan: Re-enable release ASSERTs.
This change will broadcast the release asserts config to all ANGLE
targets. Instead of the ones that inherited from angle_common.

Bug: angleproject:4021
Change-Id: I574b01d47e85004f69fb59856cac7b10f0d8d170
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1864726
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-17 01:22:35 +00:00
Le Quyen d200a77a22 Metal backend skeleton implementation.
Bug: angleproject:2634
Change-Id: I34be82f4a80a6851fecb53a51e069b134d82613a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849079
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-10 17:27:38 +00:00
Jamie Madill 1ba72546da GN: Allow building without /build/ folder.
This will allow for ANGLE to be used in the Skia build.

Bug: angleproject:3943
Change-Id: Idd1840f4445c63e696a7cdcd8b873623b8408306
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1835346
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-10-04 21:10:54 +00:00
Jamie Madill 1f08ab2830 Re-land "GN: Componentize vulkan back-end build."
Re-land fixes angle_end2end_tests disabling Vulkan.

This moves the build configuration into the Vulkan back-end dir.
This should be a little easier to maintain as all Vulkan-related
config is in one place.

Note that this should not interfere with Skia's build as they do
not import the Vulkan back-end sources.

One additional possiblity that this enables is testing other
compile-time permutations of the Vulkan back-end more easily. For
example we could make a simple change to enable compile testing
of the Vulkan back-end with custom command buffers disabled.

Also fixes a few errors affecting less tested configs.

Bug: angleproject:3943
Change-Id: I0161668abcc58fcf529dde120998d4b99445fdd5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838454
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-03 22:22:05 +00:00
Jamie Madill 2328d65ab3 Revert "GN: Componentize vulkan back-end build."
This reverts commit d46e2fb1e3.

Reason for revert: Broke Vulkan angle_end2end_tests.

Bug: angleproject:3954 

Original change's description:
> GN: Componentize vulkan back-end build.
> 
> This moves the build configuration into the Vulkan back-end dir.
> This should be a little easier to maintain as all Vulkan-related
> config is in one place.
> 
> Note that this should not interfere with Skia's build as they do
> not import the Vulkan back-end sources.
> 
> One additional possiblity that this enables is testing other
> compile-time permutations of the Vulkan back-end more easily. For
> example we could make a simple change to enable compile testing
> of the Vulkan back-end with custom command buffers disabled.
> 
> Also fixes a few errors affecting less tested configs.
> 
> Bug: angleproject:3943
> Change-Id: Iaf819936896e4f5d3e6415ed16ab0c940e46cdb6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1829662
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tobin Ehlis <tobine@google.com>

TBR=tobine@google.com,jonahr@google.com,jmadill@chromium.org

Change-Id: I7cf3db4f6b7d8b779625ea2491172bb429b498a9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3943
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1837233
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-03 02:27:17 +00:00
Jamie Madill d46e2fb1e3 GN: Componentize vulkan back-end build.
This moves the build configuration into the Vulkan back-end dir.
This should be a little easier to maintain as all Vulkan-related
config is in one place.

Note that this should not interfere with Skia's build as they do
not import the Vulkan back-end sources.

One additional possiblity that this enables is testing other
compile-time permutations of the Vulkan back-end more easily. For
example we could make a simple change to enable compile testing
of the Vulkan back-end with custom command buffers disabled.

Also fixes a few errors affecting less tested configs.

Bug: angleproject:3943
Change-Id: Iaf819936896e4f5d3e6415ed16ab0c940e46cdb6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1829662
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-10-02 18:37:39 +00:00
Tobin Ehlis f22f16d3c0 Reland "Vulkan: Use VK repos' internal BUILD.gn files"
This is a reland of 552f5fcb0d
There was a missing build dependence causing a build no-op
issue which has now been fixed in the upstream Vulkan Validation
Layer repo.

Primary workaround that need to be re-visted and fixed are:
1. Disabled validation layers on 32-bit Windows
2. Disabled validation layers on 32-bit Android
3. Disabled DebugUtils on Android, using DebugReport instead
4. Using custom VK Loader branch to avoid WDK dependence

Original change's description:
> Vulkan: Use VK repos' internal BUILD.gn files
>
> This retires custom BUILD.gn files for the Vulkan Headers, Tools,
> Validation-Layers, and Loader repos. They now have integrated BUILD.gn
> files so switched ANGLE to use those by default.
> Also Validation Layer, Loader, and Tools repos no longer uses codegen
> so this speeds up the build overall.
> Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer
> to VK_LAYER_KHRONOS_validation unified layer.
>
> This changes includes a temporary workaround to the Vulkan-Loader repo
> to remove its Window's build dependence on WDK. There are plans to
> remove that depenedence in Loader master, but until then we can use
> our custom branch workaround.
> It also includes a custom branch for validation layers that includes
> some build fixes for ANGLE.
> Finally, the layers were crashing on Android when attempting to use
> DebugUtils extension so forcing DebugReport on Android for now.
>
> Bug: angleproject:2449
> Bug: angleproject:3320
> Bug: angleproject:3852
> Bug: angleproject:3924
> Bug: angleproject:3925
> Bug: angleproject:3946
> Bug: chromium:997009
> Bug: chromium:997016
> Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>

Bug: angleproject:2449, angleproject:3320, angleproject:3852
Change-Id: I373ada091a1329db5e304874079428d01ba21d52
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1778302
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-10-01 21:51:34 +00:00
Yuly Novikov 7f506bde16 Revert "Disable swiftshader on Fuchsia"
This reverts commit b67102b194.

Reason for revert: breaks ANGLE roll into Chromium
https://chromium-review.googlesource.com/c/chromium/src/+/1827833
https://ci.chromium.org/p/chromium/builders/try/fuchsia_arm64/391223
https://ci.chromium.org/p/chromium/builders/try/fuchsia_x64/390587

Original change's description:
> Disable swiftshader on Fuchsia
> 
> SwiftShader is not needed on Fuchsia because the platform is expected to
> provide Vulkan on all devices.
> 
> Bug: fuchsia:37278
> Change-Id: I96d49f51dbe473bd032ec966137f35d2df9b6884
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1822863
> Reviewed-by: Michael Spang <spang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

TBR=spang@chromium.org,jmadill@chromium.org,sergeyu@chromium.org

Change-Id: I39dabd1cc8de3bbef2c9fe233270a21de3782900
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: fuchsia:37278
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1828317
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-09-26 23:13:59 +00:00
Sergey Ulanov b67102b194 Disable swiftshader on Fuchsia
SwiftShader is not needed on Fuchsia because the platform is expected to
provide Vulkan on all devices.

Bug: fuchsia:37278
Change-Id: I96d49f51dbe473bd032ec966137f35d2df9b6884
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1822863
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-26 22:17:54 +00:00
Jamie Madill 49fd27d9af Fix SwiftShader to use data_deps.
Using deps instead of data_deps was causing some tests to try and
load vk_swiftshader every test execution. Even if the test was not
using Vulkan in ANGLE.

Fixes the TSAN gpu_unittests in Chromium.

Bug: angleproject:3876
Change-Id: I2acbf02ab9aa39632bc252c12e19da28ad90175d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815910
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-09-23 18:42:23 +00:00
Jamie Madill 8be7a4c7f7 Re-land "Vulkan: SwiftShader integration."
Re-land fixes Win7 configs and placement of the SwiftShader module for
ASAN/TSAN configs.

Adds a new EGL extension for picking SwiftShader when using the Vulkan
back-end. Also cleans up ICD enabling code RendererVk. Also includes a
change to a buffer size necessary to support SwiftShader's minimum
limits.

Bug: angleproject:3876
Bug: b/140251624
Change-Id: I5e16057ac4de07bbdbbd248542b1b9103133294f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1810065
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-21 14:00:27 +00:00
Jamie Madill 2249fef219 Capture/Replay: Move stub implementation to new file.
This lets the MSVC parser work better with FrameCapture.cpp.

Bug: angleproject:3611
Change-Id: I249106dce81a7965684caf1a835f0472b34e8963
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804878
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-21 00:39:55 +00:00
Austin Kinross 11dc16350c Add support for generating UWP (Windows Store) projects again
Until late 2017, ANGLE supported  Windows Store apps on Windows 8.1,
Windows Phone 8.1, and Windows 10 (via the Universal Windows
Platform, aka UWP).

Unfortunately ANGLE deprecated support for Windows Store when it
switched from GYP to GN in 2017. Since then, users have been able
to use Microsoft\angle for their UWP apps but this isn't ideal since
it's based on a 2017 copy of Google\angle.

This PR bring back support for UWPs, so that UWP users can use
Google\angle again. Specifically it:

- Adds support for generating UWP projects via GN
- Adds helper/util functions specific to UWP (they're mostly
similar to the desktop Windows helpers)
- Fixes some existing Windows Store code that's rotted since 2017
- Disables async shader compilation for UWPs, since its
implementation calls wait on the UI thread (which is forbidden
in UWPs)
- Renames 'ANGLE_ENABLE_WINDOWS_STORE' to
'ANGLE_ENABLE_WINDOWS_UWP', since ANGLE only support UWPs now
- Fixes misc other related issues (such as dependencies on D3D9
headers in API-agnostic code)

Note that this doesn't bring back support for Windows/Phone 8.1.

BUG=angleproject:3922

Change-Id: Ia79ae05a5e0e0a0625eb633bf1928722dfd3e85f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811871
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-20 18:08:01 +00:00
Zhenyao Mo db7a36f456 Revert "Vulkan: SwiftShader integration."
This reverts commit 1224802c21.

Reason for revert: https://bugs.chromium.org/p/angleproject/issues/detail?id=3912

Original change's description:
> Vulkan: SwiftShader integration.
> 
> Adds a new EGL extension for picking SwiftShader when using the Vulkan
> back-end. Also cleans up ICD enabling code RendererVk. Also includes a
> change to a buffer size necessary to support SwiftShader's minimum
> limits.
> 
> 32-bit is currently left disabled to work around an issue on AMD Win7.
> 
> Bug: angleproject:3876
> Bug: b/140251624
> Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org

Change-Id: Id7464250f6941b0228a6b2a9bd0349823727275b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3876, b/140251624
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808101
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
2019-09-17 00:22:43 +00:00
Jamie Madill 1224802c21 Vulkan: SwiftShader integration.
Adds a new EGL extension for picking SwiftShader when using the Vulkan
back-end. Also cleans up ICD enabling code RendererVk. Also includes a
change to a buffer size necessary to support SwiftShader's minimum
limits.

32-bit is currently left disabled to work around an issue on AMD Win7.

Bug: angleproject:3876
Bug: b/140251624
Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-16 20:52:55 +00:00
Emircan Uysaler 1552d4d6fb Move to NewCreateImagePipe2Cmd
Bug: angleproject:3905
Change-Id: Id237c049848077acee8eaf491f7aada636764290
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802535
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-09-13 04:11:08 +00:00
Todd Eisenberger a1bf69967a Fuchsia: Migrate to new libasync-loop API
Bug: None
Change-Id: Ieadbe830847068c8e9dc96773dbb9b65c8b9ccd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1783418
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-09-04 01:47:02 +00:00
Shahbaz Youssefi 050b124d78 Reland "Vulkan: Debug overlay"
This is a reland of e54d0f90d1

This was reverted due to a build failure as a result of a missing
virtual destructor in the widget base class.

Original change's description:
> Vulkan: Debug overlay
>
> A debug overlay system for the Vulkan backend designed with efficiency
> and runtime configurability in mind.  Overlay widgets are of two
> fundamental types:
>
> - Text widgets: A single line of text with small, medium or large font.
> - Graph widgets: A bar graph of data.
>
> Built on these, various overlay widget types are defined that gather
> statistics.  Five such types are defined with one widget per type as
> example:
>
> - Count: A widget that counts something.  VulkanValidationMessageCount
>   is an overlay widget of this type that shows the number of validation
>   messages received from the validation layers.
> - Text: A generic text.  VulkanLastValidationMessage is an overlay
>   widget of this type that shows the last validation message.
> - PerSecond: A value that gets reset every second automatically.  FPS is
>   an overlay widget of this type that simply gets incremented on every
>   swap().
> - RunningGraph: A graph of last N values.  VulkanCommandGraphSize is an
>   overlay of this type.  On every vkQueueSubmit, the number of nodes in
>   the command graph is accumulated.  On every present(), the value is
>   taken as the number of nodes for the whole duration of the frame.
> - RunningHistogram: A histogram of last N values.  Input values are in
>   the [0, 1] range and they are ranked to N buckets for histogram
>   calculation.  VulkanSecondaryCommandBufferPoolWaste is an overlay
>   widget of this type.  On vkQueueSubmit, the memory waste from command
>   buffer pool allocations is recorded in the histogram.
>
> Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py
> processes to create an array of bits, which is processed at runtime to
> create the actual font image (an image with 3 layers).
>
> The overlay widget layout is defined in overlay_widgets.json which
> gen_overlay_widgets.py processes to generate an array of widgetss, each
> of its respective type, and sets their properties, such as color and
> bounding box.  The json file allows widgets to align against other
> widgets as well as against the framebuffer edges.
>
> Two compute shaders are implemented to efficiently render the UI:
>
> - OverlayCull: This shader creates a bitset of Text and Graph widgets
>   whose bounding boxes intersect a corresponding subgroup processed by
>   OverlayDraw.  This is done only when the enabled overlay widgets are
>   changed (a feature that is not yet implemented) or the surface is
>   resized.
> - OverlayDraw: Using the bitsets generated by OverlayCull, values that
>   are uniform for each workgroup (set to be equal to hardware subgroup
>   size), this shader loops over enabled widgets that can possibly
>   intersect the pixel being processed and renders and blends in texts
>   and graphs.  This is done once per frame on present().
>
> Currently, to enable overlay widgets an environment variable is used.
> For example:
>
>     $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste
>     $ ./hello_triangle --use-angle=vulkan
>
> Possible future work:
>
> - On Android, add settings in developer options and enable widgets based
>   on those.
> - Spawn a small server in ANGLE and write an application that sends
>   enable/disable commands remotely.
> - Implement overlay for other backends.
>
> Bug: angleproject:3757
> Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

Bug: angleproject:3757
Change-Id: I47915d88b37b6f882c686c2de13fca309a10b572
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1780897
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-09-03 18:33:07 +00:00
Jamie Madill 44a0e73431 Re-enable -Wextra-semi-stmt.
Now that the DEPS roller is fixed this should not be able to
break the CQ.

Bug: angleproject:3128
Change-Id: I0f51b5d8a7b71859cced335ca9bd6ad155637ec5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1781619
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-02 20:38:34 +00:00
Corentin Wallez fc58af4797 Revert "Vulkan: Debug overlay"
This reverts commit e54d0f90d1.

Reason for revert: causes compile failure on Linux CFI bot.

Sample build: https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/14810

Sample log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8903575125463586160/+/steps/compile/0/stdout?format=raw

Original change's description:
> Vulkan: Debug overlay
>
> A debug overlay system for the Vulkan backend designed with efficiency
> and runtime configurability in mind.  Overlay widgets are of two
> fundamental types:
>
> - Text widgets: A single line of text with small, medium or large font.
> - Graph widgets: A bar graph of data.
>
> Built on these, various overlay widget types are defined that gather
> statistics.  Five such types are defined with one widget per type as
> example:
>
> - Count: A widget that counts something.  VulkanValidationMessageCount
>   is an overlay widget of this type that shows the number of validation
>   messages received from the validation layers.
> - Text: A generic text.  VulkanLastValidationMessage is an overlay
>   widget of this type that shows the last validation message.
> - PerSecond: A value that gets reset every second automatically.  FPS is
>   an overlay widget of this type that simply gets incremented on every
>   swap().
> - RunningGraph: A graph of last N values.  VulkanCommandGraphSize is an
>   overlay of this type.  On every vkQueueSubmit, the number of nodes in
>   the command graph is accumulated.  On every present(), the value is
>   taken as the number of nodes for the whole duration of the frame.
> - RunningHistogram: A histogram of last N values.  Input values are in
>   the [0, 1] range and they are ranked to N buckets for histogram
>   calculation.  VulkanSecondaryCommandBufferPoolWaste is an overlay
>   widget of this type.  On vkQueueSubmit, the memory waste from command
>   buffer pool allocations is recorded in the histogram.
>
> Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py
> processes to create an array of bits, which is processed at runtime to
> create the actual font image (an image with 3 layers).
>
> The overlay widget layout is defined in overlay_widgets.json which
> gen_overlay_widgets.py processes to generate an array of widgetss, each
> of its respective type, and sets their properties, such as color and
> bounding box.  The json file allows widgets to align against other
> widgets as well as against the framebuffer edges.
>
> Two compute shaders are implemented to efficiently render the UI:
>
> - OverlayCull: This shader creates a bitset of Text and Graph widgets
>   whose bounding boxes intersect a corresponding subgroup processed by
>   OverlayDraw.  This is done only when the enabled overlay widgets are
>   changed (a feature that is not yet implemented) or the surface is
>   resized.
> - OverlayDraw: Using the bitsets generated by OverlayCull, values that
>   are uniform for each workgroup (set to be equal to hardware subgroup
>   size), this shader loops over enabled widgets that can possibly
>   intersect the pixel being processed and renders and blends in texts
>   and graphs.  This is done once per frame on present().
>
> Currently, to enable overlay widgets an environment variable is used.
> For example:
>
>     $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste
>     $ ./hello_triangle --use-angle=vulkan
>
> Possible future work:
>
> - On Android, add settings in developer options and enable widgets based
>   on those.
> - Spawn a small server in ANGLE and write an application that sends
>   enable/disable commands remotely.
> - Implement overlay for other backends.
>
> Bug: angleproject:3757
> Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

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

Bug: angleproject:3757
Change-Id: Ib08e2e7b1a9449ca097673acb11655df5d2bbf31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1778862
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-02 11:54:11 +00:00
Shahbaz Youssefi e54d0f90d1 Vulkan: Debug overlay
A debug overlay system for the Vulkan backend designed with efficiency
and runtime configurability in mind.  Overlay widgets are of two
fundamental types:

- Text widgets: A single line of text with small, medium or large font.
- Graph widgets: A bar graph of data.

Built on these, various overlay widget types are defined that gather
statistics.  Five such types are defined with one widget per type as
example:

- Count: A widget that counts something.  VulkanValidationMessageCount
  is an overlay widget of this type that shows the number of validation
  messages received from the validation layers.
- Text: A generic text.  VulkanLastValidationMessage is an overlay
  widget of this type that shows the last validation message.
- PerSecond: A value that gets reset every second automatically.  FPS is
  an overlay widget of this type that simply gets incremented on every
  swap().
- RunningGraph: A graph of last N values.  VulkanCommandGraphSize is an
  overlay of this type.  On every vkQueueSubmit, the number of nodes in
  the command graph is accumulated.  On every present(), the value is
  taken as the number of nodes for the whole duration of the frame.
- RunningHistogram: A histogram of last N values.  Input values are in
  the [0, 1] range and they are ranked to N buckets for histogram
  calculation.  VulkanSecondaryCommandBufferPoolWaste is an overlay
  widget of this type.  On vkQueueSubmit, the memory waste from command
  buffer pool allocations is recorded in the histogram.

Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py
processes to create an array of bits, which is processed at runtime to
create the actual font image (an image with 3 layers).

The overlay widget layout is defined in overlay_widgets.json which
gen_overlay_widgets.py processes to generate an array of widgetss, each
of its respective type, and sets their properties, such as color and
bounding box.  The json file allows widgets to align against other
widgets as well as against the framebuffer edges.

Two compute shaders are implemented to efficiently render the UI:

- OverlayCull: This shader creates a bitset of Text and Graph widgets
  whose bounding boxes intersect a corresponding subgroup processed by
  OverlayDraw.  This is done only when the enabled overlay widgets are
  changed (a feature that is not yet implemented) or the surface is
  resized.
- OverlayDraw: Using the bitsets generated by OverlayCull, values that
  are uniform for each workgroup (set to be equal to hardware subgroup
  size), this shader loops over enabled widgets that can possibly
  intersect the pixel being processed and renders and blends in texts
  and graphs.  This is done once per frame on present().

Currently, to enable overlay widgets an environment variable is used.
For example:

    $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste
    $ ./hello_triangle --use-angle=vulkan

Possible future work:

- On Android, add settings in developer options and enable widgets based
  on those.
- Spawn a small server in ANGLE and write an application that sends
  enable/disable commands remotely.
- Implement overlay for other backends.

Bug: angleproject:3757
Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-31 03:40:44 +00:00
Jamie Madill 2b7e2acb4d Vulkan: Move loader defines into BUILD.gn.
We shouldn't need the extra loader defines config variable. The defines
we need should probably be able to be located in ANGLE entirely.

Bug: angleproject:3320
Bug: angleproject:3876
Change-Id: I78f449f44c1709b6d683930f9b9ea3d80016272e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775462
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-30 19:20:03 +00:00
Tobin Ehlis aae21ef6ad Revert "Reland "Vulkan: Use VK repos' internal BUILD.gn files""
This reverts commit 0ad1559f3a.

Reason for revert: linux-rel no-op build issue showing up in Chromium integration. Tracking in chromium:997016

Original change's description:
> Reland "Vulkan: Use VK repos' internal BUILD.gn files"
> 
> This is a reland of 552f5fcb0d
> 
> Original change's description:
> > Vulkan: Use VK repos' internal BUILD.gn files
> >
> > This retires custom BUILD.gn files for the Vulkan Headers, Tools,
> > Validation-Layers, and Loader repos. They now have integrated BUILD.gn
> > files so switched ANGLE to use those by default.
> > Also Validation Layer, Loader, and Tools repos no longer uses codegen
> > so this speeds up the build overall.
> > Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer
> > to VK_LAYER_KHRONOS_validation unified layer.
> >
> > This changes includes a temporary workaround to the Vulkan-Loader repo
> > to remove its Window's build dependence on WDK. There are plans to
> > remove that depenedence in Loader master, but until then we can use
> > our custom branch workaround.
> > It also includes a custom branch for validation layers that includes
> > some build fixes for ANGLE.
> > Finally, the layers were crashing on Android when attempting to use
> > DebugUtils extension so forcing DebugReport on Android for now.
> >
> > Bug: angleproject:2449
> > Bug: angleproject:3320
> > Bug: angleproject:3852
> > Bug: chromium:997009
> > Bug: chromium:997016
> > Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Commit-Queue: Tobin Ehlis <tobine@google.com>
> 
> Bug: angleproject:2449, angleproject:3320, angleproject:3852
> Change-Id: I9597be99000083b135e19b6ee68d4ae222158e72
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769036
> Commit-Queue: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=tobine@google.com,syoussefi@chromium.org,jmadill@chromium.org

Change-Id: I88afdaff07e9f414f9de02f6d3651eaba9a5045f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2449, angleproject:3320, angleproject:3852
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776920
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-08-29 21:56:14 +00:00
Tobin Ehlis 0ad1559f3a Reland "Vulkan: Use VK repos' internal BUILD.gn files"
This is a reland of 552f5fcb0d

Original change's description:
> Vulkan: Use VK repos' internal BUILD.gn files
>
> This retires custom BUILD.gn files for the Vulkan Headers, Tools,
> Validation-Layers, and Loader repos. They now have integrated BUILD.gn
> files so switched ANGLE to use those by default.
> Also Validation Layer, Loader, and Tools repos no longer uses codegen
> so this speeds up the build overall.
> Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer
> to VK_LAYER_KHRONOS_validation unified layer.
>
> This changes includes a temporary workaround to the Vulkan-Loader repo
> to remove its Window's build dependence on WDK. There are plans to
> remove that depenedence in Loader master, but until then we can use
> our custom branch workaround.
> It also includes a custom branch for validation layers that includes
> some build fixes for ANGLE.
> Finally, the layers were crashing on Android when attempting to use
> DebugUtils extension so forcing DebugReport on Android for now.
>
> Bug: angleproject:2449
> Bug: angleproject:3320
> Bug: angleproject:3852
> Bug: chromium:997009
> Bug: chromium:997016
> Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>

Bug: angleproject:2449, angleproject:3320, angleproject:3852
Change-Id: I9597be99000083b135e19b6ee68d4ae222158e72
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769036
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-08-29 20:44:50 +00:00
Michael Spang 7cd5f64acb Move default ANGLE platform type out of main switch/case
The "default" platform type isn't really a discrete type, and treating it
that way leads to duplication. Make the default platform just map to
another platform enum.

After this change, setting args to angle_enable_opengl=false
angle_enable_vulkan=true under X11 results in a default of vulkan;
previously we would hit UNREACHABLE() due to not handling this case.

Bug: angleproject:3847
Change-Id: I1dc093ef8a2f5b93721cb1ebda0a8c3ec4a7d2f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1521321
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-08-28 15:53:10 +00:00
Jamie Madill 5f3c98de9d Revert "Vulkan: Use VK repos' internal BUILD.gn files"
This reverts commit 552f5fcb0d.

Reason for revert: Causing flakiness in "confirm no-op" CQ step.
See issue for more details.

Bug: chromium:997016

Original change's description:
> Vulkan: Use VK repos' internal BUILD.gn files
> 
> This retires custom BUILD.gn files for the Vulkan Headers, Tools,
> Validation-Layers, and Loader repos. They now have integrated BUILD.gn
> files so switched ANGLE to use those by default.
> Also Validation Layer, Loader, and Tools repos no longer uses codegen
> so this speeds up the build overall.
> Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer
> to VK_LAYER_KHRONOS_validation unified layer.
> 
> This changes includes a temporary workaround to the Vulkan-Loader repo
> to remove its Window's build dependence on WDK. There are plans to
> remove that depenedence in Loader master, but until then we can use
> our custom branch workaround.
> It also includes a custom branch for validation layers that includes
> some build fixes for ANGLE.
> Finally, the layers were crashing on Android when attempting to use
> DebugUtils extension so forcing DebugReport on Android for now.
> 
> Bug: angleproject:2449
> Bug: angleproject:3320
> Bug: angleproject:3852
> Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>

TBR=ynovikov@chromium.org,tobine@google.com,syoussefi@chromium.org,jmadill@chromium.org

Change-Id: Iec97ba8cb5c38fa56bfd4c0afb0f7af8d68513ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2449, angleproject:3320, angleproject:3852
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767363
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-23 01:05:50 +00:00
Daksh Idnani 5ec0488010 Reland "Make Mac SystemInfo reflect the currently active GPU on dual GPU machines"
This reverts commit 58940f67ac.

Reason for revert: pixel test failures have been triaged in Gold. Relanding.

Original change's description:
> Revert "Make Mac SystemInfo reflect the currently active GPU on dual GPU machines"
> 
> This reverts commit 720a8bab0e.
> 
> Reason for revert: pixel test failures per http://crbug.com/984780#c13
> 
> Original change's description:
> > Make Mac SystemInfo reflect the currently active GPU on dual GPU machines
> > 
> > Currently, the GetSystemInfo() function (in gpu_info_util/SystemInfo_mac.mm)
> > on dual GPU Macs always updates the active GPU field of the SystemInfo
> > instance to the first non-Intel GPU it finds. This change overrides the
> > activeGPUIndex field of the SystemInfo instance to reflect the current GPU
> > instead of the non-intel GPU.
> > 
> > Bug: 985486, 984780, angleproject:3701
> > Change-Id: Ia93f38f4a2f7728c05e99c83a940722bd3808766
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752334
> > Commit-Queue: Kenneth Russell <kbr@chromium.org>
> > Reviewed-by: Zhenyao Mo <zmo@chromium.org>
> > Reviewed-by: Kenneth Russell <kbr@chromium.org>
> 
> TBR=zmo@chromium.org,geofflang@chromium.org,kbr@chromium.org,dakshidnani@google.com
> 
> Change-Id: Iacf4b8433ac1aa4d30c51f08ddfc6489af440cc4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 985486, 984780, angleproject:3701
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1757373
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>

Bug: 985486, 984780, angleproject:3701
Change-Id: I8f2f26f68329a2826a92742c46471b8c092b36ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765963
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2019-08-22 22:23:58 +00:00
Tobin Ehlis 552f5fcb0d Vulkan: Use VK repos' internal BUILD.gn files
This retires custom BUILD.gn files for the Vulkan Headers, Tools,
Validation-Layers, and Loader repos. They now have integrated BUILD.gn
files so switched ANGLE to use those by default.
Also Validation Layer, Loader, and Tools repos no longer uses codegen
so this speeds up the build overall.
Switched over from old VK_LAYER_LUNARG_standard_validation meta-layer
to VK_LAYER_KHRONOS_validation unified layer.

This changes includes a temporary workaround to the Vulkan-Loader repo
to remove its Window's build dependence on WDK. There are plans to
remove that depenedence in Loader master, but until then we can use
our custom branch workaround.
It also includes a custom branch for validation layers that includes
some build fixes for ANGLE.
Finally, the layers were crashing on Android when attempting to use
DebugUtils extension so forcing DebugReport on Android for now.

Bug: angleproject:2449
Bug: angleproject:3320
Bug: angleproject:3852
Change-Id: I48b36acefcc7f2bc930eb72d6fdbc87bca24f833
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610438
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2019-08-22 18:20:47 +00:00
Jonah Ryan-Davis 58940f67ac Revert "Make Mac SystemInfo reflect the currently active GPU on dual GPU machines"
This reverts commit 720a8bab0e.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Make Mac SystemInfo reflect the currently active GPU on dual GPU machines
> 
> Currently, the GetSystemInfo() function (in gpu_info_util/SystemInfo_mac.mm)
> on dual GPU Macs always updates the active GPU field of the SystemInfo
> instance to the first non-Intel GPU it finds. This change overrides the
> activeGPUIndex field of the SystemInfo instance to reflect the current GPU
> instead of the non-intel GPU.
> 
> Bug: 985486, 984780, angleproject:3701
> Change-Id: Ia93f38f4a2f7728c05e99c83a940722bd3808766
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752334
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>

TBR=zmo@chromium.org,geofflang@chromium.org,kbr@chromium.org,dakshidnani@google.com

Change-Id: Iacf4b8433ac1aa4d30c51f08ddfc6489af440cc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 985486, 984780, angleproject:3701
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1757373
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-08-22 15:41:06 +00:00
Daksh Idnani 720a8bab0e Make Mac SystemInfo reflect the currently active GPU on dual GPU machines
Currently, the GetSystemInfo() function (in gpu_info_util/SystemInfo_mac.mm)
on dual GPU Macs always updates the active GPU field of the SystemInfo
instance to the first non-Intel GPU it finds. This change overrides the
activeGPUIndex field of the SystemInfo instance to reflect the current GPU
instead of the non-intel GPU.

Bug: 985486, 984780, angleproject:3701
Change-Id: Ia93f38f4a2f7728c05e99c83a940722bd3808766
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752334
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-08-21 22:05:28 +00:00
Jiacheng Lu 617f23d149 Fix frame capture build for Android
Bug: angleproject:3611
Change-Id: I65018823a8d7223de0f63ea5bd6a573f62f1c24b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1748884
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-21 20:58:08 +00:00
James Darpinian 7e48c9eb99 Add explicit integer casts
WebKit uses the -Wshorten-64-to-32 flag which warns on these cases.

Bug: 3439
Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-08-14 00:52:47 +00:00
Jiacheng Lu 9e14a19bb8 EVENT trace to print GLenum as string reland
Reland of CL https://chromium-review.googlesource.com/c/angle/angle/+/1737141

Bug: angleproject:3778
Change-Id: I2a43c618de032d6e6286d707fbc88241ad4c19ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745837
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-12 18:58:35 +00:00
James Darpinian efa898aca2 Enable some compiler warnings used by WebKit.
This will make it easier to roll ANGLE in WebKit.

Bug: angleproject:3439
Change-Id: Icd4a5a2d5dcabb6cf13d4b46a7547f49610fa4b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1743057
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-09 17:05:01 +00:00
James Darpinian 64751a0be4 Reenable extra_warnings config for angle_utils
Originally disabled in https://crrev.com/c/1738438.

Bug: angleproject:1459
Change-Id: I95172dc95a5d3e9d838c542ee6bcfb2338ffc9a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1743078
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-08 13:40:11 +00:00
James Darpinian 22ec7dc900 Remove all global constructors and exit time destructors.
WebKit compiles with -Wglobal-constructors, so they want this. I decided
to do -Wexit-time-destructors at the same time.

Bug: angleproject:3439
Bug: angleproject:1459
Change-Id: I4b44ae4f8e6f066e07dc7f9f6ced9a5d49dc8f8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738438
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-07 21:34:14 +00:00
Jamie Madill eb1b1646ae Capture/Replay: Fix capture-enabled libs build.
Adds a build option to use the capture libraries in the default output
location for libGLESv2. With |angle_with_capture_by_default| enabled,
libGLESv2 will have capture enabled and the non-capture libGLESv2 is
built as libGLESv2_no_capture.

Also moves the FrameCapture to be owned by gl::Context. Rearranges the
code a bit so that we don't require a separate version of libANGLE for
capture.

Also implements a read pixels entry point parameter.

Bug: angleproject:3611
Change-Id: Ic528e43e4779f794c8b6d0bf35410166dacc81b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1719064
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-31 16:28:40 +00:00
Jiacheng Lu 73e5e9b55a Clang warn implicit float to int conversion
1. add '-Wfloat-conversion' in compiler flag for clang
2. fix existed implicit float conversion

Bug: angleproject:3728
Change-Id: I0dc07eeb74c5d6dc480c6f0aa88bc75ab98e4292
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713741
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-26 19:56:42 +00:00
Geoff Lang 6a02f06dfd Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.

BUG=angleproject:3425

Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-18 22:51:46 +00:00
Clemen Deng 6e7dd1ef42 Generate openGL32.dll in a separate output folder
This is to avoid loading it locally and so that the pdb works

Bug: angleproject:3641
Change-Id: I2ce93ace47d1e6a1013d38964e5919084ad4ff7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704634
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-07-16 19:18:19 +00:00
Clemen Deng 663b048114 Load correct opengl32.dll
Tests are still loading ANGLE's opengl32.dll instead of system's
This is because external drivers are trying to load opengl32.dll
Workaround: renamed to libGL.dll, need to change back when copying
dll over for loading

Bug: angleproject:3641
Change-Id: I051adc1fbb488a704c99718ad4a2f74bb7756cbd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1697290
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-15 19:30:35 +00:00
Geoff Lang ecd2e3b152 GL: Reset the texture base level before uploads on Mac.
Reset the base level of textures before call glTexImage on Mac
to prevent driver bugs that cause texture corruption.

BUG=angleproject:3671

Change-Id: I90e94b8395a781a2142ef6be3af1d6117f084152
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1692975
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-07-11 20:41:06 +00:00
Clemen Deng cb8b4a5716 Rename "opengl32" to "libGL"
Bug: angleproject:3651
Change-Id: I1af052da9bc2f64f2f29ea411902272987f21a0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688178
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-09 14:47:30 +00:00
Jamie Madill 612b741729 Capture/Replay: Add frame capture to cpp files.
Capture is implemented mostly via code auto-generation. The capture
requires a bit of custom logic for each captured pointer parameter. We
handle this by using auto-generation to lay out the base template for
each GL call and then custom logic that uses ANGLE's internals to
know how much data to capture at which point. Client array pointers are
captured before each draw call.

Currently only GLES capture is supported. We write out cpp files and
an optional data file accompanying each cpp. For small data chunks we
inline them in the cpp files. For bigger chunks like texture data we
pack them into the data file.

Mid-execution capture is not yet supported. Configuring the capture is
currently only available by modifying the cpp sources. Both of these
features will be implemented in the future.

Bug: angleproject:3611
Change-Id: If6d5dac2f7bf363129d42ea9198162aef0d3a4ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1671904
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-05 16:11:43 +00:00
Clemen Deng 7558e836ef Windows Desktop GL Implementation
Bug: angleproject:3620
Change-Id: I4ef4ab3ee145e5ce9b1ebf0c2d61d0777db72c43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678405
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-03 12:49:04 +00:00
Jamie Madill 77c8496b5f Re-land "Cleanup angle_libs_suffix in BUILD.gn."
We can use output_name instead of repeating the libs suffix in the GN
files.

The re-land adds automatic suffix application on Android. This makes
the configuration a bit simpler and should detect future breakage. Also
cleans up some of the "angle_libraries" code.

Bug: angleproject:3611
Change-Id: I4971d1085ca67802c916655c30efb7df4001f040
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679993
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-28 17:47:11 +00:00