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

185 Коммитов

Автор SHA1 Сообщение Дата
Jonah Ryan-Davis 5afd5ec6ad Vulkan support for MacOS (using SwiftShader)
Created a new WindowSurface/Display for MacOS/Vulkan, along with some
GN changes to get it working.

Bug: 1015454
Change-Id: I3f7a12f173795efe598856c702ce53b1e50831eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1880163
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-11-28 17:41:50 +00:00
Shahbaz Youssefi b0a9de9512 Fix assert in angle_deqp_khr_gles* executables
The //build/config/gcc:symbol_visibility_hidden config was removed in an
attempt to improve stack traces on Linux. However, this resulted in the
in-class-inline-functions in glslang to be weak symbols.  The KHR dEQP
tests link against glslang as well as libGLESv2.so, resulting in
angle_deqp_khr_gles*_tests to link those weak symbols.  Due to glslang's
usage of a global variable in InitializeDll.cpp, a bug is created where
ANGLE sometimes calls into its own copy of glslang and sometimes the KHR
dEQP's version, with the two copies of the global variable being
inconsistent.

Bug: angleproject:4123
Change-Id: I0cfe3236117b1219db4fea4495e1583334c04fbe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926887
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-11-21 16:29:30 +00:00
Ethan Lee d22b8be4b4 GN: Make X11 optional, based on a user-defined variable.
Not all Linux platforms will have X11 available (Wayland, GGP), so we have to
declare a variable that checks use_x11 separately.

Bug: angleproject:4116
Change-Id: I7e33956da6344b8db4d4e32dbbd1b42f58f7019c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1919632
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-19 13:02:24 +00:00
Geoff Lang 6e687af264 Support standalone Android builds in ANGLE.
By disabling apk generation, we can build all of our targets in a
standalone ANGLE checkout on Linux.

This allows tools like gn desc to give us useful information about
Android builds.

BUG=angleproject:4026,angleproject:2344

Change-Id: Ic46348fd06c5174ce5e5a4d89ceb391246c6ac6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866080
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-11-14 14:54:36 +00:00
Jamie Madill c898ec1a5e Add EGL GGP extensions.
This CL adds two new extensions:

 * EGL_ANGLE_ggp_stream_descriptor:
    Introduces a new attribute to CreateWindowSurface. Allows the app
    to pass in a stream descriptor to VkCreateSurfaceKHR.
    Mirrors VK_GGP_stream_descriptor_surface.

 * EGL_ANGLE_swap_with_frame_token:
    Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This
    allows the app to pass a GGP frame token down to vkQueuePresentKHR.
    Mirrors VK_GGP_frame_token.

Bug: angleproject:4078
Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-11-05 01:50:17 +00:00
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
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
Jamie Madill ba04be8c9e GN: Refactor angle_test and remove angle_test_main.
This cleans up the GN files and prepares them for eventually using a
custom test harness.

Bug: anglerproject:3162
Change-Id: I3d8568628a9465093adec9e838617a002192beef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821939
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-25 00:32:30 +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
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
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
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
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
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
Li, Hao e9cffa62c9 Rename data_dir to angle_data_dir in GN files
Dawn reuses the Vulkan validation layers of ANGLE to avoid building
twice in chromium, and references build_overrides/vulkan_common.gni,
but angle_data_dir is undefined, which is defined as data_dir in
angle.gni. There is a reminder to rename this name in
https://chromium-review.googlesource.com/c/chromium/src/+/1610488

Bug: angleproject:3710
Change-Id: I4b7c4d24c37770ff58b70c988851a6ed32a04296
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1703175
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-07-17 16:58:00 +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
Geoff Lang 067687f467 Removal global locks from GL entry points. Always lock in EGL.
The ANGLE Vulkan backend is now thread safe for non-share group contexts. This
means that a global GL lock only adds overhead for most use cases.

Remove the angle_force_thread_safety gn argument.

BUG=angleproject:2464

Change-Id: Ic6ba89e18b46e5dd72aa83d0f409097441fcca3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635749
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-06-21 15:26:18 +00:00
Jiawei Shao 9a4bd48d5f Allow overwriting angle_root in non-Chromium GN configurations
This patch adds the support of overwriting angle_root to the one
defined outside ANGLE, which is useful for other projects which
intend to configure ANGLE in their GN builds.

Bug: angleproject:3263
Change-Id: I70a56a3d0afdca2eb66fb9619f0dd4d3efc58dee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1522912
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-19 00:48:07 +00:00
Michael Spang b08d53d3c1 Reland "Vulkan: Build validation layers with asserts only"
This reverts commit d187d45ede.

Reason for revert: The correct thing to revert was https://chromium-review.googlesource.com/c/chromium/src/+/1657512

Original change's description:
> Revert "Vulkan: Build validation layers with asserts only"
> 
> This reverts commit 85fef1bc62.
> 
> Reason for revert: This actually seems to break the fucshia_x64 bot:
> 
> Exception: Some files were excluded with --exclude-file, but not found in the deps list: lib/libVkLayer_parameter_validation.so, lib/libVkLayer_core_validation.so
> 
> See https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzk0ODYyNWNjNDE2NmE3NjRkYWM2NTRlNjlmZDA3MGFjMDE3MzNkNTMM
> 
> Original change's description:
> > Vulkan: Build validation layers with asserts only
> > 
> > Adding ANGLE to the build includes the validation layers, which are only
> > for development. We don't want any development or debugging code to be
> > included by default in release builds, so tie building the validation
> > layers to enablement of asserts.
> > 
> > Bug: angleproject:2475
> > Test: gn gen out/fuchsia_rel --args='target_os="fuchsia" is_debug=false use_goma=true'
> >   gn desc out/fuchsia_rel //fuchsia/engine:web_engine runtime_deps
> > 
> > Change-Id: I6d195c680255dcbc81e95f8e6f80e1e8ace169a2
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1656306
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Commit-Queue: Michael Spang <spang@chromium.org>
> 
> TBR=spang@chromium.org,geofflang@chromium.org,jmadill@chromium.org
> 
> Change-Id: Ia74efcce2b3dda02dc0c0d292bdeb5ea7c5c3530
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:2475
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1657711
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

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

Change-Id: Iab669210c23823b403e3fff7f5199a7aadd032bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2475
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1658411
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-06-13 16:01:29 +00:00
Jamie Madill d187d45ede Revert "Vulkan: Build validation layers with asserts only"
This reverts commit 85fef1bc62.

Reason for revert: This actually seems to break the fucshia_x64 bot:

Exception: Some files were excluded with --exclude-file, but not found in the deps list: lib/libVkLayer_parameter_validation.so, lib/libVkLayer_core_validation.so

See https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzk0ODYyNWNjNDE2NmE3NjRkYWM2NTRlNjlmZDA3MGFjMDE3MzNkNTMM

Original change's description:
> Vulkan: Build validation layers with asserts only
> 
> Adding ANGLE to the build includes the validation layers, which are only
> for development. We don't want any development or debugging code to be
> included by default in release builds, so tie building the validation
> layers to enablement of asserts.
> 
> Bug: angleproject:2475
> Test: gn gen out/fuchsia_rel --args='target_os="fuchsia" is_debug=false use_goma=true'
>   gn desc out/fuchsia_rel //fuchsia/engine:web_engine runtime_deps
> 
> Change-Id: I6d195c680255dcbc81e95f8e6f80e1e8ace169a2
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1656306
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Michael Spang <spang@chromium.org>

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

Change-Id: Ia74efcce2b3dda02dc0c0d292bdeb5ea7c5c3530
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2475
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1657711
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-13 11:56:29 +00:00
Michael Spang 85fef1bc62 Vulkan: Build validation layers with asserts only
Adding ANGLE to the build includes the validation layers, which are only
for development. We don't want any development or debugging code to be
included by default in release builds, so tie building the validation
layers to enablement of asserts.

Bug: angleproject:2475
Test: gn gen out/fuchsia_rel --args='target_os="fuchsia" is_debug=false use_goma=true'
  gn desc out/fuchsia_rel //fuchsia/engine:web_engine runtime_deps

Change-Id: I6d195c680255dcbc81e95f8e6f80e1e8ace169a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1656306
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-06-13 01:04:03 +00:00
Shahbaz Youssefi e7e808aff3 Disable Linux stack traces on CFI builds
Bug: 971977
Change-Id: I2a872bd814e9a356baa3d304e1c352b6a619583e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1649300
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-06-07 17:49:47 +00:00
Geoff Lang ec57a24028 Don't remove the symbol_visibility_hidden config in asan builds.
We remove symbol_visibility_hidden to get better stack traces in debug
builds but it causes ASAN issues with multiply instantiated globals.

BUG=angleproject:3507

Change-Id: I8ec664bf7d9506cc45afb6f864de7b7ba7cbe99b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648275
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-06-06 20:47:29 +00:00
Jamie Madill 20d380fa5b Print stack backtrace on critical failure.
We reuse code from Skia to walk the stack on Posix platforms. See:
https://github.com/google/skia/blob/master/tools/CrashHandler.cpp

On Windows we use a BSD-licensed tool called StackWalker. See:
https://github.com/JochenKalmbach/StackWalker

This allows us to get high quality stack traces on Win/Linux/Mac.

Bug: angleproject:3162
Change-Id: I9c50ede2c6a41ed0ee85a0507372df42a487bcef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1632950
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-06-03 20:24:03 +00:00
Tobin Ehlis a8ff88143a Vulkan:Optimize SecondaryCommandBuffers
RELAND of this commit. Had to fix fuzzer build errors.

Optimize performance of SecondaryCommandBuffers and enable them as the
default build option.
To disable this set angle_enable_custom_vulkan_cmd_buffers=false in
your build args.

This CL enhances the PoolAllocator to have a "fast" mode that can
be enabled at class creation. This mode uses an alignment of 1 byte and
enables a fastAllocation() call that avoids some bookkeeping overhead.
The SecondaryCommandBuffer uses this fastAllocation() function.
Furthermore the fast path of fast allocate, using the current page,
is inlined for maximum speed.
Jamie Madill also updated the SecondaryCommandBuffers to pre-allocate
blocks so that the commands occur linearly in memory. This speeds up
processing with improved cache coherency and minimizes overhead when
recording commands.
Also the core Draw functions and their state updates are all inlined
as well as the common functions to initialize commands and to copy
command pointer data.

This change also includes some new, custom commands. One is
imageBarrier that is a specialized version of pipelineBarrier that only
performs a single image layout transition.
There are customized versions of various Draw commands to minimize
copying of parameters.
There are also specialized commands to bind[Graphics|Compute]Pipeline
that have the pipeline type built in to the command.
More custom commands and command data size optimizations will be made
in follow-on commits.

Bug: angleproject:3136

Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1497418
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Change-Id: I621d8f8893308fca240b32390928e8ba0036cf06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535385
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-03-22 18:54:30 +00:00
Jamie Madill 896e781118 Revert "Vulkan:Optimize SecondaryCommandBuffers"
This reverts commit 2219b18c98.

Reason for revert: Failing to compile on ASAN builders:

https://ci.chromium.org/p/chromium/builders/try/linux-libfuzzer-asan-rel/134782

Currently blocking roll.

Original change's description:
> Vulkan:Optimize SecondaryCommandBuffers
> 
> Optimize performance of SecondaryCommandBuffers and enable them as the
> default build option.
> To disable this set angle_enable_custom_vulkan_cmd_buffers=false in
> your build args.
> 
> This CL enhances the PoolAllocator to have a "fast" mode that can
> be enabled at class creation. This mode uses an alignment of 1 byte and
> enables a fastAllocation() call that avoids some bookkeeping overhead.
> The SecondaryCommandBuffer uses this fastAllocation() function.
> Furthermore the fast path of fast allocate, using the current page,
> is inlined for maximum speed.
> Jamie Madill also updated the SecondaryCommandBuffers to pre-allocate
> blocks so that the commands occur linearly in memory. This speeds up
> processing with improved cache coherency and minimizes overhead when
> recording commands.
> Also the core Draw functions and their state updates are all inlined
> as well as the common functions to initialize commands and to copy
> command pointer data.
> 
> This change also includes some new, custom commands. One is
> imageBarrier that is a specialized version of pipelineBarrier that only
> performs a single image layout transition.
> There are customized versions of various Draw commands to minimize
> copying of parameters.
> There are also specialized commands to bind[Graphics|Compute]Pipeline
> that have the pipeline type built in to the command.
> More custom commands and command data size optimizations will be made
> in follow-on commits.
> 
> Bug: angleproject:3136
> Change-Id: I35453cc2656bc8c51f0d84d1adef106900aca9a5
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1497418
> Commit-Queue: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

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

Change-Id: I1c0bfe864ff343eb8ea6c88556523f8715c981d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3136
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535998
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-03-22 14:56:44 +00:00
Tobin Ehlis 2219b18c98 Vulkan:Optimize SecondaryCommandBuffers
Optimize performance of SecondaryCommandBuffers and enable them as the
default build option.
To disable this set angle_enable_custom_vulkan_cmd_buffers=false in
your build args.

This CL enhances the PoolAllocator to have a "fast" mode that can
be enabled at class creation. This mode uses an alignment of 1 byte and
enables a fastAllocation() call that avoids some bookkeeping overhead.
The SecondaryCommandBuffer uses this fastAllocation() function.
Furthermore the fast path of fast allocate, using the current page,
is inlined for maximum speed.
Jamie Madill also updated the SecondaryCommandBuffers to pre-allocate
blocks so that the commands occur linearly in memory. This speeds up
processing with improved cache coherency and minimizes overhead when
recording commands.
Also the core Draw functions and their state updates are all inlined
as well as the common functions to initialize commands and to copy
command pointer data.

This change also includes some new, custom commands. One is
imageBarrier that is a specialized version of pipelineBarrier that only
performs a single image layout transition.
There are customized versions of various Draw commands to minimize
copying of parameters.
There are also specialized commands to bind[Graphics|Compute]Pipeline
that have the pipeline type built in to the command.
More custom commands and command data size optimizations will be made
in follow-on commits.

Bug: angleproject:3136
Change-Id: I35453cc2656bc8c51f0d84d1adef106900aca9a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1497418
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-03-21 20:13:08 +00:00
Tobin Ehlis 134425c770 Vulkan:Integrate SecondaryCommandBuffers
Integrate the custom SecondaryCommandBuffer type into the CommandGraph
nodes by adding new ANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS define that can
be set in the BUILD gn args with angle_enable_custom_vulkan_cmd_buffers
set to "true."
Initially the custom cmd buffers are disabled by default.

This adds some support functions to SecondaryCommandBuffer to make the
integration easier by matching the wrapped cmd buffer interface:
initialize(), end(), valid().

Bug: angleproject:3136
Change-Id: Ib910554583192550757bb8ce89914e3ea8737988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1526556
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-03-21 15:02:33 +00:00
Jamie Madill 2970d2b0b7 Disable non-conformant configs on official builds.
Bug: angleproject:2950
Change-Id: Idcb907587abea99ff6b1c2cbe6bb327af0222b10
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1506007
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-03-06 19:55:56 +00:00
Shahbaz Youssefi 9dc8eafe11 Vulkan: ES3 dEQP suppressions
This re-enables Vulkan ES3 context creation and adds the necessary dEQP
suppressions.

Bug: angleproject:2950
Change-Id: Ic24a9fb4f867f3bce08f101e056f208abf84bb5e
Reviewed-on: https://chromium-review.googlesource.com/c/1483311
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-02-28 05:04:42 +00:00
Michael Spang 229fc83d68 Vulkan: Port renderer to Fuchsia (reland)
Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan
renderer, as well as an implementation of OSWindow that renders
fullscreen for the test suite.

Disallow use of the vulkan loader from third_party as Fuchsia uses a fork
of the loader and has not sent those changes upstream yet.

Add a small wayland-inspired library libfuchsia-egl to provide a type
"struct fuchsia_egl_window" to use as EGLNativeWindowType. This type
combines a zx_handle_t to an image pipe channel and a surface size.

Image pipes can only be used once to create a VkSurfaceKHR. This means we
have to recreate the pipe in tests that call eglCreateWindowSurface more
than once with a single OSWindow, or the second call will fail. Add a
resetNativeWindow() method to accomplish this.

Reland disabling -Wextra-semi.

BUG=angleproject:2475
TEST=angle_end2end_tests on Fuchsia

Change-Id: Ie91715bcd760c6c04d4b8a02a91daa71e32ee30c
Reviewed-on: https://chromium-review.googlesource.com/c/1467603
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-02-13 00:37:39 +00:00
Yuly Novikov 8edc68e3ff Vulkan: Require Android NDK API level 26, dropping Android N support.
Due to Vulkan Validation Layers breaking Android N backward compatibility.
See http://crrev/c/1405714
and https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/623

Bug: angleproject:3095
Change-Id: I5da306c567cd9a0088149ca9929b38c8ed2cc86a
Reviewed-on: https://chromium-review.googlesource.com/c/1465954
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-02-12 20:14:33 +00:00
Jamie Madill 3f0ff409c7 Revert "Vulkan: Port renderer to Fuchsia"
This reverts commit 991d1cfb5e.

Reason for revert: Failing compile on the fuchsia bots on the ANGLE
auto-roller.

https://ci.chromium.org/p/chromium/builders/luci.chromium.try/fuchsia_x64/209198

In file included from ../../third_party/angle/util/fuchsia/ScenicWindow.cpp:10:
In file included from ../../third_party/angle/util/fuchsia/ScenicWindow.h:13:
In file included from gen/third_party/fuchsia-sdk/sdk/fidl/fuchsia/ui/policy/cpp/fidl.h:5:
In file included from ../../third_party/fuchsia-sdk/sdk/pkg/fidl_cpp/include/lib/fidl/cpp/internal/header.h:12:
../../third_party/fuchsia-sdk/sdk/pkg/fit/include/lib/fit/function.h:135:6: error: extra ';' after member function definition [-Werror,-Wextra-semi]
    };
     ^
1 error generated.

Original change's description:
> Vulkan: Port renderer to Fuchsia
> 
> Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan
> renderer, as well as an implementation of OSWindow that renders
> fullscreen for the test suite.
> 
> Disallow use of the vulkan loader from third_party as Fuchsia uses a fork
> of the loader and has not sent those changes upstream yet.
> 
> Add a small wayland-inspired library libfuchsia-egl to provide a type
> "struct fuchsia_egl_window" to use as EGLNativeWindowType. This type
> combines a zx_handle_t to an image pipe channel and a surface size.
> 
> Image pipes can only be used once to create a VkSurfaceKHR. This means we
> have to recreate the pipe in tests that call eglCreateWindowSurface more
> than once with a single OSWindow, or the second call will fail. Add a
> resetNativeWindow() method to accomplish this.
> 
> BUG=angleproject:2475
> TEST=angle_end2end_tests on Fuchsia
> 
> Change-Id: I71a613a362dd1c8aada49a3c02ae461e064457bf
> Reviewed-on: https://chromium-review.googlesource.com/c/1446496
> Commit-Queue: Michael Spang <spang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

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

Change-Id: I2d9abefa9db5363ba63a17c1773d0e147040d055
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2475
Reviewed-on: https://chromium-review.googlesource.com/c/1465761
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-02-12 03:09:10 +00:00
Michael Spang 991d1cfb5e Vulkan: Port renderer to Fuchsia
Add DisplayVk and WindowSurfaceVk subclasses for Fuchsia to the vulkan
renderer, as well as an implementation of OSWindow that renders
fullscreen for the test suite.

Disallow use of the vulkan loader from third_party as Fuchsia uses a fork
of the loader and has not sent those changes upstream yet.

Add a small wayland-inspired library libfuchsia-egl to provide a type
"struct fuchsia_egl_window" to use as EGLNativeWindowType. This type
combines a zx_handle_t to an image pipe channel and a surface size.

Image pipes can only be used once to create a VkSurfaceKHR. This means we
have to recreate the pipe in tests that call eglCreateWindowSurface more
than once with a single OSWindow, or the second call will fail. Add a
resetNativeWindow() method to accomplish this.

BUG=angleproject:2475
TEST=angle_end2end_tests on Fuchsia

Change-Id: I71a613a362dd1c8aada49a3c02ae461e064457bf
Reviewed-on: https://chromium-review.googlesource.com/c/1446496
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-02-11 22:51:25 +00:00
Jamie Madill 0cb3b0f1e0 Vulkan: Use glslang's internal BUILD.gn.
This retires the ANGLE BUILD.gn file for glslang. Also makes a few more
repos sync from Chromium's copy using build overrides. This should
speed up Chrome checkouts slightly.

Bug: angleproject:3088
Change-Id: I530f28d9b13469bbe6471a4c61e7353d599d81ec
Reviewed-on: https://chromium-review.googlesource.com/c/1422545
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-29 02:06:07 +00:00
Jamie Madill ab2bfa814c Enable Chromium clang style plugin for libANGLE.
This fixes a few style warnings:

 * auto should not deduce to raw pointer type
 * inlined virtual methods are not allowed
 * non-trivial constructors and destructors should be explicit
 * inlined non-trivial constructors should not be in-class
 * missing override keywords

Bug: angleproject:3069
Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53
Reviewed-on: https://chromium-review.googlesource.com/c/1407640
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-16 01:44:15 +00:00
Jamie Madill 7098cff5c5 Make BUILD.gn targets into templates.
This allows us to "globally" add and remove certain configs as long as
we use the new templates. This simplifies the logic of adding configs
for stuff like extra warnings and default include dirs. As well it
simplifies removing certain common unwanted configs.

Generally simplifies the logic in BUILD.gn. Will allow for easily
suppressing the clang-plugins config instead of using a global setting
in .gn. Then we can enable the additional warnings config-by-config.

Also fixes some warnings that turned up after we enabled the extra
warnings config in our tests. Also moves the dEQP tests main to be
consistent with the other test main files.

Bug: angleproject:3069
Change-Id: I5a8166cd0f5a7926822c171fcaf473fc86b3ffc1
Reviewed-on: https://chromium-review.googlesource.com/c/1409871
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-16 00:35:58 +00:00
Tobin Ehlis 573f76b3ee Debug: Add Systrace Markers
Update ScopedPerfEventHelper class to add systrace markers by default.
This change unifies ANGLE EVENT* macro system so that at the base level
in LoggingAnnotator class, systrace markers will be added by default.

Modify the base DebugLogger to use char* by default and move any
conversions to wchar_t to the Windows specializations where wchar is
used. This limits type conversions to only where they're needed.

This change also includes some new TRACE_EVENT() calls in the VK
backend which will result in systrace markers for those calls on the
Android platform.

The new build flag "angle_enable_trace" is added to enable the tracing
calls.

Bug: angleproject:2528
Change-Id: Icefc197d4407e1cd31338710e37865abae6a0b15
Reviewed-on: https://chromium-review.googlesource.com/c/1042785
Commit-Queue: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-11-26 15:45:45 +00:00
Shahbaz Youssefi 25224e786f Vulkan: add GPU trace events
RendererVk now tries, as best as it can, to match the CPU and GPU timers
on init as well as every finish().  A clock-sync event is generated for
each such synchronization point.

RendererVk::traceGpuEvent() is a new function that, given a command
buffer, performs timestamp queries corresponding to GPU events.  These
queries are read back when done, without incurring GPU bubbles, at which
point an event is generated with that timestamp.

Bug: angleproject:2908
Change-Id: I08d7d11ff9f8ad6c9f9a9899767c9cd746d0623e
Reviewed-on: https://chromium-review.googlesource.com/c/1296954
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-10-29 15:28:41 +00:00
Scott Graham fbc5c55597 fuchsia: Disable GL
I think we'll only need Vulkan. But in any case, the GL code doesn't
build, so disable it for now.

Bug: chromium:808287
Change-Id: I08f8cd09e67d91c08b7632e54bbdc6a11ee57014
Reviewed-on: https://chromium-review.googlesource.com/c/1298381
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
2018-10-24 23:28:29 +00:00
Geoff Lang b02fc662fa Lock around all EGL and GL calls with a global mutex.
BUG=angleproject:2464

Change-Id: I0231cc84777272f9cf26298c6a137f1ad3fd51d6
Reviewed-on: https://chromium-review.googlesource.com/1183441
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-08-31 16:11:58 +00:00
Junliang Yan d73a61117d PPC: Fix ppc build error
Change-Id: I83b39e1f4c429326a98694198411cf64a7361edb
Reviewed-on: https://chromium-review.googlesource.com/1096074
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-06-11 21:54:12 +00:00
Junliang Yan 021134691e PPC/s390: Fix GN error on PPC and s390
R=cwallez@chroimium.org, fjhenigman@chromium.org, geofflang@chromium.org, jmadill@chromium.org, ynovikov@chromium.org

Change-Id: Iae4cfeb4db83c777d3c9a0a4c115c583113c5b70
Reviewed-on: https://chromium-review.googlesource.com/1087567
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-06-06 02:45:52 +00:00
Courtney Goeltzenleuchter b001528ffa Use libnativewindow for Android builds
To avoid references to libEGL.so do not link with libandroid,
use libnativewindow instead. libnativewindow is available in
android-26 and newer.
The appropriate library will be selected based on the ndk level
configured. If ndk revision is 26 or higher, we'll link to
libnativewindow otherwise use libandroid.
The ANGLE apk needs to use 26 or higher.

Bug: angleproject:2418
Change-Id: I96509e5d645d132a34734558cd0566f1812b615b
Reviewed-on: https://chromium-review.googlesource.com/1066821
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-05-23 20:27:18 +00:00
Jamie Madill ad3aaeba3e Disable Vulkan layers in sanitized builds.
This was causing very slow builds/test runs.

Bug: chromium:837166
Bug: chromium:834269
Change-Id: If2e5665455d4a8af13cbc732a65a07550ace8304
Reviewed-on: https://chromium-review.googlesource.com/1036220
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-05-01 12:50:52 +00:00
Tobin Ehlis 505ea1bb56 Roll (2/2) to latest LVL as of 4/18/18
Bug: angleproject:2482

Moving to HEAD of master as of 4/18/18.
Disable workaround to copy reg.py in BUILD.gn.
Re-enable ANGLE Vulkan build.

Change-Id: I62d79f532bf8fed40872ee9c175caa4b51c2dd25
Reviewed-on: https://chromium-review.googlesource.com/1016683
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-21 00:37:16 +00:00
Tobin Ehlis 5f21df8318 Roll (1/2) LVL version forward and disable VANGLE
Bug: angleproject:2482

Rolling Vulkan validation code forward to HEAD of master as of 4/18/18
morning. Disable Vulkan from the ANGLE build until ANGLE lands in
Chromium. After that second part of roll will be submitted.

This LVL update includes reg.py script fixes for a number of build
warnings as well as a validation fix for vkCmdClearAttachments() in
secondary cmd buffer.

Change-Id: I7f8100f5b656d86caf8f4b5dee61a733a35b7869
Reviewed-on: https://chromium-review.googlesource.com/1016860
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-04-20 21:10:06 +00:00
Courtney Goeltzenleuchter ec10096dba Vulkan: Add build toggle for validation layers.
We want to be able to build without validation layers to
make it easier to use in other environments (e.g. Android)
When angle_enable_vulkan is true and
angle_enable_vulkan_validation_layers is true, build the
Vulkan validation layers.

Bug: angleproject:2489

Change-Id: I266ad8f757c5992021f249217f2be58f0148fcbf
Reviewed-on: https://chromium-review.googlesource.com/1005558
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-18 17:09:12 +00:00
Tobin Ehlis 41c43ce7f7 Roll (2/2) to latest LVL as of 4/16/18
Moving to HEAD of LVL master on morning of 4/16/18.
Made some updates to BUILD.gn to add use debug_utils files now
instead of debug_report.
Re-enable ANGLE Vulkan build.

Bug: angleproject:2482
Change-Id: Ic2ab2a1cd7ecdba3152d433efcdbf427864e7e2b
Reviewed-on: https://chromium-review.googlesource.com/1014258
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-04-16 23:17:20 +00:00
Tobin Ehlis aa8b3982ae Roll (1/2) LVL version forward and disable VANGLE
Rolling Vulkan validation code forward to HEAD of master as of 4/16/18
morning. Disable Vulkan from the ANGLE build until ANGLE lands in
Chromium. After that second part of roll will be submitted.

This LVL update includes MockICD fixes to allow ANGLE perf tests to
run correctly with Null Vulkan configuration.

Bug: angleproject:2482
Change-Id: I61dc9ed293677a1b5839b605d7c3640dca138db3
Reviewed-on: https://chromium-review.googlesource.com/1014405
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-04-16 20:41:03 +00:00
Yuly Novikov ad4f9642a6 Allow ANGLE libs to have arbitrary suffix.
In order to work with tools which intercept EGL and GLES calls.

BUG=angleproject:2343

Change-Id: I63aec7a56648dc4b3e7f4aff7f7d1608709ba118
Reviewed-on: https://chromium-review.googlesource.com/920652
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-03-23 22:09:24 +00:00
Yuly Novikov 40a945f293 Rename vulkan_loader to libvulkan
Also add a build argument to build it as a shared library.

BUG=angleproject:2343

Change-Id: Ia590632b94d71b10d3ee64974fa4f5b4f00c3a70
Reviewed-on: https://chromium-review.googlesource.com/954403
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-03-20 23:18:43 +00:00
Tobin Ehlis da6dd73804 Roll (2/2) to latest LVL as of 3/6/18
Bug: angleproject:2393

Moving to HEAD of LVL master on afternoon of 3/6/18.
Made some updates to BUILD.gn to add args to spirv tools
external_revision_generator.py script.
Re-enable ANGLE Vulkan build.

Change-Id: I1705d7a2acae578bab9bbd8bb93176107e0e21dc
Reviewed-on: https://chromium-review.googlesource.com/952547
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-03-07 21:55:21 +00:00
Tobin Ehlis 37812d4543 Roll (1/2) LVL version forward and disable VANGLE
Bug: angleproject:2393

Rolling Vulkan validation code forward to HEAD of master as of 3/6/18
afternoon. Disable Vulkan from the ANGLE build until ANGLE lands in
Chromium. After that second part of roll will be submitted.

Change-Id: I3c98b42a0b8999e8aa26f538959d888060c2026a
Reviewed-on: https://chromium-review.googlesource.com/952525
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-03-07 17:15:00 +00:00
Jamie Madill a1134ba865 Vulkan: Relocate third-party libraries. (2/2)
This makes the BUILD.gn source lists a lot simpler, since they no
longer need to use a special path variable, but instead can use the
correct relative paths.

This will lead to further simplifications so we can hopefully upstream
the Vulkan tools BUILD.gn files.

Second part updates the build files and removes the old repositories.

Bug: angleproject:2339
Change-Id: I37f5b42a0854ca49448ecbbb32c19c24df57f452
Reviewed-on: https://chromium-review.googlesource.com/905894
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-02-07 21:33:33 +00:00
Jamie Madill b62a1c2ac8 Vulkan: Reorganize BUILD.gn files.
This moves the SPIRV-Tools and glslang and Validation layers build
files into the root of the dep folder.

Requires an upstream Chrome change to allow for a different path
to execute scrips in GN.

Also removes the vulkan_support subdirectory.

Bug: angleproject:2339
Change-Id: I457b5b05547c092a1e7fef6dd0aaadd8068e2143
Reviewed-on: https://chromium-review.googlesource.com/900096
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-02-06 21:47:01 +00:00
Yuly Novikov 199f42941a Vulkan: Enable on Android
Add Android DisplayVk and WindowSurfaceVk variants.
Build Vulkan backend and validation layers on Android
if toolchain uses required NDK API level.
Fix validation layers discovery to work on Android.

BUG=angleproject:2314
TEST=angle_end2end_tests builds and runs on Nexus 5X, 12 VULKAN tests pass

Change-Id: Iac2ec4ecd6470a7552f9f60c023ba1760aa090c5
Reviewed-on: https://chromium-review.googlesource.com/887797
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-01-30 22:10:20 +00:00
Frank Henigman 6df487ef1e Move angle_enable_* inside declare_args().
This allows enabling and disabling parts of the build via gn args,
similar to what gyp allowed.

BUG=angleproject:1569

Change-Id: Ia95c134f98f8941408df96b1d4e2563e713a9ef2
Reviewed-on: https://chromium-review.googlesource.com/838260
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-01-03 21:41:47 +00:00
Jamie Madill 8a57b468e2 Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
Second re-land fixes git.bat access on developer machines.

Re-landing with upstream fixes to the layers so they no longer
need to copy the parameter validation errors to the current
working directory of the layer generation. Also includes fixes
for the GCC build.

This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: Ic1a3ad7458bb743d7279a1af9334693ab6cb59d6
Reviewed-on: https://chromium-review.googlesource.com/845859
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-12-28 22:36:37 +00:00
Zhenyao Mo 06f8637740 Revert "Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)""
This reverts commit 755a9317ff.

Reason for revert: Broke local win build. crbug.com/797253

Original change's description:
> Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
> 
> Re-landing with upstream fixes to the layers so they no longer
> need to copy the parameter validation errors to the current
> working directory of the layer generation. Also includes fixes
> for the GCC build.
> 
> This hasn't been updated in a while, so there are many changes.
> It should also include better validation for memory barriers.
> 
> Also includes updated builds for SPIRV Tools and glslang.
> A few pull requests need to land before landing this in ANGLE.
> 
> This second step re-enables Vulkan and includes the updated build.
> 
> Includes a workaround for parameter_validation.h no longer being
> auto-generated, and the stale file clobbering the build.
> 
> Also includes a fix for an incorrect memory barrier.
> 
> Bug: angleproject:2237
> Change-Id: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e
> Reviewed-on: https://chromium-review.googlesource.com/834429
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>

TBR=fjhenigman@chromium.org,jmadill@chromium.org

Change-Id: I605d72207d64c7d0853678595e255b74ad69d887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2237
Reviewed-on: https://chromium-review.googlesource.com/842918
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
2017-12-22 19:29:22 +00:00
Jamie Madill 755a9317ff Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
Re-landing with upstream fixes to the layers so they no longer
need to copy the parameter validation errors to the current
working directory of the layer generation. Also includes fixes
for the GCC build.

This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e
Reviewed-on: https://chromium-review.googlesource.com/834429
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-12-21 21:09:37 +00:00
Jamie Madill 647dca7672 Revert "Vulkan: Roll loader/validation layers SDK. (2/2)"
This reverts commit f15f9cec31.

Reason for revert:
Causing a compile failure on the Fuchsia config, due to a path
difference. Will fix upstream and re-land, since it's breaking the
auto-roller.

https://chromium-review.googlesource.com/c/chromium/src/+/829878

FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/parameter_validation.cpp 
python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml parameter_validation.cpp -quiet
Error: Could not find vk_validation_error_messages.h
[906/1359] ACTION //third_party/angle/src/vulkan_support:vulkan_gen_object_tracker_cpp(//build/toolchain/linux:clang_x64)
FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/object_tracker.cpp 
python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml object_tracker.cpp -quiet
Error: Could not find vk_validation_error_messages.h

Original change's description:
> Vulkan: Roll loader/validation layers SDK. (2/2)
> 
> This hasn't been updated in a while, so there are many changes.
> It should also include better validation for memory barriers.
> 
> Also includes updated builds for SPIRV Tools and glslang.
> A few pull requests need to land before landing this in ANGLE.
> 
> This second step re-enables Vulkan and includes the updated build.
> 
> Includes a workaround for parameter_validation.h no longer being
> auto-generated, and the stale file clobbering the build.
> 
> Also includes a fix for an incorrect memory barrier.
> 
> Bug: angleproject:2237
> Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a
> Reviewed-on: https://chromium-review.googlesource.com/759197
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>

TBR=fjhenigman@chromium.org,jmadill@chromium.org,cwallez@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: angleproject:2237
Change-Id: I9bc60860668c1da773b6e2fdb83ecc20215e9125
Reviewed-on: https://chromium-review.googlesource.com/830926
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-12-15 22:13:06 +00:00
Jamie Madill f15f9cec31 Vulkan: Roll loader/validation layers SDK. (2/2)
This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a
Reviewed-on: https://chromium-review.googlesource.com/759197
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
2017-12-14 16:52:01 +00:00
Jamie Madill 9af765dd2e Vulkan: Roll loader/validation layers SDK. (1/2)
This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

First part disables Vulkan and rolls the layers. The second part will
re-enable Vulkan with the updated loader/layers build.

Bug: angleproject:2237

Change-Id: I112521541ea66b26eadeb959852418dc91be2e18
Reviewed-on: https://chromium-review.googlesource.com/805417
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-12-13 21:12:27 +00:00
Jamie Madill 6d94f064ae Add more complete NULL driver for the GL back-end.
This implements a NULL driver in OpenGL by stubbing out most of the
GL functions in FunctionsGL except a few static "Gets" that are needed
for initialization with Chromium and the tests. It is intended to be
used for performance testing ONLY and will not have correct behaviour.

It also adds a define to enable conditionally excluding the null entry
points for implementations that wish to save on a bit of binary size.

Also fixes some of the typedefs in functionsgl_typesdefs.h that were
turned up after implementing the direct assignment from NULL stub
entry point, generated from gl.xml, to the function pointer with type
defined from functionsgl_typedefs.h.

BUG=angleproject:2188

Change-Id: Ifa1e4739cb471ab6b52a4bf24c16d9eb4b334ac5
Reviewed-on: https://chromium-review.googlesource.com/727530
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-10-22 15:13:56 +00:00
Frank Henigman d0ef13a250 Stand-alone build with gn.
This should do the same things as the stand-alone gyp build, but with gn.
You should switch to gn as gyp support will go away.

You need a recent enough version of gn.  If yours is too old try this one:
  ./buildtools/linux64/gn

If "gclient sync" or anything fails with an ImportError on gyp stuff,
try running it with the following PYTHONPATH in the environment:
  PYTHONPATH=tools/gyp/pylib

BUG=angleproject:1569

Change-Id: I56d19bec2d8b649a7bd65062c656cbfc69ea3dd8
Reviewed-on: https://chromium-review.googlesource.com/642588
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2017-10-18 17:02:13 +00:00
Frank Henigman 29f148b0ca Support Vulkan on Linux as well as Windows.
Refactor display and surface classes into Win32 and Linux parts and
add Linux parts to gn and gyp builds.

BUG=angleproject:1668

Change-Id: I2a7d29c35f4f42fa0035bd97938d3770f3627672
Reviewed-on: https://chromium-review.googlesource.com/412426
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-04-26 16:54:00 +00:00
Jamie Madill 03b333b484 Vulkan: Fix Clang warning and fix build.
The data_deps section for angle_vulkan was referencing a variable
that didn't exist (no warning for this). Fix the deps which also
then exposes the build problem with the layers with Clang in 32-bit.
Also fix not propagating the Win32 defines to the layer utils.

BUG=chromium:708835

Change-Id: I4a457bfabf1ca735d3f3f3d8b0f0823cfa834b84
Reviewed-on: https://chromium-review.googlesource.com/470087
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-04-07 20:32:10 +00:00
Geoff Lang bf67aa801a Temporarily disable Vulkan for the GN build.
BUG=709342

Change-Id: I980634700d364824af9f9b749fca0ec72abf68f8
Reviewed-on: https://chromium-review.googlesource.com/471507
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-04-07 14:34:13 +00:00
Jamie Madill 9cb2c2623c Re-land: Roll vulkan-validation-layers. (2/2)
bcb80d06bb..f47c534fee

This CL re-enables Vulkan with the new build files.

In particular, this roll contains a fix for a vs2017 signed/unsigned
mismatch warning as error.

Re-land fixes build dependencies.

BUG=chromium:683729

Change-Id: If2b1bc7250037c33402965eae354ca550ecd36c0
Reviewed-on: https://chromium-review.googlesource.com/466106
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-04-03 15:27:19 +00:00
Geoff Lang 795e75735c Revert "Roll vulkan-validation-layers. (2/2)"
This reverts commit 2feaa5e0ac.

Reason for revert: Broke the Chrome Windows builders.

Build: https://build.chromium.org/p/chromium/builders/Win/builds/53432
Error: src\third_party\vulkan-validation-layers\src\include\vulkan\vk_layer.h(39): fatal error C1083: Cannot open include file: 'vk_layer_dispatch_table.h': No such file or directory

Original change's description:
> Roll vulkan-validation-layers. (2/2)
> 
> bcb80d06bb..f47c534fee
> 
> This CL re-enables Vulkan with the new build files.
> 
> In particular, this roll contains a fix for a vs2017 signed/unsigned
> mismatch warning as error.
> 
> BUG=chromium:683729
> 
> Change-Id: Id38e10f97702cac5a51ee194c81972861f15db21
> Reviewed-on: https://chromium-review.googlesource.com/457278
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> 

TBR=geofflang@chromium.org,jmadill@chromium.org,bungeman@chromium.org,cwallez@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=chromium:683729

Change-Id: Ic60f22496fc57904132d574a2fb2c1ca4d875b3e
Reviewed-on: https://chromium-review.googlesource.com/461999
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-03-28 15:49:45 +00:00
Jamie Madill 2feaa5e0ac Roll vulkan-validation-layers. (2/2)
bcb80d06bb..f47c534fee

This CL re-enables Vulkan with the new build files.

In particular, this roll contains a fix for a vs2017 signed/unsigned
mismatch warning as error.

BUG=chromium:683729

Change-Id: Id38e10f97702cac5a51ee194c81972861f15db21
Reviewed-on: https://chromium-review.googlesource.com/457278
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-03-24 18:15:01 +00:00
Jamie Madill 4063e20954 Roll vulkan-validation-layers. (1/2)
bcb80d06bb..f47c534fee

Disables Vulkan in ANGLE temporarily - a second CL will follow with
the updated build files once ANGLE is rolled into Chrome.

In particular, this roll contains a fix for a vs2017 signed/unsigned
mismatch warning as error.

BUG=chromium:683729

Change-Id: Ib23370d79f1359ab290f08e14a847eed75251660
Reviewed-on: https://chromium-review.googlesource.com/458531
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-03-23 16:41:25 +00:00
Jamie Madill 7cc14ee868 Vulkan: Update build files after roll.
They have consolidated to one helper script generator. Simplifies the
GN build. This also re-enables the Vulkan back-end after the roll.

BUG=angleproject:1319

Change-Id: Ie98568ae5d1dc46932ea8d698809561da7591836
Reviewed-on: https://chromium-review.googlesource.com/427307
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-01-13 15:56:48 +00:00
Jamie Madill b4533de1fd Roll Vulkan to bcb80d06b.
This includes a loader fix for systems with stale drivers.

BUG=angleproject:1319

Change-Id: I9ee726bd508c89b19508a5f3113f7b90593635d5
Reviewed-on: https://chromium-review.googlesource.com/427265
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-01-12 21:23:38 +00:00
Frédéric Wang 706972529e Ozone: Only set angle_enable_gl=1 for the DRM/GBM platform.
Currently, the load of DRM dependencies and definition of ANGLE_USE_OZONE
are conditioned by ozone_platform_gbm in the GN build files. However,
angle_enable_gl is always turned on for use_ozone=1. As a consequence,
use_ozone=1 and ozone_platform_gbm=0 (default on Linux Desktop) produces
the following error:

    ../../third_party/angle/src/libANGLE/Display.cpp:52:9: error: Unsupported OpenGL platform.
    #error Unsupported OpenGL platform.

    ../../third_party/angle/src/libANGLE/Display.cpp:192:2: error: Unsupported OpenGL platform.
    #error Unsupported OpenGL platform.

This CL turns off angle_enable_gl in that case to fix that build error.

Change-Id: I42578f30f3353c083f52d4bd345dbe33f3f5e12e
Reviewed-on: https://chromium-review.googlesource.com/408100
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2016-11-08 21:57:18 +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