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

672 Коммитов

Автор SHA1 Сообщение Дата
Jonah Ryan-Davis 31fbf981e2 GL: Entry points for GL_OES_texture_cube_map_array
This extension is made core in GLES3.2. This CL adds the necessary
entry points to the frontend.

Bug: angleproject:3584
Change-Id: Icaaa0b298898f3360819966a7f67b5feaf05124b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2215305
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-05-25 21:52:53 +00:00
Cody Northrop 8add7dbfff Tests: Add trace of Egypt to TracePerfTest
Test: angle_perftest --gtest_filter="*Trace*egypt*"
Bug: b/157158456
Change-Id: I9c076f247cb8a2743beae8377830c15269794f9d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2209689
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-05-21 20:35:41 +00:00
Cody Northrop ce925b4cbe Perf: Add Temple Run trace
Test: angle_perftests --gtest_filter="*Trace*"
Bug: b/152512564
Bug: angleproject:4048
Change-Id: Ifca698a9c294e77bf90900781c1495ef6b559d63
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197285
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-05-14 15:07:52 +00:00
Cody Northrop 3a9098412b Perf: Add Reset call to trace tests
The traces are already updated to contain the Reset calls, now
actually call them from TracePerfTests.

Test: angle_perftests --gtest_filter="*Trace*"
Bug: b/152512564
Bug: angleproject:4599
Change-Id: I18b6726bc98b96f132c3245c51420cbfed1b84d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197284
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2020-05-14 05:22:25 +00:00
Cody Northrop 544a80efbd Perf: Detect context used by trace
Capturing supports multiple contexts, which are hard coded into
the function and file names.  On desktop, they've typically been
"1", but on Android we've seen context "2" or "3".

This CL adds the ability to detect the context number used by the
trace, and programmatically adds it to generated files.

Test: angle_perftests --gtest_filter="*Trace*"
Bug: b/152512564
Bug: angleproject:4036
Change-Id: I64616b93a704446b08cb614b2a74ab1932ef1f40
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197283
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2020-05-14 04:57:35 +00:00
Jamie Madill 93ec0ca583 Capture/Replay: Regenerate glue if captures change.
This ensures if we re-capture with different parameters that
we regenerate traces. It uses the sha1 so that it can be run
correctly from an open-source checkout.

Bug: angleproject:4590
Change-Id: I01a2eef037924c5acaaf124308315364e6f1d723
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2185157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-05-11 19:15:34 +00:00
Jamie Madill 9f32304208 Vulkan: Update VMA directory.
Bug: chromium:1074162
Change-Id: I6aa545e20f64dda0a1716cf8d0df9ad62fc1a890
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2190624
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-05-08 18:25:45 +00:00
Geoff Lang 312e65e126 Make sure all target names are unique in the generate Android.bp
generate_android_bp.py prepends "angle_" to target names to avoid
conflicts with other Android projects. This can sometimes generate
conflicts when there are two targets such as "angle_vulkan_headers"
and "vulkan_headers".

This patch turns the gn path+target into the blueprint target name.

BUG= b/155396154

Change-Id: I7a709013969ae8e312a781a2fd3c1ec530fca430
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2173833
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-05-06 19:17:26 +00:00
Jamie Madill bcd2c5924f Revert "Capture/Replay: Update traces to include Reset"
This reverts commit 968bb06d94.

Reason for revert: Broke angle_perftests on the P2 bots:

https://ci.chromium.org/p/chromium/builders/ci/Android%20FYI%2064%20Perf%20(Pixel%202)/30223

Original change's description:
> Capture/Replay: Update traces to include Reset
> 
> Now that our traces can reset state back to how it started with MEC:
> 
> * Update the code generation to include that call.
> * Update existing traces to include that call.
> * Add a capture of Temple Run.
> 
> Test: angle_perftests.exe --gtest_filter="Trace*"
> Bug: b/152512564
> Bug: angleproject:3662
> Bug: angleproject:4599
> Change-Id: I4062271b75b5c6fc9122b301d1af443d79770edc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2182911
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>

TBR=cnorthrop@google.com,courtneygo@google.com,jmadill@chromium.org

Change-Id: Icea86c2fbfbabe4a1e7738954cecc176b5574a16
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/152512564, angleproject:3662, angleproject:4599
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2184705
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-05-06 15:49:56 +00:00
Cody Northrop 968bb06d94 Capture/Replay: Update traces to include Reset
Now that our traces can reset state back to how it started with MEC:

* Update the code generation to include that call.
* Update existing traces to include that call.
* Add a capture of Temple Run.

Test: angle_perftests.exe --gtest_filter="Trace*"
Bug: b/152512564
Bug: angleproject:3662
Bug: angleproject:4599
Change-Id: I4062271b75b5c6fc9122b301d1af443d79770edc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2182911
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-05-06 15:17:24 +00:00
Mohan Maiya daed369cfd EGL: Add support for GL_EXT_EGL_image_array extension
Add support for creating 2D array EGLImages. 2D array
textures are core in GLES3.0. Enable the eglImageArray
bool that controls exposure of the extension for all
contexts >= GLES3.0

Bug: angleproject:4604
Tests: angle_end2end_tests --gtest_filter=ImageTest.*2DArray*
Change-Id: Iebc1ad184fe7209ca89d620290337438ac251c56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176109
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-05-06 00:16:16 +00:00
Cody Northrop a5829b2a78 deps: Roll VK-GL-CTS
* Moved xexml files to a library
* Added new waiver system to GN
* Added new KHR GLES 3.x tests to GN for nearest sampling edge cases
* Updated expectations for new tests
* Manual roll of glslang to bring in new dependencies.

Test: deqp
Bug: angleproject:4588
Change-Id: I7b9bcc28e9c9ba6abe4fa4873f732677ed3d276d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168617
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-05-05 19:43:42 +00:00
Courtney Goeltzenleuchter e8e12881ca Roll Vulkan headers, update ANGLE to match
All the *_RANGE_SIZE enums were removed from vulkan_core.h
Fix up ANGLE references.

Bug: b/155750030
Change-Id: Idc4ee20d4a87f8cb3f46e105819af7257a7fea4b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2182577
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-05-05 17:20:59 +00:00
Jonah Ryan-Davis 17bc7bcd68 Fix issue with missing step info in generate_stats.py
When the script has trouble parsing info for a step, it's supposed to
remove that step from the list of steps to not cause further problems
with the script (and log an error). Instead, it was being removed while
iterating the same list which caused malformed tables.

Bug: angleproject:4610
Change-Id: Iff8bfd77eae227907e78660183c79221d4d305a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2180342
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2020-05-04 19:34:01 +00:00
Jamie Madill 1c3e322cdb Work around strange git cl format issue.
For some reason this line of code confused git cl format
in that it would generate different results depending on when
it was called:

"PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC
   ANGLE_EGL_StreamConsumerGLTextureExternalAttribsNV;"

I wasn't able to root cause the bug. Instead I worked around
it by changing the signatures for this file.

Bug: angleproject:4596
Change-Id: I4f18e03d27d378480b19831de51c4e85d815ca66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
2020-05-01 19:42:36 +00:00
Jamie Madill 57d95828ea Revert "Add type for attribute locations."
This reverts commit 9349c14344
and commit d43b057435.

It's no longer needed after we bind attribute locations before link.

Original CL message:

This will allow the capture/replay tool to easily intercept and label
attribute locations for remapping.

There's some inconsistency in implementation in the GL desktop front-
end. This is a quick fix and the full implementation is left for when
we implement the full desktop GL API set.

Bug: angleproject:4598
Change-Id: Ic510159d4d1982eff41560503cabf983a1be0381
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174076
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-05-01 12:47:26 +00:00
Jamie Madill 9349c14344 Add type for attribute locations.
This will allow the capture/replay tool to easily intercept and label
attribute locations for remapping.

There's some inconsistency in implementation in the GL desktop front-
end. This is a quick fix and the full implementation is left for when
we implement the full desktop GL API set.

Bug: angleproject:4598
Change-Id: Ibf11bcb8669d27265ea376494a2e3124825cf3be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171933
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-04-30 17:01:18 +00:00
Jamie Madill 5540a3075e GL loaders: Add 'ANGLE' symbol prefix.
This should prevent debuggers like RenderDoc from getting confused
about symbol names. It's also generally good practice to avoid
overloading names.

Change-Id: Ie9fd3f77f45479bdf6925dae3e03fb4ac85bdb8a
Bug: angleproject:4596
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171684
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-04-29 21:14:27 +00:00
Jamie Madill 92b3a720a2 Capture/Replay: Generate code integration.
This sources the trace list from a json file and uses that to make the
"glue" that works with each individual trace test.

Bug: angleproject:4590
Change-Id: I40808cbd0e00f9ed01f93c4cfbd678401db3fec0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168539
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-04-29 18:01:49 +00:00
angle-autoroll 821575a7ac Roll third_party/vulkan-headers/src 62becc509a88..4c19ae6b95e4 (1 commits)
62becc509a..4c19ae6b95

git log 62becc509a88..4c19ae6b95e4 --date=short --first-parent --format='%ad %ae %s'
2020-04-28 oddhack@sonic.net Update for Vulkan-Docs 1.2.139

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

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

TBR=cnorthrop@google.com

Bug: None
Change-Id: If5e052ec795c2a47148494fbe5489a4031c12ad4
Tbr: cnorthrop@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2169338
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-28 08:43:31 +00:00
Jamie Madill 4395170e60 Roll chromium_revision fa9d5805c4..b0410bba02 (750702:763000)
Includes a change from yasm to nasm.

Change log: fa9d5805c4..b0410bba02
Full diff: fa9d5805c4..b0410bba02

Changed dependencies
* build: a1cbf6469a..45ab3c89af
* buildtools: 4164a30562..204a35a2a6
* testing: 3e21eec53c..3993ef1f52
* third_party/googletest: c96dc32110..217407c478
* third_party/jsoncpp: 493c9385c9..ec647b85b6
* third_party/libjpeg_turbo: ce0e57e8e6..7e3ad79800
* third_party/zlib: 156be8c52f..ae385786ed
* tools/clang: d60a6a8084..04b99e7bf9
* tools/md_browser: 0bfd826f85..aae45d8d82
DEPS diff: fa9d5805c4..b0410bba02/DEPS

Clang version changed 9284abd0040afecfd619dbcf1b244a8b533291c9:4e0d9925d6a3561449bdd8def27fd3f3f1b3fb9f
Details: fa9d5805c4..b0410bba02/tools/clang/scripts/update.py

Tbr: jmadill@chromium.org
Bug: chromium:1070043
Change-Id: I8f2cd61950b1a94b946eace49a7f1da3447522ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168533
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-04-27 22:50:55 +00:00
Jonah Ryan-Davis 3cb9c4bee9 Statically link vulkan-loader on Mac
Disable angle_shared_libvulkan on Mac since we are the only client.
Re-add codepaths to support this.

Bug: angleproject:4477
Change-Id: Ie128c83adaae741636541bbfd6105d160d874a8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2102954
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2020-04-24 19:52:39 +00:00
Le Hoang Quyen dadd198650 Implement GL_APPLE_clip_distance
- Built-in variable gl_ClipDistance has been added to compiler.
- Desktop GL: gl_ClipDistance is supported since GL 3.0. Enable/Disable
each gl_ClipDistances[i] works out of the box via glEnable().
- Vulkan/Metal: Use uniform variable to control writing to each
gl_ClipDistance. One bit flag controls one element in the gl_ClipDistance
array. The writing to the disabled element in vertex shader will be
ignored, and turned into zero assignment instead.
- Direct3D/Mobile GL: Not implemented yet.
- Added ClipDistanceTest to gl_tests and compiler unittests.
- GL_APPLE_clip_distance is a subset of GL_EXT_clip_cull_distance, so
GL_EXT_clip_cull_distance could be implemented in future if needed.

Bug: angleproject:4452
Change-Id: I571ac8b56826989808a680226a04bec4cf59988e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2084324
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-04-22 18:17:56 +00:00
Courtney Goeltzenleuchter b5992a55c3 Add capture support for FenceSync
This allows us to capture Angry Birds 2 traces.

Bug: b/153652100
Change-Id: I99a47f9e41a84218b3bb3d9740df4bb7fc2a01fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2144763
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2020-04-22 13:02:26 +00:00
Geoff Lang 6cea4405d1 Remove more bad files before rolling into AOSP.
third_party/VulkanMemoryAllocator/OWNERS also includes owners that block
uploading.

Move the deletion of the bad files earlier in the script and rm them
instead of git rm. They may or may not be committed git files but rm
always works.

BUG=b/150892231

Change-Id: Iee60fba504ed1c16e994ed1ba83d2b7c58c0a01c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2154537
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-04-17 18:56:49 +00:00
Geoff Lang 8116c488ae Remove the merge command from roll_aosp.sh
There are two issues doing the merge in the script:
 - This command makes the merge specific to an AOSP branch
 - It uses the version of roll_aosp that is from the previous roll
   instead of the ToT version.

BUG=b:150892231

Change-Id: I579484092ca3d8c5e0e2d4d4bd1272eaeccc9da3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2152667
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-04-16 18:26:42 +00:00
Geoff Lang 1589de9e5e Remove some bad files when generating an ANGLE roll into Android
Add a list of files that should be removed when rolling ANGLE into
Android. The jsoncpp OWNERS file fails to upload to the Android gerrit
because it contains owners that have never signed into the Android
gerrit.

BUG=b:150892231

Change-Id: I699dada53cdda2fbd012733a7a91eb8b5fb79d35
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2152668
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-04-16 18:21:41 +00:00
Geoff Lang 005793e4c9 Remove --preserve-root from roll_aosp.sh
This flag is not supported on mac and generates errors when trying to
roll.

BUG=b:150892231

Change-Id: I22d10a2b9b37610d409df4d72e0aba2672f7b192
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2152666
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-04-16 17:23:40 +00:00
Geoff Lang 6b705ae779 Roll VulkanMemoryAllocator into Android
Bug: angleproject:2162
Change-Id: I0b1fc1ba1a3de8c4c00c5f6d26f8451e3ba8627e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2152665
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-04-16 14:42:34 +00:00
Tim Van Patten 868122c297 Add 'java_api_finder' to Android.bp
Per the Mainline requirement to setup coverage for APIs used by
modules, we need to add the plugin 'java_api_finder' to ANGLE's
Android.bp to enable the instrumentation.

Bug: b:148987998
Test: Generate Android.bp, verify GoogleANGLE can build in goog/master
Change-Id: Id3d82f18ecb9ff6a57cda4a60f14cd2464dff234
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2145236
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
2020-04-15 17:04:06 +00:00
Tobin Ehlis 32457326e0 Vulkan: Roll Headers and VVL repos
Need to sync the Vulkan-Headers and Vulkan Validation Layers roll.
Header update also requires codegen update.

Bug: angleproject:3320
Change-Id: Id2256372797e8c9c280ef22c19eeca19d319279c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2147608
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2020-04-13 20:33:45 +00:00
Mohan Maiya dac5cc3b6a EGL: Add support for EGL_EXT_image_gl_colorspace extension
Add support for creating images with custom colorspace.

Bug: angleproject:3756
Tests: angle_end2end_tests --gtest_filter=ImageTest*
Change-Id: I9c332c012541c094728d9d9bde7add4189084a33
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2104088
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
2020-04-09 17:31:30 +00:00
Brandon Schade a156df2358 Vulkan: add support for EXT_texture_sRGB_R8
Added support for EXT_texture_sRGB_R8. The GL_SR8_EXT format
will be available if the VK ICD supports VK_FORMAT_R8_SRGB.
This does not add support for emulation of this format.

Bug: angleproject:4503
Bug: angleproject:3609
Test: dEQP-GLES3.functional.texture.*.srgb_r8_*
Change-Id: Ifaec92ac1a8561881f54ddb7fdf0975112711736
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2135853
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-04-07 21:45:29 +00:00
Geoff Lang cb6470f9c7 Set sdk_version for cc_genrules used by modules with sdk_version set
sdk_version now creates a new variant, so the cc_genrules also need
sdk_version set.

Bug: b:149591340
Change-Id: I8c58cca2d4e73e9f123f968d47361e878743e1b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2131251
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-04-07 18:36:45 +00:00
Mohan Maiya 96c26c681b Add support for NV_shader_noperspective_interpolation
Added support for GL_NV_shader_noperspective_interpolation on
the Vulkan and Desktop OpenGL backends

Bug: angleproject:4388
Test: angle_end2end_tests --gtest_filter=ShaderInterpTest.NoPerspective/*
Change-Id: I12473830c0ea8b4fffeae9c4a8ec92d979c8e18c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2107234
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-04-03 19:01:16 +00:00
Jonah Ryan-Davis 4b94d7bb4f Split EGL_CHROMIUM_sync_control into EGL_ANGLE_sync_control_rate
eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based
on the original extension GLX_OML_sync_control. However, this new
function is not universally implemented. This CL moves it to a new
extension, EGL_ANGLE_sync_control_rate, and renames it to
eglGetMscRateANGLE.

Bug: chromium:1064078
Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-03-31 20:55:48 +00:00
Alexis Hetu b83b0f5e9f Add support for NV_read_depth, NV_read_stencil and NV_depth_buffer_float2 extensions
This cl adds the ability for the ReadPixels function to read other
attachments than the color attachment. Checks were added for both
depth and stencil attachments.

A new test was added (DepthStencilFormatsTest.DepthStencilReadback)
to test this new functionality. As the name mentions, it's used to
test reading from the depth and stencil attachments using ReadPixels.

Bug: angleproject:4295
Change-Id: I6fe9be11f05d6055a5883b4315f870e7c0ac41ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2031702
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-03-30 19:04:04 +00:00
Cody Northrop 74e816bfff Vulkan: Expose extension for ETC1 usage with subimage updates
This CL implements the GL_EXT_compressed_ETC1_RGB8_sub_texture
extension, which was added to relax restrictions on using
ETC1_RGB8_OES for subimage updates.

Test: Temple Run on Android
Bug: b:152512564
Change-Id: I78cfd7dfd54fab36dee59a93b3ec3bfce17e73e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2123232
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-03-30 15:56:34 +00:00
angle-autoroll bf6b8d4a16 Roll third_party/vulkan-headers/src fb7f9c9bcd1d..0e78ffd1dcfc (1 commits)
fb7f9c9bcd..0e78ffd1dc

git log fb7f9c9bcd1d..0e78ffd1dcfc --date=short --first-parent --format='%ad %ae %s'
2020-03-24 oddhack@sonic.net Update for Vulkan-Docs 1.2.136

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

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

TBR=cnorthrop@google.com

Bug: None
Change-Id: I17d7b9ba8e96fa1e3dab15260436b71887d55536
Tbr: cnorthrop@google.com
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2121708
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-26 08:54:21 +00:00
Courtney Goeltzenleuchter 6719f54ac7 Update Vulkan header and related repos
Vulkan header was updated with non-backward compatible change so need
to update all dependencies simultaneously.

Bug: b:152298150
Bug: angleproject:4510
Change-Id: I46ac9a3a0ccb52184fd183df617804c866b63453
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118151
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2020-03-26 01:02:41 +00:00
Geoff Lang 07467b4aca Remove GL_CHROMIUM_path_rendering
Bug: chromium:1063193
Bug: angleproject:4270
Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-20 19:13:16 +00:00
Geoff Lang 95a4ded588 Android.bp: Ignore unknown warning flags.
Clang and Chrome build with different versions of clang which support
different warning flags.  Ignore unknown warning flags when building in
Android.

Bug: b:142320172
Change-Id: I35eb424aa5a146fec7dabf9f3aa71bd6dd9d8f50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112282
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-20 18:56:16 +00:00
Jamie Madill a8c95f74da Update export_targets to fix presubmit on Windows.
We don't have Windows presubmit coverage so this slipped through with
the change to add DisplayEGL.

See: "Reland "Instantiate rx::DisplayEGL when device type EGL is selected"

Bug: angleproject:4328
Change-Id: I68f9e77b7b38fca86cf30a247f33543e4157e73f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2102952
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Julien Isorce <julien.isorce@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-03-13 18:01:20 +00:00
Geoff Lang 6ab0dbdfcf Rename ANGLE_defaults to ANGLE_java_defaults.
This target already exists in internal master, avoid the name conflict
until there is only one set of build files.

BUG=b:142320172

Change-Id: Ida176f39422c1c57cc2936a06e61b7e86bf2cc90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2101367
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-12 18:11:08 +00:00
Geoff Lang 14aaa1eb03 Refactor ANGLE target to allow GoogleANGLE to override it.
GoogleANGLE will be signed in a different part of Android so it needs to
be able to reference ANGLE's target and defaults to override certain
properties.

Update the manifests to request the needed permissions to use the
developer options.

Bug: b:142320172
Change-Id: Ia47815ab53f8de66332412efa2cc0fca3175e2cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2096815
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-11 22:02:31 +00:00
Geoff Lang 9e5bbb3893 Use ANGLE's vulkan-headers dep when rolling ANGLE into Android.
We previously used the existing Android target for vulkan headers but it
does not roll as fast as ANGLE's, possibly causing divergence in test
results.

BUG=angleproject:2344
BUG=b:150892231

Change-Id: Ibef33b266943c040219529f64ea8cd29c8c9bf83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090394
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-11 21:43:11 +00:00
Charlie Lao c5b3cbdb45 Vulkan: Use VK_FORMAT_D24_UNORM_S8_UINT for 24 bit depth if available
And if the format we picked has extra bits, try to clear it instead
of load the value. Don't store these extra bits as values as well.

Bug: angleproject:4459
Change-Id: If5d0e31aca1453deab970d0dbcf8886a5e6ed51c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095850
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
2020-03-10 23:55:08 +00:00
Takuto Ikuta 05710d5478 use go swarming client in trigger.py
python client is being deprecated.

Tested by
$ python third_party/angle/scripts/trigger.py --shards=2 -p chromium.tests out/Release base_unittests Ubuntu none

Fixed: chromium:1047115
Change-Id: Id653e2b29e8bf02ab86eaa4c5c767d081fa29dbd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095654
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-03-10 22:28:32 +00:00
Takuto Ikuta 0837bf756b use go isolate client in trigger.py
python client is being deprecated.
I will switch swarming client later.

Tested by
~/chromium/src$ python third_party/angle/scripts/trigger.py -p chromium.tests out/Release base_unittests Ubuntu none

Bug: chromium:1047115
Change-Id: Ibad2bf5ab80b09aadfcd0431fea8c5e97d38655d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095035
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2020-03-09 21:30:18 +00:00
Geoff Lang 719039123a Generate arch-specific defines in Android.bp
ANGLE has a ANGLE_IS_32/64_BIT_CPU define that is based on the gn arg
for "target_cpu".  Don't emit this define as is from the gn desc, move
it to an architecture-specific section of the generated blueprint.

BUG=angleproject:2344

Change-Id: Ib6387d5f31b30900b5d3195da6d9b21c48e1e2a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2090393
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2020-03-09 17:58:26 +00:00
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