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

672 Коммитов

Автор SHA1 Сообщение Дата
Geoff Lang 8414d96226 Improve GN args for generating Android rolls.
- Disable unused backends and shader compilation targets.
 - Build for "arm64" to make sure ANGLE_64_BIT_CPU is defined.
 - Use a better merge command now that the branch histories are related

BUG=angleproject:2344

Change-Id: I33949e701379caacf6a392a3bb0eb3523627be14
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090685
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-09 17:30:36 +00:00
angle-autoroll c535c7d241 Roll third_party/vulkan-headers/src 9bd3f561bcee..74556a131735 (1 commits)
9bd3f561bc..74556a1317

git log 9bd3f561bcee..74556a131735 --date=short --first-parent --format='%ad %ae %s'
2020-03-06 oddhack@sonic.net Update for Vulkan-Docs 1.2.134

Created with:
  gclient setdep -r third_party/vulkan-headers/src@74556a131735

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC ianelliott@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=ianelliott@google.com

Bug: None
Change-Id: I5ad970eb2807053d6e6eded91cdc4ecf045a750f
Tbr: ianelliott@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2094803
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-09 09:56:56 +00:00
Courtney Goeltzenleuchter ca04de855d Vulkan: blacklist VK_FORMAT_R8G8B8_UNORM
Chrome makes assumptions that depend on ANGLE implementing 24bit
RGB as 32 RGBX. Since that was the behavior of ANGLE for a while,
remove those formats from the VK format table to force that behavior
again.

Test: Chrome on Fuchsia
Bug: angleproject:4282
Change-Id: I22a3f07b00d7870044ed6b3326dd528721b89af8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2085043
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2020-03-05 00:20:30 +00:00
Xiaoxuan Liu f8b2867816 Vulkan: Add support for VK_EXT_index_type_uint8
Enable VK_EXT_index_type_uint8 Vulkan extension if supported by
VkDevice.

Bug: angleproject:4405
Change-Id: I84d030497898c5944a36d9a88a31e7377ccd5e9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2082391
Commit-Queue: Xiaoxuan Liu <xiaoxuan.liu@arm.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-03-03 16:24:14 +00:00
Jamie Madill 80f55e9742 Expose glGetInteger64vEXT.
This entry point is specifically for retrieving very large timestamp
values from EXT_disjoint_time_query. In GLES 2.0 contexts with the
Vulkan back-end we were getting some astronomical values that couldn't
be cast to 32-bit ints.

Also fix missing dependencies in generate_loader.py.

Bug: angleproject:4433
Change-Id: I59146dcc1a163a24ac2d7c37546f4551a7a8890a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080595
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-03-03 02:01:39 +00:00
Alexey Knyazev 51a9da21ff Add OES_draw_buffers_indexed autogenerated wrappers and validation redirects.
This extension allows setting independent blend state (and color write mask) for each draw buffer. OES and EXT versions provide exactly the same functionality. It is also included in GLES 3.2 core.

Bug: angleproject:4394
Change-Id: I0c27c419472622e309a038dd1463fa0b3e4ca595
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2078587
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-03-02 21:38:09 +00:00
Geoff Lang deb65a6f99 Add scripts for rolling and generating Android.bp for AOSP
BUG=angleproject:2344

Change-Id: I379cc924a6126e22b16e4cb096026d881e06763d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2079195
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-02 20:11:39 +00:00
Jamie Madill 263232efc8 Trace/Replay: Pass CallCapture to parameter replay writer.
This will allow more advanced processing when writing the cpp replay
for a specific parmeter. For the uniform locations map it'll allow us
to look up the specified program from the call parameters.

Bug: angleproject:4411
Change-Id: I4e91b3e4c6775c42140d00b2d155344b553a7404
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067629
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-02-24 22:03:43 +00:00
Michael Spang 468dfed31d Reformat GN files
Otherwise this blocks the CQ at presubmit.

Bug: angleproject:3492
Change-Id: I3cf77c72daa358f5e1eabecf1dcb8808a1dc9e07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2068538
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-21 23:37:44 +00:00
Jamie Madill a18f414547 Trace/Replay: Add uniform location type.
This is a large refactor that replaces instances of "GLint location"
for uniform locations with "UniformLocation location". This boxed type
is similar to the ResourceID types that we use to capture resource IDs
more easily. Eventually this will give us a more portable replay.

Bug: angleproject:4411
Change-Id: I848e861c3956d95b6b953f57f8b6a2c4a676766f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066117
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-02-21 16:35:22 +00:00
Jamie Madill d3aad0f4d1 Vulkan: Remove command graph size overlay widget.
No longer applicable without the command graph.

Bug: angleproject:4029
Change-Id: If75e3aca56eb18567074e14ceb23b3fd7a0afb3d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2065919
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2020-02-21 13:31:44 +00:00
Michael Spang dec00bc833 Generate entrypoints for Fuchsia external objects extensions
Add GL_ANGLE_memory_object_zircon_handle &
GL_ANGLE_semaphore_zircon_handle extensions to supported extensions list
and re-generate bindings.

Bug: angleproject:2475
Change-Id: I464aa402aaac916c1f459930c771a0813ec63c9b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642333
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-20 23:44:31 +00:00
Michael Spang 0941e65385 Add external object extensions for Fuchsia to GL API
Add extensions layered on top of GL_EXT_memory_object and GL_EXT_semaphore
to support GL & Vulkan interoperation on Fuchsia. They are analagous to
the file descriptor versions, except not quite as opaque.

This is a draft; the underlying vulkan extensions have not been submitted
to Khronos.

Bug: angleproject:3492
Change-Id: Ic4723ded9fff752c4186eaa6a7f07d9ac51a3364
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642332
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-02-20 21:54:21 +00:00
Jamie Madill bd4e756ad4 Const-ify the validation layer.
Enforces that the validation layers should be working pretty much read-
only with the exeption of updating caches. Requires a few tricks:

 - updates EP code generation to add 'const' to pointer parameters
 - enables a kludge const_cast to enable the robust query extension
 - makes some members of Framebuffer mutable to work around syncState
 - makes 'is' queries and other methods in Context/State const

Will allow us to more safely expose the no_error extension.

Bug: angleproject:1280
Change-Id: Id9756757854c9e68fc096ecec8d93759fbe6b3a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2060689
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-02-20 16:29:42 +00:00
angle-autoroll 674d0ec2e4 Roll third_party/vulkan-headers/src 726435870206..9bd3f561bcee (1 commits)
7264358702..9bd3f561bc

git log 726435870206..9bd3f561bcee --date=short --first-parent --format='%ad %ae %s'
2020-02-16 oddhack@sonic.net Update for Vulkan-Docs 1.2.133

Created with:
  gclient setdep -r third_party/vulkan-headers/src@9bd3f561bcee

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC courtneygo@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=courtneygo@google.com

Bug: None
Change-Id: I7676db5d51844e2633fa3aa6e660444edaca971a
Tbr: courtneygo@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2058775
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-17 08:06:37 +00:00
Jamie Madill 9e4cf7cab1 Fix vpython caching in trigger.py script.
Several necessary CPID packages were missing from the swarming params.
Add these based on the packages in mb.py:

2192df66cd/mb.py (586)

Allows testing the ANGLE test launcher without modifying recipes.

Bug: angleproject:3162
Change-Id: I3e84bf0d3fd92aed623a918b4d9cfd53f51f2dee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2050427
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-02-12 22:43:08 +00:00
Courtney Goeltzenleuchter 92b00ca882 Roll deqp to get some test fixes
Bug: angleproject:4107
Change-Id: Icfb6b3fc075b9febf486386c26d90b4020ace9ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2047388
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-02-12 14:23:37 +00:00
Brandon Schade 0a6e118d49 Change g_Mutex from std::mutex to std::recursive_mutex
When running flatland on android-10.0.0_r21 (Pixel 3), libgui's ~EglImage calls
eglTerminate which grabs angle's EGL entry point mutex. The path continues
to libvulkan where eventually another egl call happens (eglDestroyImageKHR) and
it will attempt to take the mutex at the entry point again. So we try to get the
mutex multiple times from the same thread.

Change this mutex to a recursive_mutex to allow for this re-entry of EGL calls

Tests: android-10.0.0_r21/frameworks/native/cmds/flatland
Bug: angleproject:4354
Change-Id: If8a817df45e9f58d5f06884510350e17d7127fa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029218
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-02-09 15:08:10 +00:00
Alexey Knyazev 58fc8b11cf Implement RGTC (BC4, BC5) compressed texture formats
gl.xml was modified as two enums were missing from their proper group.
dxgi_support_data.json was fixed to not expect BC4 and BC5 on FL9_3

Bug: angleproject:3149
Change-Id: Ieb97a8cf8e92258c1b44e090e823fac227997174
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033068
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2020-02-04 22:58:25 +00:00
Jamie Madill 3e691bb97a Vulkan: Count active renderpasses in overlay.
Useful debugging information for benchmarks. Also helpful when working
with the command graph to ensure we don't regress performance.

Bug: angleproject:4029
Bug: angleproject:4320
Change-Id: Ibe224c40a3acaca9231bf3869486a0f8bba07ba0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2036402
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-02-04 19:10:50 +00:00
Courtney Goeltzenleuchter cb2b5136e9 Vulkan: Simplify format table generation
Remove the "override" table. That gets in the way of some solutions.
If a format cannot be supported by a native Vulkan format as indicated
in the "map" table, then check fallbacks.

Also add support for native RGBA4 and R5G5B5A1 support. Previously
those formats would be emulated with RGBA8 due to the override, but
now code will check if the native format is available and use it.

Bug: angleproject:4282
Change-Id: Ib33ea40543d91a2c2a95075b277f825a8822037c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994538
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-01-29 15:42:57 +00:00
angle-autoroll e39065501c Roll third_party/vulkan-headers/src 881bbb347a08..726435870206 (1 commits)
881bbb347a..7264358702

git log 881bbb347a08..726435870206 --date=short --first-parent --format='%ad %ae %s'
2020-01-21 oddhack@sonic.net Update for Vulkan-Docs 1.2.132

Created with:
  gclient setdep -r third_party/vulkan-headers/src@726435870206

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC tobine@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=tobine@google.com

Bug: None
Change-Id: Id4cb30292b4e2ac7f47d56eae2461acf1a1dbd91
Tbr: tobine@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2025050
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-28 17:22:02 +00:00
Jamie Madill f144b77bc8 Make run_code_generation fail if git cl format fails.
The lack of error code was hiding errors in the Skia auto-roller.

Bug: skia:9812
Change-Id: Ib43e5eb1749161e9fa0186bfd4a293dadaf82f8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2024178
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-01-28 13:46:03 +00:00
Jonah Ryan-Davis 1a1a1427fd Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control
When ANGLE is using the GL backend on GLX, we can expose
eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function
should return false.

Bug: chromium:1042393
Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-01-27 19:30:45 +00:00
Jeff Vigil 564eb6f2a9 Implement EGL_IMG_context_priority
Change RendererVk to have 3 VkQueues instead of one.
Each queue has a priority. To match extension: Low, Med, High.
gl::Context contains priority.
ContextVk contains a reference to one of the queues.
Every call to vulkan that uses queue, uses the associated context queue.

Bug: angleproject:3962
Change-Id: Ibd913a07a81c77bd975921d6dbae6a222842e88b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1978154
Commit-Queue: Jeff Vigil <j.vigil@samsung.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-25 03:14:25 +00:00
Artem Bolgar e93a438b4e GL_OVR_multiview shouldn't be defined for WebGL spec'ed shaders
According to the latest change in WebGL's OVR_multiview2 spec, the GL_OVR_multiview should NOT be defined. Refer to https://www.khronos.org/registry/webgl/extensions/OVR_multiview2/

I.e. this shader should NOT fail compilation:

#version 300 es
#extension GL_OVR_multiview2 : require
#ifdef GL_OVR_multiview
    #error legacy GL_OVR_multiview support must be forbidden
#endif
....

Bug: angleproject:4279
Change-Id: Ic94cba6785ea3a1fa14d5131dc0960214aa574be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994830
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
2020-01-24 20:52:50 +00:00
Shahbaz Youssefi 5a7356aee8 Add support for non-float mix
The non-float variations of the mix builtin were conditioned to desktop
GLSL, but they are present in ESSL 3.1+.  This change also implements
constant folding of these builtins as exercised by dEQP.

Bug: angleproject:4300
Change-Id: Iec34de4cf370e00d67fd605148cd7848f9e122f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2006809
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-01-22 15:52:40 +00:00
Mohan Maiya df0203a9ae EGL: Add support for EGL_EXT_pixel_format_float extension
Add support for floating point configs. On backends that
support rendering to floating point formats, add them to
EGL's frambuffer config list

Bug: angleproject:3958
Tests: dEQP-EGL.functional.wide_color.*fp16*
       angle_end2end_tests --gtest_filter=EGLFloatSurfaceTest*
Change-Id: Ie65f63013483267985c2b308567bf5025acf750e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993686
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-16 21:31:20 +00:00
James Darpinian 51179335b6 Remove literal tab characters from generate_parser_tools.py
WebKit's tools don't like literal tab characters in their repo.

Bug: angleproject:3439
Change-Id: Ifd26e0bbcfaa604ed26f6a42dd7d2248e94dfeaa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003929
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
2020-01-16 19:12:30 +00:00
angle-autoroll 50a69a14e3 Roll third_party/vulkan-headers/src f63dd5c9d874..881bbb347a08 (1 commits)
f63dd5c9d8..881bbb347a

git log f63dd5c9d874..881bbb347a08 --date=short --first-parent --format='%ad %ae %s'
2020-01-15 oddhack@sonic.net Update for Vulkan-Docs 1.2.131

Created with:
  gclient setdep -r third_party/vulkan-headers/src@881bbb347a08

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC jonahr@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=jonahr@google.com

Bug: None
Change-Id: I2f78b6d68988172304e50fb17ed882b117faa77c
Tbr: jonahr@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2004368
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-16 16:22:10 +00:00
Courtney Goeltzenleuchter f567bac015 Vulkan: Add fallback for D32_UNORM for Swiftshader
Swiftshader does not have support for D24_S8 (typical fallback for
32bit DEPTH_COMPONENTS) but does have D32_FLOAT, so add fallback to
that format. This then allows ANGLE to support OES_depth_texture
extension when using Swiftshader which is needed to allow Vulkan
swiftshader to replace GL swiftshader.

Bug: angleproject:4232
Change-Id: Iaf04fcf0bea8d9cca0b9e7a18e3351ce8c704355
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986413
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-10 21:25:31 +00:00
Kenneth Russell 12ce8f687d Upstream WebKit's iOS port of ANGLE.
Added the EAGL backend authored by Dean Jackson from Apple, and the
refactoring changes needed to support it side-by-side with the macOS
backend. Ran "git cl format" against these diffs.

Defined the EGL_ANGLE_device_eagl extension and allocated an enum out
of ANGLE's reserved range.

The iOS backend is not yet included in any of the GN files.

Bug: angleproject:4263
Change-Id: I631c32930433c03bb16a242955ffedf55174bb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987278
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2020-01-10 02:00:18 +00:00
Jeff Vigil 8c0bbfbbf5 EGL: Implement EGL_ANDROID_framebuffer_target
Add attribute to configs.
Add attribute matching logic.
Does not set attribute in Vulkan configs, need solution to
query Android for which formats are valid. anglebug.com/4208
New end2end test.

Bug: angleproject:3961
Test: angle_end2end_tests --gtest_filter=EGLAndroidFramebufferTargetTest*
Change-Id: I7e14c47b39e9539f6181c3c1d75c76fe63ca0f8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1960508
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2020-01-07 01:10:47 +00:00
Courtney Goeltzenleuchter 7dfc99e5cf Vulkan: Update dEQP source for test fixes
Also fix scripts/gen_vk_gl_cts_build.py to always use '/' as file
separator. Otherwise, running the script on Windows uses '\' which
Linux doesn't like.

Test:
  angle_deqp_gles31_tests --use-angle=swiftshader --gtest_filter=dEQP.GLES31/functional_debug_negative_coverage_get_error_vertex_array_draw_range_elements

Bug: angleproject:2324
Bug: angleproject:4234
Change-Id: I3b212e0d0ba97996f1d86f7fc81e58c3b03a9cbb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1975020
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-06 22:52:57 +00:00
Jeff Vigil 3311ef6568 update date comments to 2020
run_code_generation.py updated comments with 2019 to 2020.
Put all date updates into this one CL.
This also updated hashes.

Bug: angleproject:4262
Change-Id: Ia213dd5e47f155986cbb4161d777724355878af0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986994
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-06 16:25:35 +00:00
Mohan Maiya 942d91520a EGL: Add support for EGL_KHR_gl_colorspace extension
If the Vulkan backend supports VK_EXT_swapchain_colorspace extension,
enable the option for applications to create surfaces with non-linear
formats. Not all formats have non-linear versions and is platform
specific.

Tests: dEQP-EGL.functional.wide_color.*
       angle_deqp_egl_tests --use-angle=vulkan --deqp-gl-context-type=egl --deqp-case=dEQP-EGL.functional.wide_color.*
Bug: angleproject:2514
Change-Id: I441ee797cceef92c84473bfa18605c4fd8180de1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951963
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-12-30 23:45:18 +00:00
Shahbaz Youssefi beb33691ac Vulkan: EXT_gpu_shader5: Fix textureGatherOffsets builtin
This function is the only builtin with arrays as parameter.  A new
constexpr constructor is added to TType to support this, and
gen_builtin_symbols is changed to emit the correct type for offsets
parameter of this function.

Bug: angleproject:3569
Change-Id: I55af58b43f24cd605c622ee685b359535e11ef85
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1975431
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-25 04:03:07 +00:00
Shahbaz Youssefi 4b80fbc8f9 Fix textureGatherOffsets classification
sampler2DRect was placed under ESSL while sampler2DArrayShadow was
placed under desktop GLSL.  They are swapped.

Bug: angleproject:3569
Change-Id: Ibf39868d4cd702d9d1da7fc286171bb70b80d6df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1975430
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-19 05:57:04 +00:00
Yan 17b3c2f3f8 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop
WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance.
(https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/)

This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type
samplerVideoWEBGL to sample it.

In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type
based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it
should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or
samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation.

This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In
this case, samplerVideoWEBGL should map to sampler2D.

Bug: chromium:776222, angleproject:3889
Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-12-18 16:49:26 +00:00
Brandon Schade 751e78884a Update with official gl.xml and re-sort added formats
Use latest Khronos gl.xml file and re-sort format
enums that angle had already added to this file

Bug: angleproject:4093
Change-Id: Ic5c1abc2a79fec14f3c53856a429c9b2489e3275
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1972199
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-12-18 02:39:41 +00:00
Brandon Schade 390c49529e Adds missing extensions to registry_xml.py
Bug: angleproject:4093
Change-Id: I979b54e12c1e897ccfa116f332bf9146dcd00cae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965644
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-16 21:35:08 +00:00
Brandon Schade 2eeb980e8e Added enums to InternalFormat and PixelType groups in gl.xml
Bug: angleproject:4093
Change-Id: Ib69f0553f79d0e5dfbcc9165ad71a42be3e6d55d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965643
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-16 19:35:37 +00:00
Le Hoang Quyen d1860ea17e Metal: support OES_depth_texture
Also added Depth32 & Depth16 texture data upload tests.

Bug: angleproject:2634
Change-Id: I103f1cda1dc915f0dc8b04f7aaa2d8c0f9220cda
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1919281
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-12-15 14:44:43 +00:00
Shahbaz Youssefi 19868b7e42 Restructure textureGatherOffset* builtin declarations
This is in preparation of textureGatherOffsets support.

Bug: angleproject:3569
Change-Id: I4ce5a1e102790181c8f843735961b9c249a69221
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965720
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-13 21:32:47 +00:00
James Darpinian d6053daa62 Remove tabs from source files.
WebKit's Subversion repo refuses to commit source files that contain
tabs.

Bug: angleproject:3439
Change-Id: I0a804bcfa0375a98e19945e20297c90d31106827
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954410
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-10 23:56:47 +00:00
Shahbaz Youssefi 9af3e13785 Vulkan: EXT_gpu_shader5 support: fma
Add the fma() builtin function to ESSL.

Bug: angleproject:3569
Change-Id: Ic8419b4c117ecdd8b47aa733bf7aff9ee7579bbf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954484
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-10 18:16:12 +00:00
angle-autoroll 01553e0e84 Roll third_party/vulkan-headers/src 2b89fd4e2734..0e57fc1cfa56 (1 commits)
2b89fd4e27..0e57fc1cfa

git log 2b89fd4e2734..0e57fc1cfa56 --date=short --first-parent --format='%ad %ae %s'
2019-12-09 oddhack@sonic.net Update for Vulkan-Docs 1.1.130

Created with:
  gclient setdep -r third_party/vulkan-headers/src@0e57fc1cfa56

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC ianelliot@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=ianelliot@google.com

Bug: None
Change-Id: Ie028ebf3b6be0b833e980658b755ef428250614c
Tbr: ianelliot@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1957400
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-12-09 15:18:52 +00:00
Shahbaz Youssefi 795a355921 Vulkan: EXT_gpu_shader5 support: precise
The precise keyword is used in tessellation shaders but introduced in
this extension.

EXT_gpu_shader5 introduces a handful of features to shaders.  This
change only implements the `precise` keyword.

Bug: angleproject:3569
Change-Id: I2252b79098eb8ba2d2faa040d7eaed7548b7051e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1939851
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-12-05 20:20:07 +00:00
Shahbaz Youssefi 249cb20017 Translator: Rename TIntermInvariantDeclaration to ..GlobalQualifier..
This is to support the upcoming `precise` keyword.

Bug: angleproject:3569
Change-Id: Idbcc8fd6f261757dbbf81b381e7a2dae938d8101
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947451
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-03 21:59:43 +00:00
Shahbaz Youssefi a5045ac36d glslang.l: refactor extension checks
Bug: angleproject:3569
Change-Id: I7cbbaa4d1cdd4dd4268f28e06c907958cff9b4e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947450
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-12-03 19:48:02 +00:00
Shahbaz Youssefi 5efb36b9af Automatically call flex/bison if necessary
ANGLE translator's parser code generation is changed to use the binaries
of flex/bison stored in the cloud.  scripts/run_code_generation.py now
automatically runs these files if the input files change.

Bug: angleproject:3419
Change-Id: Icce4247f93b27baf8ee12dbb16112fa2cc98c111
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1940572
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-12-03 19:29:42 +00:00
Jamie Madill c4faeb7981 Use SwiftShader-based ICD generation.
We moved this into the SwiftShader repo proper in:
https://swiftshader-review.googlesource.com/c/SwiftShader/+/38491

We can remove ANGLE's custom rules. Also removes the layer generation
script which was now unused. Also cleans up the Vulkan back-end
BUILD.gn a bit.

Bug: dawn:283
Change-Id: I490e8e8fc6fcadec58aca53a157ce7c4a47def3c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1932340
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-03 15:09:42 +00:00
Shahbaz Youssefi 82219d287b Vulkan: fix alpha values in convert vertex shader
When reading vertex attributes, GLES requires the y and z components to
be filled with 0 if missing, and the alpha channel to be filled with 1.0
for float types and 1 for integer types.

At the same time, this change reduces the number of variations in this
shader.

Bug: angleproject:3192
Change-Id: I1bdf491952c296962fa9160f2d29d415eb3d570d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1936708
Reviewed-by: Jaedon Lee <jaedon1.lee@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-11-28 18:41:50 +00:00
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
Jamie Madill 95b176e414 Tweaks to roll_deps.py.
Removes a few repos that are no longer in DEPS. Also remove fuchsia_sdk
as it's not avaiable by default on some platforms and isn't really part
of Chromium.

Bug: angleproject:4176
Change-Id: I141213811c085b4281f64d93a14eb4a2b83e005e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1940567
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-11-27 15:17:53 +00:00
Ethan Lee a825eb70cc Implement BaseVertex draw calls for Vulkan, OpenGL, NULL contexts.
This adds support for the following functions:

- glDrawElementsBaseVertex
- glDrawRangeElementsBaseVertex
- glDrawElementsInstancedBaseVertex

Bug: angleproject:3582
Bug: angleproject:3402
Bug: angleproject:4166
Change-Id: I83770f62e3a918c0965fd4ca8c7d9e598b8b4154
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1929083
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-11-25 21:27:58 +00:00
angle-autoroll 04e074d1aa Roll third_party/vulkan-headers/src 24347673152e..2b89fd4e2734 (1 commits)
2434767315..2b89fd4e27

git log 24347673152e..2b89fd4e2734 --date=short --no-merges --format='%ad %ae %s'
2019-11-25 oddhack@sonic.net Update for Vulkan-Docs 1.1.129

Created with:
  gclient setdep -r third_party/vulkan-headers/src@2b89fd4e2734

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=cwallez@google.com

Bug: None
Change-Id: I2d4e0d6776b358fd06dd20ec2dda61be22f0951f
Tbr: cwallez@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1934050
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-25 10:16:34 +00:00
Shahbaz Youssefi b066177a9b Vulkan: Remove duplicate shader variation
ConvertVertex's UintToUint and HalfFloatToHalfFloat were generating
identical shaders.

Bug: angleproject:3802
Change-Id: I8eb2d55debbc5501f191830a2723b02d0d1f0827
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925248
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Hyunchang Kim <hckim.kim@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-11-20 13:59:28 +00:00
Tobin Ehlis 240befe55b Add support for gl_HelperInvocation
Added HelperInvocation to builtin_variables.json, regenerate the codegen
portions of compiler, and plumb support for HelperInvocation through the
rest of the compiler.

Skipping some fails on Android and Swiftshader for this initial change and
will debug/fix those issues in a follow-on.

Bug: angleproject:4110
Change-Id: I781a2782ace84200bc615a2cc26b908a62e2aa26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1922061
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-11-19 17:39:36 +00:00
angle-autoroll 430d4059ad Roll third_party/vulkan-headers/src d42d0747ee1b..ba6cbb047868 (1 commits)
d42d0747ee..ba6cbb0478

git log d42d0747ee1b..ba6cbb047868 --date=short --no-merges --format='%ad %ae %s'
2019-11-18 oddhack@sonic.net Update for Vulkan-Docs 1.1.128

Created with:
  gclient setdep -r third_party/vulkan-headers/src@ba6cbb047868

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC courtneygo@google.com,borenet@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

TBR=borenet@google.com, courtneygo@google.com

Bug: None
Change-Id: I7ae8bd8f3081239cb71b5f7f1ddf328a356eaac1
Tbr: courtneygo@google.com,borenet@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1921815
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-18 14:16:56 +00:00
Tim Van Patten 11c487a891 Manually copy dEQP data files to output directory
dEQP has data files that live in several directories within dEQP's
source tree. For example, GLES3 has data files that live within:

data/gles3/data/
external/graphicsfuzz/data/gles3/

However, we can only tell dEQP about a single data directory during
initialization of dEQP. To get around this, we are manually copying all
of the necessary data files to the output generated files directory and
pointing dEQP to this single directory. This also helps us solve a
second problem related to the paths that dEQP uses when accessing
graphicsfuzz data files.

For the graphicsfuzz tests, dEQP will attempt to open the necessary
shaders by accessing them with the path:

data/gles3/graphicsfuzz/

However, those files would normally live at the path that matches their
location within the source tree:

external/graphicsfuzz/data/gles3/graphicsfuzz/

As part of the manual copy of these data files, we are also able to
strip the extra 'external/graphicsfuzz/' portion of the path.

Bug: angleproject:2322
Test: dEQP
Change-Id: Ibc96442c221485e2f246890fa8fe51f090c5e222
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1881759
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-11-14 23:08:59 +00:00
angle-autoroll f533355b41 Roll third_party/vulkan-headers/src d287523f48db..d42d0747ee1b (6 commits)
d287523f48..d42d0747ee

git log d287523f48db..d42d0747ee1b --date=short --no-merges --format='%ad %ae %s'
2019-11-06 jmadill@chromium.org GN: Add support for Google Games Platform.
2019-11-06 8729214+jonahryandavis@users.noreply.github.com build: BUILD.gn missing defines for MacOS
2019-11-04 oddhack@sonic.net Update for Vulkan-Docs 1.1.127
2019-10-28 shannon@lunarg.com vulkan: Fix typo for `operator==` in `vulkan.hpp`
2019-10-25 shannon@lunarg.com vulkan: Update `vulkan.hpp` for VS2015 VT fix
2019-10-21 oddhack@sonic.net Update for Vulkan-Docs 1.1.126

Created with:
  gclient setdep -r third_party/vulkan-headers/src@d42d0747ee1b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-headers-angle-autoroll
Please CC cnorthrop@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Bug: None
Tbr: cnorthrop@google.com
Change-Id: I36b0e8d3141bf621fdee054cd45d0e98cd3b70c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1914130
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-13 21:25:25 +00:00
Jamie Madill e167f76b08 Capture/Replay: Pass gl::State to capture functions.
This replaces passing gl::Context. Using a gl::State directly will more
easily let the mid-execution replay code pass a mocked gl::State
instead of having to modify the real underlying Context state. For
example when capturing pixel pack and unpack parameters the states
could not be overridden without changing the gl::Context itself.
Similarly when capturing client side data.

Also moves a query parameter info function into queryutils so it can be
accessible to the State-based capture.

Refactoring change only.

Bug: angleproject:3611
Change-Id: I3c064001cfa83ebbb67a2b8fc8b6180491edd215
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1899728
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-07 13:39:59 +00:00
Jamie Madill 1bae56151d Remove some ignores from export_targets.py.
These were fixed upstream.

Bug: angleproject:4077 
Change-Id: I656616a111e1703f8a910c27e6be3ec3e918f6ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1899726
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-05 17:40:18 +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
Jeff Vigil 71b0f0b588 EGL: Implement EGL_KHR_surfaceless_context
Add extension string to registry
Add extension flag to EGL and Vulkan Displays

Bug: angleproject:3960
Test: dEQP-EGL.functional.surfaceless_context.*
      angle_end2end_tests --gtest_filter=EGLSurfacelessContextTest*
Change-Id: Id17916f1f636454af395b7bc92892dcf8fc93e54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1885075
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-11-04 20:17:59 +00:00
Jamie Madill a576e0d41c Capture/Replay: Only convert GLES 2 GLenums to string.
Previously the enum conversion script would convert all enums in gl.xml
including those for desktop GL. When replaying from a CPP file we would
sometimes try to use enum values that only are exposed in desktop GL.

One example is GL_TEXTURE_MAX_ANISOTROPY/GL_TEXTURE_MAX_ANISOTROPY_EXT.
GLES only has the "EXT" version. Desktop uses the core version. This
was breaking a replay sample that used the EXT enum.

Fix this by a) including the anisotropy extension in registry_xml and
b) updating the enum script to only parse GLES 2 entries. In the future
we could improve the situation by auto-generating a header that defines
exactly the enums we need for ANGLE.

Also updates the enum helper to use uppercase enum values.

Bug: angleproject:3611
Change-Id: I1e01608bc8af282dc078d5a19ac4eba659c96b57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894143
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-11-03 00:47:41 +00:00
shrekshao 35f74cd6f8 Reorder BaseVertexBaseInstance draw calls parameters
To match the parameter order of MultiDraw* calls.
And potentially expose in chromium directly with ANGLE_ prefix.

Bug: angleproject:3402, chromium:891861
Change-Id: I19548f4c3c7faa422e43905850b218039de43015
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894241
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-11-01 20:14:45 +00:00
Le Quyen fe26bae452 Metal backend implementation pt 2
This is without Metal specific shader translator implemented yet.

Bug: angleproject:2634
Change-Id: I95d589442251c9ba111bd05a2dc379a36739046c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855069
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-01 17:37:15 +00:00
Jamie Madill e96039218e Capture/Replay: Correct a few GLenum replay issues.
This change refactors the GLenum utils into a non-autogenerated and an
autogenerated portion. That makes it easier to modify the non-auto-
generated bits to properly output GLenums even when the gl.xml data
isn't totally correct. For instance, the "GetPName" group was missing
a bunch of queries. Instead of trying to fix the GL we can simply fall
back to querying the "Default" group when we return invalid enum.

Also corrects a missing "0x" on hex output.

Also allows the capture/replay sample to specify the correct binary
data directory when testing a replay.

Bug: angleproject:3611
Change-Id: I8e4c690b2850bb157a8cde8b057b20603e4b177d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1891008
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-01 00:08:02 +00:00
Jamie Madill a12b303296 Don't cc angle-team on Chromium DEPS rolls.
Leave a TODO to use the wrangler email alias when Chrome's rota-ng
tool is updated.

Bug: angleproject:4059
Change-Id: Ide7538b4762ea3ec0f21237e1f2af7dba5023301
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1884012
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-28 17:17:23 +00:00
Jamie Madill 0964988b77 Fixups to ANGLE_get_image boilerplate.
- Remove level parameter from GetRenderbufferImage.
- Add packed enum handling to GetTexImage.
- Fix ext spec reference to table 8.4.

Bug: angleproject:3944
Change-Id: I8f67608396217aaddb789dd95d0f3e2378ce918d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879960
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-28 15:21:53 +00:00
Jamie Madill 04ee27efff Capture/Replay: Add ANGLE_get_image extension.
Will be used for mid-execution capture. Only has a
stubbed-out implementation right now.

Bug: angleproject:3944
Change-Id: I6ddae07907ecbdbd3be9a5d2d3fcafeb425445e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1878888
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-10-25 19:02:16 +00:00
Jamie Madill c017cee9df Enable "-Wundefined-reinterpret-cast".
A couple cases popped up where we were using an undefined cast.
Fix them by rearranging assignment macros to use decltype.

Another warning that is enabled in Skia.

Bug: angleproject:4046
Change-Id: Ibdbae0b2a96909b101a259ff805b8b2d43a5174b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877479
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-25 04:44:49 +00:00
Jonah Ryan-Davis 5335faaece Robust validate_step_info in generate_stats.py
If there is a warning during validate_step_info and the step_info is
None, the script should not attempt to update that step in the
Spreadsheet object.

Bug: angleproject:4030
Change-Id: Ib94ba82219745ee4ab36c52e9b1d3a04a76a05d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1872569
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-22 00:06:35 +00:00
Jamie Madill beacd8c815 Vulkan: Rename format fields.
Renames 'angleFormat' to 'intendedFormat'. Also renames 'bufferFormat'
and 'imageFormat' to 'actualImageFormat' and 'actualBufferFormat'. This
renaming should make it clearer to the reader what the meaning of the
different format fields are. Intended format is the front-end format
and the actual formats are the formats we pass to Vulkan. Also updates
the documentation.

Bug: angleproject:4009
Change-Id: If61bf7250e88f7ed3d452718574c963d718e27b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866077
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-20 17:21:55 +00:00
Courtney Goeltzenleuchter 7f418fc267 Vulkan: lineloop support for DrawArrayIndirect
Add support for lineloops.
Includes a compute shader for generating an index
buffer to draw lineloop.

Instancing turns out to be a special case for indirect draws if we
have vertex attributes that need to be emulated (e.g. divisor too
large or native vertex format not available).

Test: dEQP.GLES31/functional_draw_indirect_*
      angle_end2end_tests --gtest_filter=LineLoopIndirectTest.*/*
      dEQP.GLES3/functional_draw_*
Bug: angleproject:3564
Change-Id: I1fdabe2c8a690c8b6df9e252e1e839e08796bcca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1834682
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-10-18 13:32:37 +00:00
Tobin Ehlis 6dee176c8d Vulkan:Roll vulkan layers and headers
This layer update contains a fix for x11 build.

Bug: 1011068
Change-Id: I75354b51cd43d3b57f427e8505b4bb7bd3f62eed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866960
Commit-Queue: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-17 22:42:05 +00:00
James Darpinian acf66fdd4e Fix registry_xml.py dependency
registry_xml.py was not included in gen_gl_enum_utils.py inputs.
gen_gl_enum_utils might not run when it should because of this missing
dependency.

Discovered in https://chromium-review.googlesource.com/c/angle/angle/+/1838418/6/src/libANGLE/gl_enum_utils_autogen.cpp#1810

Bug: angleproject:4000
Change-Id: Ib98df7046a59800c102be54b44f46a203ba77c42
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1857645
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-15 01:05:08 +00:00
Jamie Madill 1948af385c Add a roll_deps script based on WebRTC.
Should make the process of rolling Chromium DEPS into ANGLE easier.
Eventually we could set up an auto-roller.

Original:

https://webrtc.googlesource.com/src/+/master/tools_webrtc/autoroller/roll_deps.py

Modified to include ANGLE's Chromium DEPS only. We will continue to use
Skia's auto-roller for more one-off DEPS.

Also adds a 'chromium_revision' DEPS custom variable that we could
potentially use for other things like pinning a Chromium version on our
testers.

Sample usage:

python scripts/roll_deps.py -v --clean -i

-v : verbose
--clean : cleans previous roll branch
-i : ignore dirty tree

Bug: angleproject:3986
Change-Id: I7289cf76eb5635a286c20453e846d4ff9a0481b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1852707
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-10-12 00:49:16 +00:00
James Darpinian c42da4e57c Extend ANGLE_request_extension with DisableExtension
ARB_texture_rectangle is the only currently supported disablable
extension. This allows us to use ARB_texture_rectangle in WebGL
implementations without exposing it to WebGL user shaders.

Bug: angleproject:3956
Bug: angleproject:3770
Change-Id: I80b10d2e9c9feebe545ce15195721487165ecc51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838418
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-10-12 00:42:21 +00:00
Le Quyen 253019996d Metal implementation pt 1: autogen resources
Autogen format table and internal shaders for Metal.

Bug: angleproject:2634
Change-Id: I4d81fcd17a0e9959ba9c38a250acc7abb168f54c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855067
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-11 21:59:00 +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
Ian Elliott aa292a59f9 Generate GLES 3.2 entry points
This is a combination of:

- Changing the "scripts/generate_entry_points.py" script to tell it to
  also auto-generate GLES 3.2.  Also changing "scripts/gen_proc_table.py".

- Generating new and modified files needed to add GLES 3.2 to the
  ANGLE front-end.  This is done by running the following command:
  "python scripts/run_code_generation.py".

- Creating the following files:

  - src/libANGLE/validationES32.h
  - src/libANGLE/validationES32.cpp
  - src/libANGLE/capture_gles_3_2_params.cpp

- Hand-editing the following files:

  - src/libGLESv1_CM/libGLESv1_CM.cpp
  - include/GLES2/gl2ext_angle.h
  - src/libGLESv2.gni
  - src/libANGLE/Context.h
  - src/libANGLE/Context.cpp
  - src/libANGLE/Context_gl.cpp
  - src/libANGLE/ErrorStrings.h
  - src/libANGLE/State.h
  - src/libANGLE/validationES1.cpp
  - src/libANGLE/validationGL3.cpp
  - src/libANGLE/validationGL31.cpp
  - src/libANGLE/validationGL32.cpp
  - src/libANGLE/validationGL33.cpp
  - src/libANGLE/validationGL4.cpp
  - src/libANGLE/validationGL43.cpp
  - src/libANGLE/validationGL45.cpp

Bug: angleproject:3649
Change-Id: I5b67f72e3e3b55e74039ec3e28aa8d399ec08cf2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1850231
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2019-10-10 16:15:48 +00:00
Le Quyen 6e65398161 Added PVRTC compression extension needed for Metal on iOS.
Bug: angleproject:2634
Change-Id: I413f754fe5551b1e248bc2b824b327b92d8c70f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849076
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-10-10 15:17:38 +00:00
Geoff Lang 2fa9d73469 Partially Revert "Convert DXT1 RGB data to DXT3 RGBA when uploading to the GPU."
This reverts commit e6582161b0.

Remove the DXT1->DXT3 transcoding but leave in the MacOS workarounds for fixing
the alpha channel of DXT1 textures.

BUG=angleproject:3729

Change-Id: Ib276c1e4a58155866da8c661cba2063a4e4304fe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1846015
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-10-09 18:35:12 +00:00
Courtney Goeltzenleuchter a333b87cfc Vulkan: Handle D24 -> D32FS8X24 depth fallback
Swiftshader's depth support requires that ANGLE fall back to using
the D32FS8X24 depth format. Some conversion routines needed to be
added to support that use.

Test:
dEQP.GLES3/functional_texture_format_sized_*

Bug: angleproject/3937
Change-Id: I979dc5e9b01dac40f564daad4f4817b61bd056ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1829170
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-10-07 21:27:10 +00:00
Brian Sheedy cc4d833180 Reland "Add export_targets.py to presubmit"
This is a reland of c40a21f353

Changes: Fixed presubmit failing on Windows due to being unable

to find gn, fixed export_targets.py failing on Windows for

Googlers due to being unable to find Visual Studio files.

Original change's description:
> Add export_targets.py to presubmit
>
> Adds export_targets.py to run as part of presubmit in order to help
> prevent breaking Firefox with BUILD.gn changes.
>
> Bug: chromium:1003151
> Change-Id: I5a7ab00891cd7c094c797e6150f642f803a726b6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802038
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

Bug: chromium:1003151
Change-Id: I321ade86f2d969601afb8e1ed61c36bf166887b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1842127
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-07 18:44:27 +00:00
Jamie Madill a424214638 Revert "Add export_targets.py to presubmit"
This reverts commit c40a21f353.

Reason for revert: Seems to be failing locally on Windows.
See bug for more info.

Original change's description:
> Add export_targets.py to presubmit
> 
> Adds export_targets.py to run as part of presubmit in order to help
> prevent breaking Firefox with BUILD.gn changes.
> 
> Bug: chromium:1003151
> Change-Id: I5a7ab00891cd7c094c797e6150f642f803a726b6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802038
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

TBR=ynovikov@chromium.org,bsheedy@chromium.org,jgilbert@mozilla.com,jmadill@chromium.org

Change-Id: Ic9a2eb58d847a40349e64b931c369f07c24b799c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1003151
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1841877
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-04 18:57:49 +00:00
Brian Sheedy c40a21f353 Add export_targets.py to presubmit
Adds export_targets.py to run as part of presubmit in order to help
prevent breaking Firefox with BUILD.gn changes.

Bug: chromium:1003151
Change-Id: I5a7ab00891cd7c094c797e6150f642f803a726b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802038
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-10-04 18:21:14 +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
Mohan Maiya 1850492e30 Vulkan: Disable OES_vertex_type_10_10_10_2 on GLES 2.0
- Because of the difference in the SNORM to FLOAT conversion formula
  between GLES 2.0 and 3.0, OES_vertex_type_10_10_10_2 is disabled
  when the context version is lower than 3.0.
- Modify test conversion formula to be compliant with GLES 3.0 equation

Bug: angleproject:3868
Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed*Vulkan
Change-Id: I8b85d8146ee05353bc40fa0022f05d6634c33110
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1792197
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-03 15:17:39 +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
Courtney Goeltzenleuchter f03259ad72 Vulkan: lineloop support for DrawElementsIndirect
Add support for lineloops.
Includes a compute shader for converting lineloop index
buffer with optional restart into linestrip.

Test:
    dEQP.GLES31/functional_draw_indirect_*
    angle_end2end_tests --gtest_filter=LineLoopIndirectTest.*/*

Bug: angleproject:3564
Change-Id: I12d08db1c8d99867f0611e53be50193647695260
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1797106
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-10-02 13:34:12 +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
Courtney Goeltzenleuchter 3c2a52309a Vulkan: 8bit index support for DrawElementsIndirect
Add partial support for DrawElementsIndirect.
This supports all primitives types except lineloop.
Includes a compute shader for converting 8bit index
buffers to 16bit index buffers where the index buffer range
is defined in a GPU buffer.

Test:
    dEQP.GLES31/functional_draw_indirect_*

Bug: angleproject:3564
Change-Id: Ibe9c55323e46a398f0b703cd8597a72ba6790570
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1792948
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-26 20:03:34 +00:00
Hyunchang Kim d4c75347e4 Vulkan: Enable GPU conversion from RGB16F to RGBA16F
- Add proper GPU conversion routine when the source and destination
  format of vertex attribute is half float data type.
- Add an end2end test which utilizes half float GPU conversion path.

Bug: angleproject:3802
Test: angle_end2end_tests --gtest_filter=*VertexAttributeTest.HalfFloatBuffer*
Change-Id: Ia88a4984156f8967796bea3852c3cde714f2acab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1824799
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2019-09-25 17:33:45 +00:00
Jamie Madill a905cbcdc2 Compact built-in symbol table.
Should reduce the binary size bloat from the perfect hashing. Local
testing on Windows shows a significant size reduction.

Bug: chromium:998535
Change-Id: I411cc5a917036d2239d15353d760f44e40faa26c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-09-23 19:33: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
Jamie Madill c37d237012 Reland "Refactor built-in symbol table."
This is a reland of 59d982c0dc

Original change's description:
> Refactor built-in symbol table.
> 
> In preparation for reducing binary size. Shortend a bunch of strings
> and symbol prefixes so the autogen file will be more compact.
> 
> Bug: chromium:998535
> Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

Bug: chromium:998535
Change-Id: Iebc5b1b5e1a084257fba3c50026cc62df5a879b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1817499
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
2019-09-21 03:13:08 +00:00
Zhenyao Mo f585c2fbff Revert "Refactor built-in symbol table."
This reverts commit 59d982c0dc.

Reason for revert: crbug.com/1006501

Original change's description:
> Refactor built-in symbol table.
> 
> In preparation for reducing binary size. Shortend a bunch of strings
> and symbol prefixes so the autogen file will be more compact.
> 
> Bug: chromium:998535
> Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>

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

Change-Id: Ie540da8ea4429e075a3284183e5a004cbcf1307b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:998535,chromium:1006501
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1817497
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
2019-09-21 02:13:00 +00:00
Jamie Madill 59d982c0dc Refactor built-in symbol table.
In preparation for reducing binary size. Shortend a bunch of strings
and symbol prefixes so the autogen file will be more compact.

Bug: chromium:998535
Change-Id: If1bedaaacc06dce9678d432055ffa0c9215a8dbd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814724
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-20 20:32:29 +00:00
Mohan Maiya fea6576678 Vulkan: Add support for OES_vertex_type_10_10_10_2
- Add support to CPU/GPU convert vertex formats
- Add test cases for type conversion in angle_end2end_tests
- Fix a bug in shader script by adding a ceil when calculating bytes

Bug: angleproject:3192
Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed1010102*
Change-Id: I57bab9fc1c1041cd734746d0e52a33717b635ec0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1788495
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2019-09-19 19:27:53 +00:00
Geoff Lang e6582161b0 Convert DXT1 RGB data to DXT3 RGBA when uploading to the GPU.
DXT1 has a specific 'BLACK' code that results in transparent black pixels when
sampled. D3D does not have specific RGB-only DXT1 formats like OpenGL does so
when this code is encountered, we sample 0 alpha for these pixels when GL would
expect 1 because the alpha channel should not exist.

Work around this by converting to DXT3 RGBA, adding an extra block of 1.0 alpha
pixels for each color block.

Mac Intel OpenGL requires additional workarounds to always sample 1.0 alpha.
Set the texture swizzle parameters to force it.

BUG=angleproject:3729

Change-Id: Ia3647085acd97bb01af4e95ef3f6f21dcfb6a554
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804880
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
2019-09-19 14:49:26 +00:00
Jeff Vigil a7003d5fc3 Reland "EGL: Implement EGL_KHR_no_config_context"
Add extension string and flag to all renderers that pass
Modify eglCreateContext to accept EGL_NO_CONFIG
Modify eglQueryContext per specification
Modify eglMakeCurrent to bypass surface-context config compatibility checks
Add check for client API
Create new end2end test EGLNoConfigContextTest
Disable on most renderers to prevent possible fail with future configs

Bug: angleproject:3635
Test: dEQP-EGL.functional.create_context.no_config*
      angle_end2end_tests --gtest_filter=EGLNoConfigContextTest*
Change-Id: I88c1922a1e75afcc49922a9eccb4f1ae046c024a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1806140
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-17 22:05:51 +00:00
Jamie Madill 01dfe40482 Capture/Replay: Use resource ID maps in cpp replay.
Introduces a new enum for resource ID types. This is used in auto-
generated code to convert ParamType to resource ID map types.

Also implements a lot of new parameter captures for gen/delete calls.

Bug: angleproject:3611
Change-Id: I26cca1df88d1783d9830c89438c99f7593a70ea9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784059
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-09-17 03:53:02 +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
Zhenyao Mo d32dae1bb3 Revert "EGL: Implement EGL_KHR_no_config_context"
This reverts commit c4b1fbd69b.

Reason for revert: https://crbug.com/1003971

Original change's description:
> EGL: Implement EGL_KHR_no_config_context
> 
> Add extension string and flag to all renderers that pass
> Modify eglCreateContext to accept EGL_NO_CONFIG
> Modify eglQueryContext per specification
> Modify eglMakeCurrent to bypass surface-context config compatibility checks
> Add check for client API
> Create new end2end test EGLNoConfigContextTest
> Disable on most renderers to prevent possible fail with future configs
> 
> Bug: angleproject:3635
> Test: dEQP-EGL.functional.create_context.no_config*
>       angle_end2end_tests --gtest_filter=EGLNoConfigContextTest*
> Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,timvp@google.com,jmadill@chromium.org,m.maiya@samsung.com,j.vigil@samsung.com

Change-Id: I849aa796803e3cda9b480a39be813ef9105325bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3635
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1803789
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
2019-09-13 22:07:11 +00:00
Mohan Maiya 6caa265261 Vulkan: Support float textures and renderbuffers
Fixed support in the vulkan backend for legacy
GLES2.0 formats (luminance, alpha,
luminance_alpha)

Correctly exposed the following extensions:
OES_texture_float
OES_texture_half_float
OES_texture_float_linear
OES_texture_half_float_linear
EXT_color_buffer_float
EXT_color_buffer_half_float

Some of the above extensions have different
requirements depending on other extension support
and the context client version, and were
incorrectly assuming the most restrictive
requirements to be exposed.

Implemented end2end tests for:
OES_texture_float
OES_texture_half_float
OES_texture_float_linear
OES_texture_half_float_linear
EXT_color_buffer_float
EXT_color_buffer_half_float

Bug: angleproject:2898
Bug: angleproject:2726
Test: ./angle_end2end_tests --gtest_filter='Texture2DFloatTest*'
Change-Id: I7024aa1393eadafb5a0fb83c23e9035aae650b67
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740276
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-13 20:59:00 +00:00
Jeff Vigil c4b1fbd69b EGL: Implement EGL_KHR_no_config_context
Add extension string and flag to all renderers that pass
Modify eglCreateContext to accept EGL_NO_CONFIG
Modify eglQueryContext per specification
Modify eglMakeCurrent to bypass surface-context config compatibility checks
Add check for client API
Create new end2end test EGLNoConfigContextTest
Disable on most renderers to prevent possible fail with future configs

Bug: angleproject:3635
Test: dEQP-EGL.functional.create_context.no_config*
      angle_end2end_tests --gtest_filter=EGLNoConfigContextTest*
Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-13 14:58:06 +00:00
Jiacheng Lu d0e56cc642 Add fallback to write GLenum as hex in capture
1. Add extension 'GL_ANGLE_program_binary' to registry_xml.py, this
extension brings enum 'GL_PROGRAM_BINARY_ANGLE' which ANGLE already
supports.
2. Add a fallback for converting GLenum and GLbitfield to string, for
any GLenum value not found in the conversion table, write out its hex
value instead of 'EnumUnknown'. It prevents GLenum from some
unregistered extensions breaking the frame capture.

Bug: angleproject:3804
Change-Id: I36a676305fbbcff2173bbc9f818ff589abe51434
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775028
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-09-05 09:49:49 +00:00
Mingyu Hu 7e44ec26d6 GL_EXT_multisampled_render_to_texture extension. Part 1.
Adding new parameters for extension without adding any real code change. Since no new code paths were added, we expect all tests to pass as before.

Bug: angleproject:980428
Change-Id: I551b46a66f422eabd357fd021e00cf266a991efb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1772377
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-04 19:37:30 +00:00
Jamie Madill 26a87516dc Remove overlay font hash from codegen.
This prevents a presubmit error on Windows. Seems like the binary file
differs somehow. Remove it from the hashes until we can investigate.

Bug: angleproject:3892
Change-Id: I4f06dbe37e3e02f9905654d202a8b4fba78b9323
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1783403
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-04 13:36:35 +00:00
Jiacheng Lu c3f7873b9a Use TransformFeedbackID in place of GLuint handle
Bug: angleproject:3804
Change-Id: Ib8fbec89f28645790df98a184f47303f4a8d64c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779343
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-09-03 22:04:57 +00:00
Jiacheng Lu feb8507f4b Use VertexArrayID in place of GLuint handle
Bug: angleproject:3804
Change-Id: I0454533eff13218a6aa1e1672ffcd0e76aedb399
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769716
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-03 18:44:57 +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
Jiacheng Lu 9deb3bfaa1 Use MemoryObjectID in place of GLuint handle
Bug: angleproject:3804
Change-Id: I7ca86089fe1e72c136c0fc1947ad43cecee122eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769544
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-09-02 18:56:24 +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
Jiacheng Lu f0640bc3c1 Use SemaphoreID in place of GLuint handle
Bug: angleproject:3804
Change-Id: Iabaae60ed7cbbe423bf768c506099d26cf0dedcf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1768978
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-30 23:20:44 +00:00
Jiacheng Lu 2c5d48a6f0 Use FramebufferID in place of GLuint handle
Bug: angleproject:3804
Change-Id: I5e1b5f1903b05a91468379e00ec130802315cdc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769039
Reviewed-by: Jiacheng Lu <lujc@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
2019-08-30 18:47:38 +00:00
Jiacheng Lu 120b61d34b Use ShaderProgramID in place of GLuint handles
Bug: angleproject:3804
Change-Id: I5dc640004c2cc054c53261e8e939b6a9f5fc23bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762363
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-08-29 23:21:23 +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
Mohan Maiya 324b391559 Vulkan: Fix compute shader bug affecting 10_10_10_2 formats
When the source format is 10_10_10_2, valueBits needs to be
"2" if the component is "3" i.e, the alpha channel. It was
incorrectly set to "10" for all components

Bug: angleproject:3866
Change-Id: If206c63d704a7a485681e483e12ae9ab611b0d99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775105
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2019-08-29 16:27:52 +00:00
Jiacheng Lu 378c18813b Use ProgramPipelineID in place of GLuint handle
Bug: angleproject:3804
Change-Id: Ice37a4b3d43008e5bcd5d0a7528514d5bb504066
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767322
Reviewed-by: Jiacheng Lu <lujc@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
2019-08-28 21:05:47 +00:00
Jiacheng Lu 7b5744f41f Use PathID in place of GLuint handle
Bug: angleproject:3804
Change-Id: Ibadfc2c33e4af1cca22caa1dbe96ac48a4a85ffa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1766822
Reviewed-by: Jiacheng Lu <lujc@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
2019-08-28 20:11:07 +00:00
Jiacheng Lu 814a0a1b3f Use QueryID in place of GLuint handle
Bug: angleproject:3804
Change-Id: I921bbe7f67c025ab2b624fe14530c04ac17346f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765889
Reviewed-by: Jiacheng Lu <lujc@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
2019-08-28 16:59:29 +00:00
Jiacheng Lu 05114fe72c Support in memory frame capture replay
Enable FrameCapture to dispatch its calls back to Context and replay
them.

Bug: angleproject:3785
Change-Id: I580eff1fca3e39414a9b45bb296e0f3866ea33bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1747055
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-28 13:34:27 +00:00
shrekshao cd31f2860b Implement Draw base vertex and base instance functions
This patch implements functionality of  glDrawArraysInstancedBaseInstanceANGLE,
glDrawElementsInstancedBaseVertexBaseInstanceANGLE,
glMultiDrawArraysInstancedBaseInstanceANGLE,
and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE

Workaround for OpenGL driver on Mac:
gl_VertexID on Mac with AMD GPU doesn't include baseVertex value.
So replace gl_VertexID with (gl_VertexID + angle_BaseVertex) if any.

Workaround for Vulkan GLSL:
gl_InstanceIndex on Vulkan includes baseInstance. So replace
gl_InstanceIndex with (gl_InstanceIndex - angle_BaseInstance) when
angle_BaseInstance is declared.

Bug: chromium:891861, angleproject:3402
Change-Id: Ia1d94b5d4d7da7e635468c05c962c4f7eb1b1919
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750126
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-26 21:33:24 +00:00
Jiacheng Lu 962503e75a Use FenceNVID in place of GLuint handles
Bug: angleproject:3804
Change-Id: I29c16e17c3a426efbbf0b60670581962ee505f3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1764298
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-26 17:46:52 +00:00
Jamie Madill 3c6b2e1613 More improvements to trace logging.
- output 'glDrawArrays' instead of 'DrawArrays'
- output context IDs for multithreaded scenarios
- output to trace even when platform logging is on
- fix newlines in trace file output

Bug: angleproject:3815
Change-Id: Ie07c5c91d9eae6204aaf6f6319ef318b88d292aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761163
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
2019-08-23 23:17:26 +00:00
Brian Sheedy 2f4a751866 Refactor perf tests to fix metric/story swapping
Refactors the perf tests to fix the issue of metric and story being
swapped, which causes issues when trying to convert to histograms.

Specifically, does the following:
1. Rolls the version of src/tests/perf_tests/third_party/perf/ to
   Chromium 476dae823269c8d05b544271af97ad1adb0db8ee
2. Switch to using PerfResultReporter instead of PrintResult directly.
3. Split RenderTestParams::suffix into backend and story; backend is
   used as part of the metric, while story is used as the story.
4. Remove the "average" metric that was being automatically reported
   by ANGLEPerfTest, as reported results are automatically averaged.
5. Update the reported metric to more clearly distinguish between
   test, backend, and metric. It is now name_backend.metric. e.g.
   DrawCallPerf_vulkan.wall_time.

Bug: chromium:923564,chromium:924618
Change-Id: I00cc191407052f23df57dbfa53b6fb088fc26960
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762360
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-08-23 21:44:15 +00:00
Clemen Deng d7d425404b Don't build symbol table for GLSL built-ins if on Android
The GLSL + ESSL autogenerated symbol table is too large for
android, and android also doesn't need desktop GL functionality
If on android, compile the ESSL only symbol table

Bug: chromium:996286
Change-Id: I14dfc7748dae389e78c35f82a390c67962665356
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1757372
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-23 16:43:26 +00:00
Jaedon Lee 3b46885e19 Vulkan: Implement EXT_texture_type_2_10_10_10_REV
- Expose GLES 3.0 feature of 2_10_10_10_REV texture type
  on GLES 2.0 as EXT.
- Handle alpha channel value as 1.0 when used with RGB format.
- Add test for "RGB+UNSIGNED_INT_2_10_10_10_REV" case into TextureUploadFormatTest.

BUG=angleproject:3232.
Test:
 dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_texture_type_2_10_10_10_REV
 dEQP-GLES2.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev
 dEQP-GLES3.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev
 KHR-GLES2.core.internalformat.*2_10_10_10_rev*
 KHR-GLES3.core.internalformat.*2_10_10_10_rev*

Change-Id: Iac00517971f9242161115c7256117a69093fb5df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1732618
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-23 15:28:26 +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
Clemen Deng 56db378961 Use flat arrays instead of switches for function lookups
Current implementation of built in function lookup uses
autogenerated switch statements. Instead, use the perfect
hash mapping to have the lookup use arrays instead. This
will improve runtime performance.

Bug: angleproject:3805
Change-Id: I6d0ba62d79abd53a7fe818fe675282800781f256
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756883
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-22 19:10:47 +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
Jiacheng Lu ee79e2ff36 Use SamplerID in place of GLuint handles
Update all Sampler handles to type SamplerID, preparing for midframe
capture of sampler.

Bug: angleproject:3804
Change-Id: I9337919f97d61e28718987612d642c569b90246a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761780
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-22 17:58:16 +00:00
Clemen Deng 05744c23e1 Change gl_DrawID from level = ESSL1+ESSL3 to COMMON
Built in variable gl_DrawID is exposed to ESSL1 with
a suffix, when the variable is the exact same. No need
to do this.

Bug: angleproject:3805
Change-Id: I63c71791bb6a0e8aa7b644171a3f5a81099eddc0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762359
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-08-22 17:53:55 +00:00
Jiacheng Lu 24456989e2 Fix incorrect parameter in gl_angle_ext.xml
The first parameter of glGetFramebufferParameterivRobustANGLE should be
`GLenum target`.

Bug: angleproject:3826
Change-Id: Ice4ea265389794a51838d8e61fff774c55588512
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762714
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jiacheng Lu <lujc@google.com>
2019-08-21 20:07:38 +00:00
Jonah Ryan-Davis 396527c921 Autogenerated kFunction* variables detected as mutable constants
The android binary size is increased incorrectly because the autogen
kFunction* variables are detected as mutable constants. Rename them to
function* to workaround this.

Bug: angleproject:3823
Change-Id: Ia335d1ae97ce5276a0ff8b9e432b53181cc36680
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762494
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-08-20 19:40:36 +00:00
Clemen Deng 213ad6bd46 Get rid of gl_ViewID_OVR for ESSL1
Only use UInt gl_ViewID_OVR from ESSL3
OVR multiview should not be exposed in ESSL1

Bug: angleproject:3822
Change-Id: Ia9d6247e3a717b06db26f1d436e2b33336b12a7d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1759143
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-08-20 17:02:11 +00:00
Clemen Deng bcae3828bc Auto-generated variables detected as mutable constants
Need to rename kVar* variables to just var

Bug: angleproject:3823
Change-Id: I34b9f4eec4ee7829d47dcac2f06f1acc6b35f867
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1758601
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-08-19 14:57:39 +00:00
Clemen Deng 486f381f8d Add desktop GL built-in functions to symbol table
Added GL built-in functions to symbol table autogeneration
Built-in lookup now checks against spec and returns GL
symbols when appropriate.

Bug: angleproject:3719
Change-Id: I74786150f6063b40e13aebcb2eb9ea35e4ecaa53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1731550
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-08-16 19:16:34 +00:00
shrekshao cdecd97cee Add Draw base vertex and base instance function entrypoints
Split from https://chromium-review.googlesource.com/c/angle/angle/+/1705035/27

This patch adds entrypoints glDrawArraysInstancedBaseInstanceANGLE,
glDrawElementsInstancedBaseVertexBaseInstanceANGLE,
glMultiDrawArraysInstancedBaseInstanceANGLE,
and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE

Implementation will come in a later separate patch.

Bug: chromium:891861, angleproject:3402
Change-Id: I18e19b850cddd79be4798b9ae7efe0680a050c7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750125
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-16 00:27:22 +00:00
Shahbaz Youssefi 0a3c824625 Vulkan: Write preprocessed shaders with // instead of #if 0
Bug: 993965
Change-Id: I4fd357bdebc73b7256ae4b34bd1c6aa2f4418e27
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-08-15 19:15:55 +00:00
Jamie Madill 7c1af2d500 Capture/Replay: Use GL types for packed types.
Previously we were trying to use the packed enum types for our replay.
This wouldn't work as the packed enum types don't exist outside of
ANGLE.

Bug: angleproject:3611
Change-Id: Id0d5c9f37304b30c204bac9bc7873661b035f918
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754324
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-08-15 18:32:45 +00:00
Clemen Deng 1d742ce88a Deleted unnecessary built-in conditions
A few built-in variables are checking against overly complicated
extension conditions, deleting these will make the array lookup
easier to implement.

Also changed functionality to always enable GL_OVR_multiview
when GL_OVR_multiview2 is enabled

Bug: angleproject:3805
Change-Id: I10fc7db0fa8b496fbba8b2c27a7311ac3c24dbe4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752082
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-15 16:06:06 +00:00
Stuart Morgan 9d737966ac Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
  initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
  "The ANGLE Project Authors"

These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.

BUG=angleproject:3811

Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-14 23:05:33 +00:00
Tobin Ehlis a2ec134468 Add shared mutex to frontend
Add shared mutex to frontend API entrypoints that is only enabled when
ANGLE is being used with a shared context.

Bug: angleproject:2464
Change-Id: I0d918e37d9579dccd013dc88f563bed7de7ee55f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1685712
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2019-08-14 23:04:03 +00:00
Jamie Madill 2ab08edc00 Use TextureID in place of GLuint handles.
Bug: angleproject:3611
Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-13 12:50:10 +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
Jamie Madill 3b3fe83788 Use BufferID in place of GLuint handles.
Introduces enable_if handling for "FromGL". Avoids the use of any macro
code to handle resource id casting.

Bug: angleproject:3611
Change-Id: I1a6d10c3c9cc6ba0dc072bad1d62c33551f05d87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1736127
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-08-12 16:04:24 +00:00
Yuly Novikov 08b1e66011 Revert "Enable EVENT trace to print GLenum as string"
This reverts commit 048547e743.

Reason for revert: crashes on Debug bots (at least Mac)

Original change's description:
> Enable EVENT trace to print GLenum as string
> 
> Bug: angleproject:3778
> Change-Id: Ib3a4bd6ba631e0165d571789bbfab9b4b1905d8d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737141
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tobin Ehlis <tobine@google.com>

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

Change-Id: Ib72f932f9b99bf981399759b17cec456b3ffafc1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3778
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745835
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-08-09 15:31:32 +00:00
Jiacheng Lu 048547e743 Enable EVENT trace to print GLenum as string
Bug: angleproject:3778
Change-Id: Ib3a4bd6ba631e0165d571789bbfab9b4b1905d8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737141
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-08-09 13:03:35 +00:00
Jamie Madill bd203b5741 Vulkan: Correct generated shader paths.
This was showing up as a GN error with a newer version of GN.

Bug: angleproject:3792
Change-Id: I1993ccfe079c1768217f704cc9ba036ec67024bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745226
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-08 22:25:48 +00:00
Clemen Deng e7970c3ea4 BasicMangledName class
Need a class for basic mangled names since
with the addition of GLSL types the number
of basic types is > 52 (a-z, A-Z), so we need
more than one character to represent a type

Bug: angleproject:3719
Change-Id: I98beee9d42a016cb0c017f56ab82538c89212e33
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1742221
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-08 17:46:57 +00:00
Mohan Maiya 8400d05c09 Vulkan: Support the vertex_type_2_10_10_10_rev format
- Modify the python script and json file to generate the code which
adds the function for vertex_type_2_10_10_10_rev. These functions
handle the loading and conversion for vertex_type_2_10_10_10_rev.

- Modify ConvertVertex.comp and ConvertVertex.comp.json to perform
a GPU based conversion for vertex format of type 2_10_10_10_rev

- Modify BindingIsAligned function to check that both stride and
binding offset is aligned to the format size when the component
size is not aligned to 8 bits.

- Modify deqp3 expectations file to enable type_2_10_10_10_rev format
vertex array tests.

Bug: angleproject:3193
Test: dEQP-GLES3.functional.vertex_arrays.single_attribute.*2_10_10_10*
Change-Id: I2358d0d8888f7dfd7eac999dc150f643167de817
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709035
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-08 13:53:11 +00:00
Jamie Madill 7c7dec01ce Use RenderbufferID in place of GLuint handles.
This will allow frame capture/replay to more easily emulate object
handle manipulation. It also provides a bit of type safety. Also
generalizes ResourceMap to handle non-GLuint IDs.

Bug: angleproject:3611
Change-Id: I174fd260f326e0dbe2aca3f818215c91d82cf48c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706559
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-07 21:21:04 +00:00
Clemen Deng 44f518b584 Have run_code_generation only call vpython when needed
gen_builtin_symbols.py uses a vpython module to generate
a perfect hash function
Also seeded the perfect hash function to make it deterministic

Bug: angleproject:3747
Change-Id: I660fe71bd6b2213be9d4ccc2f68641637a49a047
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738747
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-07 15:27:21 +00:00
Jamie Madill 798f6c6196 Strip extension from packed GLenum data.
This reduces the code duplication in this json file. It should
make the packed enum map easier to maintain going forward as we
add more entry point permutations.

Bug: angleproject:3611
Change-Id: Ideab630584f0a41892262660fc1e0aedcc5dd639
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1736126
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-06 21:08:02 +00:00
Jiacheng Lu f3dbf0a7ae FrameCapture dump GLenum to enum instead of value
Add functionality to capture GLenum and GLbitfield parameters as enum
names instead of values.

Bug: angleproject:3611
Change-Id: I7ddc21093d44d1480b205563f30d89f82779b1f1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1724460
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-05 21:10:13 +00:00
Jamie Madill b8c0dc0442 Capture/Replay: Capture entry point enum when possible.
This should save on a few string comparisons. This CL also adds a
helper function that converts from an entry point enum ID to a string
entry point name.

Bug: angleproject:3611
Change-Id: I47434235ca25203ef1d6814897d81afab444a7fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1719065
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-05 19:05:35 +00:00
Jamie Madill af69179c41 Capture/Replay: Capture return values.
This will allow us to record resource IDs as they are created and bound
to OpenGL. This in turn will enable implementing mid-execution capture.

Bug: angleproject:3611
Change-Id: I9f12eb0025d90ad86327cf5181efd831662c2e3f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706562
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-05 17:34:59 +00:00
Clemen Deng 9031bdd9ba Use perfect-hash module in gen_builtin_symbols.py
The script currently takes ~4 minutes to run
Using this module instead of manually hashing
will improve runtime significantly

Bug: angleproject:3747
Change-Id: I7e2d2ef5bbfd136b0299d571e0acc11f334c80b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1724667
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-05 15:52:09 +00:00
Yuly Novikov 74e7a315c9 Switch all Win10 GPU.FYI bots and related trybots to 64-bit
Splits Windows CQ bots into 32 and 64 bit.
Update changed dEQP bot names.

Bug: 988833
Change-Id: I4cbb8836ca03b781ccd4c3f6059620bb2c97855e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1732671
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-08-03 00:18:51 +00:00
Jamie Madill d43d24bbb5 Capture/Replay: Refactor entry points.
This change does two things:

 * only call validation functions once per entry point.
 * move the capture call after the entry point call.

Moving the capure after the call allows us to process the results of
the call. Also we can clean up the validation double call by doing a
bit of entry point refactoring. The code changes shouldn't impact the
resulting code size when capture is disabled.

Bug: angleproject:3611
Change-Id: I9e74ba0a8266903d3e9d1f2eac6acdd2932e5743
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706561
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-08-01 18:13:02 +00:00
Jamie Madill 868f5fa023 Refactor return values from entry points.
For capture, we'd ideally like to know the return value of a function
when we capture it. The first step will be to intercept the return
value instead of returning directly.

Bug: angleproject:3611
Change-Id: I68c21aea323a71c6a9f1be613862158a37e2beae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706560
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-08-01 15:11:38 +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
Geoff Lang 5c6a6cb6eb GL: Load external object extension entry points.
BUG=angleproject:3656

Change-Id: I360d5a0eda820a4138e5400614332ae919216db6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688506
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Clemen Deng <clemendeng@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-07-30 17:55:53 +00:00
Tim Van Patten a79c2440f6 Make libEGL function pointers hidden in symbol table
The libEGL_angle.so and libGLESv2_angle.so libraries are typically
loaded into the same process each time, so we need to make sure there
aren't any duplicated symbols which could violate ODR and lead to
crashes or undefined behavior.   In this case, the libEGL_angle.so
function pointer names were colliding with libGLESv2_angle.so function
names, causing crashes at runtime.   The fix here is to mark the
libEGL_angle.so function pointer symbols 'hidden', so they don't appear
in the symbol table for other executables/libraries to see and can't be
overridden by other symbols.

Bug: angleproject:3751
Test: Embed ANGLE within dEQP.apk and verify no crashes
Change-Id: Ibb78369374a4a68b3489a7dd7775c52e29fa37e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1724909
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-30 05:25:19 +00:00
Tim Van Patten cbabea734c Vulkan: Desktop ETC/EAC formats support
Initial attempt to give desktop ETC/EAC formats support.

Bug: angleproject:3676
Change-Id: Id147b0c1808e30df77097d0c7ff6a06534554b93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699307
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-29 20:41:32 +00:00
Shahbaz Youssefi 08b97da894 Vulkan: Fix staging buffer alignment for pixel sizes > 4
Previously, all non-compressed formats were satisfied with a 4-byte
alignment.  The introduction of float formats changes this.

This change calculates the necessary alignment using the same code path
as compressed formats.

Also fixes RGB9E5's pixelByte being calculated as 3 instead of 4.

Bug: angleproject:3731
Change-Id: I6abfd1c294e7f863eb99d2468eaac09e5d714039
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1715205
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-25 18:14:56 +00:00
Jiacheng Lu f35f11106d Add script to apply clang-format on all sources
1. python script wrapper to call clang-format over the whole code base
2. Add clang-format rule `IncludeBlocks: Preserve` to tell clang-format
do not merge include blocks
3. Fix existed clang-format issue in code base

Bug: angleproject:3532
Change-Id: I289292dc62c2784ff21688065c87c3f3f5538f17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709720
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-19 20:10:28 +00:00
James Dong 765ee7b70b Vulkan: support for new vertex attribs in GLES 3.0
Fixes handling of packed vertex formats, adds new overrides for 32-bit
[SU](NORM|SCALED) vertex types, and handles half-precision floats
correctly.

Pixel 2 does not natively support certain 10-10-10-2 vertex formats;
this change does not add support for them.

Test: ./angle_deqp_gles3_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES3.functional.vertex_arrays.*'
Test: ./angle_end2end_tests --gtest_filter='AttributeLayout*/ES3_Vulkan'
Test: ./angle_end2end_tests --gtest_filter='VertexAttribute*/ES3_Vulkan'
Bug: angleproject:3193
Change-Id: I5ae4edd743e86e3e89e2697034c04dc4d9ecd1f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1668230
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: James Dong <dongja@google.com>
2019-07-19 19:19:58 +00:00
Clemen Deng 523dbf4070 Add GL versions to desktop implementation
The current implementation generates entry points for GL up to
version 3.1. Will need to support later versions for some apps.

Bug: angleproject:3698
Change-Id: Ic44d07b12a9eeeceb8cd98dd9c44652dca728dc0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700572
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-19 15:11:30 +00:00
Clemen Deng ce33059365 Rename ProvokingVertex and TextureBarrier
Need to rename these so that they don't conflict
with GL function declarations

Bug: angleproject:3702
Change-Id: Iefe490cb53a384c45f0d0024321deda43b461bcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704214
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-07-19 14:57:07 +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 d9c1710779 Add support for GL_OES_texture_compression_astc
This extension adds 3D compressed texture formats, something ANGLE has
not seen before.  This requires tracking a compressed block depth for
validation and image size computations.

Update the ldr and hdr extension checks to be in line with the spec.
HDR requires LDR and is not detectable by texture formats alone.

Expose all of the ASTC extensions on the GL backend.

BUG=angleproject:3675

Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-15 19:27:55 +00:00
Ian Elliott 9d943af7ce Vulkan: Support more texture format-type combination tests.
This is a partial fix for 3455, which contains a number of different
root-causes.  This CL addresses two sets of them.

1) Partial fix for KHR-GLES3.copy_tex_image_conversions.forbidden.*

   Recent changes, including adding support for GL_RGBA8-to-GL_RGB5_A1,
   plus adding support for GL_RGB10_A2-to-GL_RGB5_A1 eliminate the
   crashes for 56 of the 70 tests.

2) Most of the KHR-GLES3.packed_pixels.rectangle.r* tests now pass.

   Recent changes, including potentially the above get another 34
   tests passing, and another 15 no longer crashing.

3) Vulkan: Fix errant glCopyTextImage validation code.

   I got all but 2 of the KHR-GLES3.packed_pixels.rectangle.r* tests passing.

   I fixed bugs in the validation code (with at least two more bugs
   that I haven't fixed yet).  More details below.

3a) Fix the IsValidES3CopyTexImageCombination() function for SNORM.

    The code wasn't rejecting SNORM cases, which are missing from the table of
    effective internal formats, meaning that support is undefined.  The
    GLES 3.2 spec says that a GL_INVALID_OPERATION error should be generated
    "if the effective internal format of the source buffer does not match the
    effective internal format of the new image."

3b) There's a caveat that was overlooked that means that internal
    formats like GL_RGB10_A2 are not supported.

Bug: angleproject:3455
Bug: angleproject:3693
Bug: angleproject:3697
Change-Id: Ie4399a2d7cd969ec29acc926f32e6608775609c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1693325
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2019-07-15 16:48:24 +00:00
Jamie Madill 53aff41e47 Use separate json files for each code generator.
This should reduce the number of merge conflicts when multiple people
touch different generators. There still will be merge conflicts when
two people touch the same code generator.

Bug: angleproject:3691
Change-Id: I0b179368a1352331c091972568c00213ab106e46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698650
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-11 20:17:04 +00:00
shrekshao cdab03aa93 Add flags to shader translator to emulate gl_BaseVertex and gl_BaseInstance
Adds support for translating gl_BaseVertex and gl_BaseInstance for implementation of
GL_ANGLE_base_vertex_base_instance.

They will only be available in WebGL 2. Since there's no gl_VertexID and
gl_InstanceID in WebGL 1. It won't be very useful to add them to WebGL
1.

Mostly follow pattern of gl_DrawID of GL_multi_draw

BUG=angleproject:3402,chromium:891861

Change-Id: Ifcd990c52d12f6814127b904e61a779b8d382e0c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666361
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-11 01:38:25 +00:00
Jonah Ryan-Davis fba3e64e80 Update trigger.py to take extra arguments
The extra_args wildcard doesn't support extra arguments prepended with
'--'. By using the unknown args returned by argparse, you can add
arbitrary args to the swarming call.

Bug: angleproject:3272
Change-Id: I8d4ab1e19ceae80b47cc2331e6e30a4187da863f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695921
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-07-10 17:18:28 +00:00
Geoff Lang 69e46a186b GL: Implement EGL_ANDROID_native_fence_sync
This extension allows Chrome to use ANGLE on newer Android devices.

BUG=angleproject:3643

Change-Id: I5456d61749399ca2bbc11cc5e98b9120f8702406
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687121
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-07-10 14:47:50 +00:00
Ian Elliott 5e1b3777b8 Vulkan: Add support for GL_RGBA8-to-GL_RGB5_A1
This support was missing and caused dEQP crashes.

Bug: angleproject:3627
Change-Id: Idc06cc92df676061f8a08d0f32a1b3e7f03a66f4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1691102
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-09 16:50:11 +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
Geoff Lang 25b84f3814 Fix capitalization of opengl autogen folder name.
This caused linux to fail to autogenerate the entry points.

BUG=angleproject:3611

Change-Id: Ia383ed134b1a4ecbcd5e03dca365cd21b8660ffe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1690680
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-08 19:30:29 +00:00
Jamie Madill 3bd10b1954 Capture/Replay: Return CallCapture from capture funcs.
This moves more shared code into a simple templated helper function. It
will also allow us to call the parameter capture methods more easily
for mid-execution capture.

Refactoring change only.

Bug: angleproject:3611
Change-Id: I8d95a6230922dfa0403ba5c328df78735c765519
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688508
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-08 19:13:36 +00:00
Geoff Lang 3fd0b2dbcf Implement EGL_ANDROID_get_native_client_buffer.
BUG=angleproject:2508

Change-Id: I21e6251cd1341c1f85f1ba16ba08f5876a8ff8de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1238885
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-08 18:17:43 +00:00
Clemen Deng 3ffbaed656 Merge entry_points_utils.h and entry_points_enum_autogen
Merge the copies of these files from opengl32/libGLESv2
folders and put them in libANGLE

Bug: angleproject:3650
Change-Id: I3b20617f17d031c9ecf4676f4162eff586963ed5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688502
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-08 15:46:38 +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 c5898044a2 Don't remove GL commands that are duplicates of GLES commands
in openGL32 proc table

Bug: angleproject:3652
Change-Id: I014fab19564972bc3bc27f733534fd3630af41b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688497
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-04 19:24:51 +00:00
Jamie Madill ee21a18734 Store angle::Format in gl::VertexAttribute.
Instead of storing type/size/normalized/pureInteger we instead store a
pointer to the angle::Format. This makes some code logic simpler and
will let us more easily check if a vertex attribute format changes in
calls to VertexAttribPointer or VertexAttribFormat.

This CL adds extra information to angle::Format to represent the vertex
format info needed. It also caches the channel count so that it can be
queried faster.

Also renames "Int" -> "Sint" in UtilsVk for consistency.

Bug: angleproject:3256
Change-Id: I5ef9b983dad8a58c341113c802500b89ce081566
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1684293
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-07-04 14:11:46 +00:00
Cody Northrop 4fbbdb15d6 texture3D: Compiler changes for sampler3D
Bug: angleproject:3188
Change-Id: Iac1408f8b91c6a6610a63cef236205b7dcdbd2c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682781
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2019-07-03 17:01:31 +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
Cody Northrop 5faff91af4 texture3D: Codegen changes towards OES_texture_3D
Also accompanying hand edits to validationES2.cpp and
Context.cpp to allow linking.

Bug: angleproject:3188
Change-Id: I89832265092fabc71bade464f0171d65038d8b0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648454
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-01 14:15:07 +00:00
James Dong 8bb6baa0fc Vulkan: improve handling of RGB texture formats
Adds fallback for some RGB textures using the corresponding RGBA formats
and modifies fallback calculation to not require filtering/rendering for
formats which are not required to support filtering by GL spec.

Bug: angleproject:3190
Bug: angleproject:3196
Change-Id: I7beaf9881d63e3c6bd9339faede0333919a4174c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665894
Commit-Queue: James Dong <dongja@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-06-28 19:50:14 +00:00
Shahbaz Youssefi 0bfa55044f Vulkan: Emulate Transform Feedback with vertex shader output
In ES 3.0 and 3.1, only non-indexed GL_POINTS, GL_LINES and GL_TRIANGLES
is supported for transform feedback.  Without tessellation and geometry
shaders, we can calculate the exact location where each vertex transform
output should be written on the CPU, and have each vertex shader
invocation write its data separately to the appropriate location in the
buffer.

This depends on the vertexPipelineStoresAndAtomics Vulkan feature.

Bug: angleproject:3205
Change-Id: I68ccbb80aece597cf20c557a0aee842360fea593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1645678
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-27 20:36:53 +00:00
Jamie Madill 485cdd8bd3 Add std::ostream output for packed enums.
This can be used to convert them to strings for debugging. It can also
be helpful for frame capture and replay. Currently the enums are output
as GLenum values.

Bug: angleproject:3611
Change-Id: Ifcd04449e0ef61e125e0db65aa0dcc2bf48b38ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678399
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-27 15:18:37 +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
Shahbaz Youssefi c5c937e1e8 Vulkan: Support R11G11B10_FLOAT and R9G9B9E5_SHAREDEXP
The keys in vk_format_map.json were incorrect.  The format table
generation script is enhanced to give an error in such a case.  This
revealed a number of entries with no corresponding angle format, which
are also removed.

Bug: angleproject:2898
Bug: angleproject:3190
Change-Id: I32caf2d2a8abb6f76b25436725670a8e84d576fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666700
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-20 01:35:35 +00:00
Michael Spang 6c824a1bc1 Vulkan: Add missing layout for VK_IMAGE_LAYOUT_UNDEFINED
This this was missed because it doesn't add its own enum value and
instead reuses GL_NONE.

Bug: chromium:976374
Test: chrome --enable-features=UseSkiaRenderer,UiGpuRasterization \
  --enable-gpu-rasterization \
  --enable-oop-rasterization \
  --use-vulkan=native \
  --use-gl=angle \
  --use-angle=vulkan

Change-Id: I73437211fef3253801e899cb6e50a8e18865cc65
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665329
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-19 01:12:24 +00:00
Geoff Lang 857880e5b8 GL: Add extensions to enable hardware video decode on Android.
The Android SurfaceTexture API has to be initialized with a texture id
which Chrome has to query from an ANGLE external texture. It also
rebinds and sets the texture dimensions on calls to
SurfaceTexture.updateTexImage so ANGLE must be notified about these
changes so that state tracking and validation continue to function.

BUG=967410

Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-18 21:10:07 +00:00
Clemen Deng c211c2f5b5 Make proc table autogen use gl.xml data
Instead having the proc table be generated from proc_table_data.json
which needed to be manually updated with changes, the proc table is now
generated from data in gl.xml and egl.xml

Bug: angleproject:3533
Change-Id: I773ea7615cc4ec1c9901def629b089d8d17328eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660645
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-17 23:04:37 +00:00
Clemen Deng 95ac7b7cee Autogen gles2+ declarations
Added autogeneration of method declarations for GLES2+ and extensions

Bug: angleproject:3526
Change-Id: I9c7263452146098512d9584deae8ea3f15f62c46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660949
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-14 22:02:38 +00:00
Shahbaz Youssefi bf82648154 Update glslang_validator binary for Windows.
This binary was updated using update_glslang_binary.py.
Please see instructions in tools/glslang/README.md.

Bug: angleproject:3432
Change-Id: Iefed7d2ab1a0a7f7118b83037329fe608c85ba1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1658848
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-14 16:13:16 +00:00
Shahbaz Youssefi a7271d35e5 Update glslang_validator binary for Linux.
This binary was updated using update_glslang_binary.py.
Please see instructions in tools/glslang/README.md.

Bug: angleproject:3432
Change-Id: Idc02086cf0e1985efd7bf194adf311c85b21e33e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1657712
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-14 16:11:06 +00:00
James Dong 2806a898ac Vulkan: implement primitive restart
Implements ES 3.0 feature GL_PRIMITIVE_RESTART_FIXED_INDEX,
which allows the application to use a fixed "restart" index
to restart the primitive during a single draw call.

This change does't handle GL_LINE_LOOP primitives,
which requires a bit of special handling.

Bug: angleproject:3215
Change-Id: I2388852683fd17328a6a76c48d70a24d67ce8b67
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1650301
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2019-06-13 22:19:28 +00:00
James Dong 0d3cf7085c Vulkan: fix array size for internal shaders
Previously array sizes were calculated as the OR of all flag and enum
masks, equal to 2^(number of bits used for flags and enums) - 1, which
could be less than the actual needed array size.

This fix moves array size calculation to the autogen script and changes
the size to one more than the maximum potential value.

Bug: angleproject:3524
Change-Id: Ia4eb2a83fc7deea84e18958efcda8b57632035f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1655954
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-06-13 18:52:54 +00:00
Shahbaz Youssefi b407e1a0b5 Vulkan: implement ES3 blit
Augment the resolve shaders to be able to stretch and blit too.  The
UtilsVk resolve function is accordingly expanded to include blit.

Bug: angleproject:3200
Change-Id: I30b172a5e388089735ab494f55cbfdc2781a8bf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635753
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-06-07 14:25:25 +00:00
Jonah Ryan-Davis e431aaa15a Rename EGL_ANGLE_workaround_control to EGL_ANGLE_feature_control.
For consistency, call these ANGLE "features", a subset of which may be
workarounds. Also, whether the feature is enabled/disabled should be
publically visible as "status".

Bug: angleproject:1621
Change-Id: I0de90a932fbfe1fc9b59138153d616d29fa7268b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643410
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-06-04 18:51:44 +00:00
Shahbaz Youssefi de70a7135b Vulkan: Rename Resolve* shaders to BlitResolve
In preparation for adding blit functionality.

Bug: angleproject:3200
Change-Id: I77b6b6cbe90b26ee23c25edebaa2b130f3c2987a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1641626
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-04 13:51:58 +00:00
Jonah Ryan-Davis 2dd40a44d1 Add eglQueryDisplayAttribANGLE to query workarounds count.
Add eglQueryDisplayAttribANGLE based on eglQueryDisplayAttribEXT to add
behavior for quering the count of all workarounds available. Used
externally to build a list of workarounds.

Bug: angleproject:1621

Change-Id: I793acedc76111fd018600169d58bf5d8cf4a63ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1637817
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-06-03 22:36:28 +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
Jamie Madill 5993d899e3 Vulkan: Use storage buffers for index conversion shader.
This allows us to use the shader regardless of driver support for
texel buffer views. It also allows us to convert indices on the GPU
unconditionally.

We add a new internal compute shader that converts pairs of indices
into a packed single uint value that stores two 16-bit values. In the
future we could add support for converting primitive restart indices.

Should speed up benchmarks on systems which didn't have R8_UINT support
for compute shader buffers.

Bug: angleproject:3490
Change-Id: I56ca0cabb094e97f36ab4edc779e6c8ad2d2601e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1639058
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-06-03 18:08:28 +00:00
Shahbaz Youssefi 6d9b8908b0 Vulkan: Merge Color and Depth/Stencil resolve shaders
There is a good deal of overlap in the way these shaders calculate
offsets, flip etc.  This change merges the two shaders together, as well
as the UtilsVk functions that invoke them.

This is in preparation for adding blit functionality to the same
shader.

Bug: angleproject:3200
Change-Id: Id7c2cf12e05db1802ae497766fb361fe4bef6479
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635750
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-05-30 14:53:32 +00:00
Shahbaz Youssefi 172e5d373f Vulkan: Implement universal stencil resolve
This is done by resolving stencil into a temporary buffer and copying
that into the stencil aspect of the resolved image.

Bug: angleproject:3200
Change-Id: I29111b44db2cb093acc4544034fbe61178f055a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635709
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-05-29 21:44:42 +00:00
Jonah Ryan-Davis f52f2637ae Add EGL_ANGLE_workaround_control extension.
This extension is used to query strings from an array based on index,
which will be used to query all the information about workarounds in
ANGLE.

Bug: angleproject:1621

Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-05-29 19:39:42 +00:00
Shahbaz Youssefi f2a1c384f7 Vulkan: Implement multisampled framebuffers
Simultaneously implements ANGLE_framebuffer_multisample and ES3
multisampled framebuffers.

Additionally, implements ES3 framebuffer blitting where multisampled
framebuffers are involved.

Bug: angleproject:3203
Bug: angleproject:3204
Bug: angleproject:3200
Change-Id: I5694a30f71168e807688a9568e3742b81d907918
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1622667
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-05-29 15:28:49 +00:00
Jonah Ryan-Davis dfe141f02d Addition of dEQP "KHR" test variants to generate_stats
Generate_stats should handle new step names and put them on new sheets.
Also update the docs to show the KHR tests.

Bug: angleproject:3486
Change-Id: I4fef774d98b0e622182686506376f788a7568376
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1632529
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-05-28 17:39:42 +00:00
Michael Spang 215b2191fb Add packed enum for GL_EXT_semaphore image layouts
Add a new packed enum gl::ImageLayout which consists of the following
enum values:

  GL_LAYOUT_GENERAL_EXT
  GL_LAYOUT_COLOR_ATTACHMENT_EXT
  GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT
  GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT
  GL_LAYOUT_SHADER_READ_ONLY_EXT
  GL_LAYOUT_TRANSFER_SRC_EXT
  GL_LAYOUT_TRANSFER_DST_EXT
  GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT
  GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT

Bug: angleproject:3289

Change-Id: Idc1615717d54fb1193e2f27c84a24993f6007d7b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623810
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
2019-05-22 18:07:48 +00:00
Shahbaz Youssefi affc252c8b Vulkan: Update glslang_validator binary for Windows
The new binary has the ability to optimize SPIR-V code.

Bug: angleproject:3432
Change-Id: I57ac99d2b1c5ee0678c3b6ab3db1e215a12bd08a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1620915
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-05-21 15:32:09 +00:00
Shahbaz Youssefi b86e73daf7 Vulkan: Update glslang_validator binary for Linux
The new binary has the ability to optimize SPIR-V code.

Bug: angleproject:3432
Change-Id: I5953be6f207f153baaf2efe17380448aff374d60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1620913
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-05-21 14:59:38 +00:00
Jeff Gilbert e8247a5749 Add scripts/export_targets.py.
$ export_targets.py <out_dir> <targets...>

Flattens all library targets under <targets...> and checks that all
includes in 'sources' are known to the build.

Firefox can use this as the first half of our ANGLE vendoring process.

Included additions to src/libGLESv2.gni were found with:
$ export_targets.py out //:libEGL

Eventually, it would be nice to have this as a presubmit check.

Bug: angleproject:3403
Change-Id: I0f455e8c37c4b0a9e17e9f843843422b6a32f588
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1584652
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-05-20 23:45:58 +00:00
Jonah Ryan-Davis cd3011fb06 Fix formatting issue in generate_stats
Update to new (public) sheet in chromium account.
Fix issue with python newline on concatenated string.
Ensure all tables are sorted by date.

Bug: angleproject:3435
Change-Id: I5de178409dec1e0dcf1467e4f0fe8cf85ea23c08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1609939
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-05-17 19:23:55 +00:00
Courtney Goeltzenleuchter eaf2d928e6 Add support for OES_depth_texture
Note: Includes workaround for http://anglebug.com/3452 - some Android
devices do not indicate filtering support on VK_FORMAT_D16_UNORM.

Bug: angleproject:3103
Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTexture/*
angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.PackedDepthStencil/*
angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTextureRender/ES2_VULKAN

Change-Id: Ic325fb94ab0e619a17c2e149e0e0865fa4142f3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575426
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-05-15 16:47:37 +00:00
Jonah Ryan-Davis 29f4ba7d6e generate_stats filters duplicate neighboring rows.
The charts tend to be static for many days in a row, which will now be
filtered to be more succinct.
Also fixes issue parsing when a message interrupts the formatted *RESULT
token.

Bug: angleproject:3435
Change-Id: I9ed213844de469c7a8240ee95aab82451888edf1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1606029
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-05-10 19:46:21 +00:00
Mingyu Hu ebab670cb3 Adding new extension GL_OVR_multiview
GL_OVR_multiview functions exactly the same as GL_OVR_multiview2.
All GL_OVR_multiview2 tests now also repeat the same test using GL_OVR_multiview

Bug: angleproject:3341
Change-Id: I7e5294fb6bbf7692535174a15da6a42e1b5fc4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575904
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-05-08 23:14:55 +00:00
Jonah Ryan-Davis a10b2d078c Modify 'bb ls' command for generate_stats for more precision.
We were using 'bb ls ... -A' which combines '-p' and '-steps', but we
only parse information from '-p'. Updates the script to only call what
it needs. Also works around current issue with '-A'.

Bug: angleproject:3429
Change-Id: I10d412885663feefd300eb135dae70b499fedd7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1600334
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-05-08 18:28:39 +00:00
Jonah Ryan-Davis b62fce1587 Use VPython for dependency management of scripts/generate_stats.py
Instead of installing all dependencies manually, the script should run
with the dependencies specified by the wheels listed in the VPYTHON
section of the header comments.

Bug: angleproject:3415
Change-Id: Ie969ada3ec2550ae2a809164b01930e1590d5db1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593736
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-05-07 14:52:09 +00:00
Geoff Lang d7d42395ac Format all of ANGLE's python code.
BUG=angleproject:3421

Change-Id: I1d7282ac513c046de5d8ed87f7789290780d30a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595440
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-05-06 18:56:09 +00:00
Jonah Ryan-Davis ed4feb356c Add generated dEQP charts to the ANGLE doc.
Also clean up the comments formatting for generate_stats.py

Bug: angleproject:3369
Change-Id: Ifaa26cb898915038cf47e88341db5057b59dd937
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1588315
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-05-01 15:18:40 +00:00
Jonah Ryan-Davis 1ad7a07212 Clean up unexpected passed/failed test behavior for generate_stats
The lists of tests can't be added to the sheets if more than 50,000
lines. Since the goal is to get rid of all unexpected passes/failures,
it's reasonable to clip the lists by length. Other formatting changes
too.

Bug: angleproject:3398
Change-Id: Ice461862fb4266e0ad1280f20de85224fc6d7e97
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1585612
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-04-26 22:20:25 +00:00
Geoff Lang fb6fbdbc58 Return that polling queries have completed after context loss.
KHR_robustness says that certain queries that poll such as GetSynciv with
SYNC_STATUS should still generate errors after context loss but also return
that the result is available.

BUG=angleproject:3379

Change-Id: Ibf61f8481bc7c3d1b4fa8979dc404d0ca3952fcd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566142
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-25 16:13:34 +00:00
Jonah Ryan-Davis cddf6416de Clean up generate_stats.py script
Add more explicit comments and change some behavior slightly.

Bug: angleproject:3369
Change-Id: I76f9054564e8d33127e8ff8233b317e82e06c7de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1582760
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-04-25 14:52:53 +00:00
Jonah Ryan-Davis 3c369d190f Add Sheets generation to dEQP visualization script.
Script will parse the output from bb and format it and append to a
Sheet.

The sheet ID can be set with the 'spreadsheet' arg,  or it
defaults to a shared sheet on go/angle-status-generated. The user
credentials must be pointed to with the 'auth_path' arg.

Bug: angleproject:3369
Change-Id: Iafc9f3f96610f2ea01a9802526282cf5f14e1b2e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1572482
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-24 17:29:09 +00:00
Jamie Madill 0631e19bcb Vulkan: Rename Vulkan "Texture" format to "Image"
Also adds some comments to vk_format_utils.h.

Bug: angleproject:3372
Change-Id: I529b9b189e4cdfd400c3c981a47139727d9954ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565062
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-18 20:45:31 +00:00
Jonah Ryan-Davis e3c7134c27 Add script to collect information from tests running on bots.
Add scripts/generate_deqp_stats.py, which takes in a bot name and prints
out a struct with the number of tests run/passed/failed/etc for each
test suite that ran on the bot.

Bug: angleproject:3369
Change-Id: Ie8086e1d0fb6b141afa388ad44711a798a3bbcd1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570111
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-04-17 19:52:35 +00:00
Geoff Lang 057b76e149 Implement GL_CHROMIUM_lose_context.
This is useful for testing context lost behaviour.

BUG=angleproject:3379

Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-04-17 15:48:14 +00:00
Michael Spang e0da9cefcd Pack handle type enum for glImportMemoryFd & glImportSemaphoreFd
Bug: angleproject:3289

Change-Id: Ic20b1d55641494b46622e1e28d93e2ca30655ea6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566143
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-16 19:57:12 +00:00
Mingyu Hu 7d64c4863d GL_ANGLE_multiview has been renamed to GL_OVR_multiview2.
changes include:
1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change
2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported
3) WebGL 2 (ES3) is required for multiview

Bug: angleproject:3341
Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-16 17:37:10 +00:00
Jamie Madill 2664da8beb Correct texImage uses of texture type -> target.
Similarly to how the subImage calls were corrected. glTexImage and the
family of related functions apply to a single texture target. This
means we need a different TexImage call for each cube face. This is
distinct from TexStorage calls which take a Cube map directly.

Note this is mostly a refactoring change. But it does increase code
consistency and should allow for more efficient code reuse.

Bug: angleproject:3356
Change-Id: I252f8983cdda3a8f0223c44cbbe8d8e2dd319a88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558673
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-04-15 19:09:02 +00:00
Jamie Madill cfc73cc1af Correct subImage uses of texture type -> target.
Texture "types" are the same as texture "targets" except for cube maps.
Cube map targets specify a single face. Cube map types specify a whole
cube map. The subImage functions should take a target instead of a
type. We were using both in different places. This CL corrects all uses
in subImage calls to "target". It also adds a helper for getting a
target texture from a target. And clarifies the naming of the texture
query methods.

Bug: angleproject:3356
Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-11 22:11:50 +00:00
Shahbaz Youssefi 2249d4a727 Vulkan: remove clear depth ability from clearWithDraw
This partially reverts the following change:

60ec8f576 Vulkan: break dependency to the depthClamp feature

The feature is no longer necessary, and simplifies the usage of
utility shaders.

Bug: angleproject:2361
Change-Id: I1e87ac8d2517c5a3b50e3d0cddd55c852e0e3e7d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1555313
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2019-04-11 19:56:12 +00:00
Shahbaz Youssefi fc15ae5571 Vulkan: parallelize internal shader compilation
As glslang is rolling frequently now, internal shaders frequently
require recompilation.  This change parallelizes shader compilation to
speed up this process.

Bug: angleproject:3333
Change-Id: Icace083559bff73dfb9b5fe7cc2c59ce8137a2dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558680
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-09 15:28:04 +00:00
Shahbaz Youssefi 82418c8216 Add support for updating glslang_validator binary from Linux.
Updates the glslang_validator binary for Linux in the same commit.

Bug: angleproject:3333
Change-Id: Ide42781ec4951e7c09307a0a3b96c36c6ea29d23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553828
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-09 02:01:10 +00:00