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

10440 Коммитов

Автор SHA1 Сообщение Дата
Cody Northrop a2129356e9 Vulkan: Add support for 2D array textures
Includes changes from jmadill to align with Vulkan backend design.

Correctly setting layer count and depth when the texture type is
2Darray. Vulkan requires depth of 1 for 2Darray textures.

Bug: angleproject:3189
Change-Id: I0d58c33fcd75b1d768ea0308ac6e54230d8cfcc5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1721169
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2019-07-26 19:05:13 +00:00
James Dong 7e50f4cd5e Vulkan: Fix ES 3.1 vertex attribute bindings
When handling dirty bindings, we were treating binding indices as if
they were attribute indices, causing strange behavior. This change fixes
the dirty bit handler to use the provided index properly and update the
attributes that correspond to the binding index.

Test: ./angle_end2end_tests --gtest_filter='VertexAttributeTestES31.OnlyUpdate*/ES3_1_Vulkan'
Bug: angleproject:3598
Change-Id: I2bc3cd4da5f639a1301776fcf057a74368812c56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1718786
Commit-Queue: James Dong <dongja@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-26 18:34:22 +00:00
Jonah Ryan-Davis 6e9098629b Update dEQP charts.
The charts were regenerated, update the docs to point to the new charts.
Also remove some redundancy (we don't need the overview to track differences in vendors)

Bug: angleproject:3713
Change-Id: I2005031c4ca960d7f9afd80562957d31af795d61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1721190
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-07-26 18:03:11 +00:00
James Dong 020abb8b82 Vulkan: invalidate translation buffers for SSBOs
Translation buffers weren't being marked dirty after running a compute
shader in which they are bound as SSBOs.
This change invalidates all SSBOs after a draw or compute call.

Bug: angleproject:3739
Change-Id: I66b56df7e619b55afc7e3da6b5613b6d050e06bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1717144
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: James Dong <dongja@google.com>
2019-07-26 17:39:21 +00:00
Jiacheng Lu 3e9bc2a72b Fix param name of glDrawArrays capture
Bug: angleproject:3611
Change-Id: Idba4d49d36274db8545f2526f19f045f97031379
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1721173
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-26 17:24:51 +00:00
Clemen Deng f2412bca35 Get rendering to texture working
Other small fixes for desktop compatibility

Bug: angleproject:3620
Change-Id: I8e75bce1f850fb891c8bb6e16f79302a6d59276c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707932
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-26 16:25:02 +00:00
Jonah Ryan-Davis 0716ce0a2c Re-add case to blitframebuffer workaround where src is outside of bounds.
On Mac, blitFramebuffer calls fail if the source region is not enclosed
by the framebuffer. In this case, we must naively clip the source region
and adjust the dest region accordingly. This is slightly different
behavior and may cause issues with scaling so we use a separate
workaround.

Also, Windows NVIDIA has a driver bug that affects Vulkan device
creation after blitting large textures, so it should be included in the
original workaround.

This CL cleans up the workaround to use more helpers from ANGLE and to
generally improve readability.

Bug: chromium:830046
Change-Id: I50bd97449725b738036e6bd3af82362020d7eda8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713090
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-26 15:18:36 +00:00
angle-autoroll f002a63774 Roll ./third_party/glslang/src 9f2236e58ed0..42f813401bdf (6 commits)
9f2236e58e..42f813401b


Created with:
  gclient setdep -r ./third_party/glslang/src@42f813401bdf

The AutoRoll server is located here: https://autoroll.skia.org/r/glslang-angle-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



Bug: None
TBR=jmadill@chromium.org,jmadill@google.com
Change-Id: I88b5be03e7f7ec2b442baa2a01033ac5ca97dd4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1720290
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-07-26 10:26:23 +00:00
angle-autoroll eaef09c0cc Roll ./third_party/spirv-tools/src 3855447d93eb..f54b8653dd9d (9 commits)
3855447d93..f54b8653dd


Created with:
  gclient setdep -r ./third_party/spirv-tools/src@f54b8653dd9d

The AutoRoll server is located here: https://autoroll.skia.org/r/spirv-tools-angle-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



Bug: None
TBR=jmadill@chromium.org,jmadill@google.com
Change-Id: Id79c4c5ce598fb2bb1206e3902ffede2aa8dc4c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1720289
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-07-26 09:46:13 +00:00
Ian Elliott fab397e5ac Vulkan: Enforce an error when initializing a global with a non-const
The ESSL 1.0 spec is clear that "initializers must be a constant expression."
Yet, because of "legacy" applications (apparently just WebGL applications), the
code was only issuing a warning and not an error.  The
"KHR-GLES2.shaders.negative.initialize" test requires an error be generated.
This change splits the semantics, allowing GLES applications to get an error,
and WebGL applications to get a warning.

Note: This change is related to https://chromium-review.googlesource.com/829138
(for angleproject:2285).

Bug: angleproject:3381
Change-Id: Ie243b7dd72102aeb52df506d121d1d2a8f6974d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1716617
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2019-07-26 03:37:39 +00:00
Jamie Madill c327370e72 Vulkan: Pass VkExtent3D to TextureHelper::init.
Bug: angleproject:3189
Change-Id: I4b95240bb32fbc2b3d0c8f097e0552d0fe23417d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713094
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-07-25 21:16:17 +00:00
Shahbaz Youssefi c68e7cbcad Vulkan: Fix image copy flipping
The draw framebuffer was consulted for flipping instead of the read
framebuffer.

Revealed a bug with copy-with-transfer not taking source render target's
level/layer into account.  This test was failing on Linux/Intel because
there the framebuffer is not flipped, so the transfer path was taken.

Bug: angleproject:2954
Bug: angleproject:3723
Change-Id: If95bf97b8e0536302ed39999be47bf904283c9e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1718784
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-25 20:24:59 +00:00
Shahbaz Youssefi bbffb7796c Fix read framebuffer binding sync before copy image
The READ_FRAMEBUFFER_BINDING dirty bit sync was missing from copy image
functions.  In the Vulkan backend, a cached value for the current read
framebuffer was used to determine if the copy should flip in Y, and that
cached value was out of date.

Bug: angleproject:3723
Change-Id: I10e8a276a42c28fbedc9939f653a5a1f4a14e87b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1715483
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-25 18:44:36 +00:00
Shahbaz Youssefi 08b97da894 Vulkan: Fix staging buffer alignment for pixel sizes > 4
Previously, all non-compressed formats were satisfied with a 4-byte
alignment.  The introduction of float formats changes this.

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

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

Bug: angleproject:3731
Change-Id: I6abfd1c294e7f863eb99d2468eaac09e5d714039
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1715205
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-25 18:14:56 +00:00
Shahbaz Youssefi 557e3853da Vulkan: Disable atomic counter buffer tests on AMD/Windows
A likely driver bug is causing the subsequent OpenGL test to fail.

Bug: angleproject:3738
Change-Id: I6ee5e9e7298a2adb3069a6e14ac83453fa34b50f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1716056
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-25 02:45:18 +00:00
Clemen Deng 8bb46c5b9f Refactor: add InternalFormat::isInt()
Bug: angleproject:3727
Change-Id: I33ee85563e3b070b4b86afc37230d3f5af54f446
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713091
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-23 18:03:22 +00:00
Jose Dapena Paz dd3de6f095 Do not assume __has_builtin is available
Compilation with GCC breaks as there is a build check using it.
To avoid the problem, we declare the macro HAS_BUILTIN that maps
to __has_builtin if it is defined, or 0 otherwise.

Bug: chromium:819294
Change-Id: I105d566f08baa495fccd553d7b06eb8ce36621ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713604
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-23 17:00:54 +00:00
angle-autoroll cd369bb8a2 Roll ./third_party/spirv-tools/src 76b75c40a1e2..3855447d93eb (3 commits)
76b75c40a1..3855447d93


Created with:
  gclient setdep -r ./third_party/spirv-tools/src@3855447d93eb

The AutoRoll server is located here: https://autoroll.skia.org/r/spirv-tools-angle-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



Bug: None
TBR=jmadill@chromium.org,jmadill@google.com
Change-Id: I5d98e670ca5e5de9c2675cca7803e395e7f0d1d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1714120
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-07-23 11:06:30 +00:00
James Dong 02407743bd Vulkan: implement indirect dispatch
Implements indirect dispatch for Vulkan backend. Layout of dispatch
structure is the same as OpenGL, so we pass in the buffer directly.

Test: ./angle_deqp_gles31_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES31.functional.compute.indirect_dispatch.*'
Bug: angleproject:3601
Change-Id: I94c6b1a86d3c24c1ca1bb6a78529b38909a2b91f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1710024
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: James Dong <dongja@google.com>
2019-07-22 23:18:00 +00:00
Jamie Madill cedea1d91b Vulkan: Rename 'extents' param to 'glExtents'.
Merely a minor refactor to clean up the diff of a subsequent CL. In the
follow up we will also distinguish the GL extents from the Vulkan
extents/layerCount pair.

Bug: angleproject:3189
Change-Id: Ibbb79bf2e6d3f798243b424bacbfb2e5538bfecf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709755
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-07-22 22:43:20 +00:00
Clemen Deng 592539fdee Implicit conversions for Desktop GL shaders
Need to support implicit conversions between types for GL shaders
Other small fixes to support GL shaders

Bug: angleproject:3673
Change-Id: I5341cb7195054ccc4cd36aad5dc8c801c7e1a14f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698649
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-22 21:55:20 +00:00
Yuly Novikov 3dcd8ebb80 Skip ProgramBinaryTransformFeedbackTest.GetTransformFeedbackVarying
on Pixel 2 Vulkan.

Bug: angleproject:3690
Change-Id: Ic00038cfe8fe9d1170eb75aec89c0ac0f074fb05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1710026
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-07-22 20:50:28 +00:00
Jamie Madill deb43a31cc Vulkan: Store VkExtents3D in ImageHelper.
This makes the distinction between a gl::Extents (includes a depth
value for 2D array texture layer count) and a Vulkan extents (2D array
textures have a "1" for depth) clearer. Preparation refactor patch.

Bug: angleproject:3189
Change-Id: I9a13379c421e7f3c7856ac15b7a73013258ab9fe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709754
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-22 20:26:18 +00:00
Jamie Madill da2b649ce9 Texture: Make ImageIndex store layer counts.
Only for 2D array textures.

Bug: angleproject:3189
Change-Id: I9958ab60ffa464aa63f5cb321cbbe14b378f3647
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709109
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-07-22 20:12:25 +00:00
Yuly Novikov af80b78119 Skip ShaderStorageBufferTest31.ActiveSSBOButNotStaticallyUsed
on Pixel 2 Vulkan.

Bug: angleproject:3725
Change-Id: Ic5c80ad3ec495c3fd382639f761b368f16993434
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713564
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-07-22 19:23:35 +00:00
Shahbaz Youssefi b82d863336 Vulkan: Atomic counter buffer support
Vulkan doesn't treat atomic counters especially, and they are emulated
with atomic access to storage buffers.

A single atomic counter buffer binding per pipeline is supported.  All
the atomic counters identify an offset within this buffer.  The shader
is modified to include a storage buffer definition with
`uint counters[];` as the only field.

A compiler pass replaces atomic counter definitions with variables that
hold the corresponding offset parameter, as well as changing atomic_uint
types to just uint (as the offset).  Where an atomic counter variable is
used, it is replaced with the offset variable (plus the array index, if
array).  At the same time, built-in `atomicCounter*` functions are
replaced with a corresponding `atomic*` function and
`memoryBarrierAtomicCounter` is replaced with `memoryBarrierBuffer`.

Bug: angleproject:3566
Change-Id: Iefb3d47de6a5cb3072bfa0cb94a46ac6a886d369
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704635
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-07-22 19:15:16 +00:00
Yuly Novikov bd4ff4792e Revert "Reland "Temporarily disable creating D3D debug device.""
This reverts commit 6064e6ab6b.

Reason for revert: flakiness should be fixed by https://chromium-review.googlesource.com/c/angle/angle/+/1709726

Original change's description:
> Reland "Temporarily disable creating D3D debug device."
>
> This reverts commit 28394c2295.
>
> Reason for revert: may be the cause of flakiness on Win10 Debug (NVIDIA) per http://crbug.com/972914 .
>
> Original change's description:
> > Revert "Temporarily disable creating D3D debug device."
> >
> > This reverts commit 3d544fffe7.
> >
> > Reason for revert: Seems like flakiness is not related.
> >
> > Suppress D3D11 test failures uncovered by re-enabling D3D debug device:
> > ComputeShaderTest.DispatchCompute
> > Texture2DTestES3.TextureImplPropogatesDirtyBits
> > D3DTextureTestMS.*
> >
> > Also a small fix to ANGLETestBase::checkD3D11SDKLayersMessages
> > to clear reported messages, otherwise the failures are also reported
> > for tests following the one with the actual failure.
> >
> > Original change's description:
> > > Temporarily disable creating D3D debug device.
> > >
> > > To diagnose whether Windows Intel end2end tests flakiness
> > > is related to creating debug device and new version of Windows SDK.
> > >
> > > Bug: angleproject:3153
> > > Change-Id: Ica7eae3fe875e22203b6dfd98b83604d66a97737
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1476954
> > > Reviewed-by: Geoff Lang <geofflang@chromium.org>
> > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
> >
> > Bug: angleproject:3153, angleproject:3493
> > Bug: angleproject:3501, angleproject:3512, angleproject:3513
> >
> > Change-Id: I232da72aa09c2b9230cf179dd54e1731f8365f8e
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1480854
> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
>
> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org
>
> Change-Id: I38a5cc9bb6ebcd50e97e40cc972a82679e73732a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3512, angleproject:3513
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1652784
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Commit-Queue: Kenneth Russell <kbr@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,kbr@chromium.org,jmadill@chromium.org

Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3513
Change-Id: I16eff79172dcfa2dd6d4f6445a74c9c65c1bd27c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1710861
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-07-22 18:11:44 +00:00
Shahbaz Youssefi 87dc17b5e7 Vulkan: Generalize buffers desc set name to include images
And atomic counter buffers which are emulated with storage buffers.

Bug: angleproject:3566
Change-Id: I102763900c779c3a84661491bad53aec384461f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713086
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-22 18:03:42 +00:00
Fei Yang a71549b112 Vulkan: Intermittent failures in many GLES2 CTS
The stage mask in vkCmdPipelineBarrier is incorrectly set.

Bug: angleproject:3473
Change-Id: I4fea5994a391b0db0f81183f1c4d4ba47d387acb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1631849
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-22 17:37:04 +00:00
Jonah Ryan-Davis 7151fe54fe Port adjust_src_dst_region_for_blitframebuffer workaround to ANGLE.
BlitFramebuffer has issues on some platforms with large source/dest
textures. As per the WebGL2 spec, this was caught with validation for
sizes over 2^32, but there is a specific issue on Linux NVIDIA where it
fails on sizes over 2^16. A better workaround (from chromium), resizes
the blitframebuffer call based on the framebuffer size.

Bug: chromium:830046
Change-Id: Ic6196db6228d0d0ac92b12a68bbced76dcbcdf8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707115
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
2019-07-22 15:01:34 +00:00
Mohan Maiya 9ec3f51d11 Reland "Vulkan: Implement OES_get_program_binary extension"
Reason for revert: default uniform initialization was incomplete

This change has the following fixes:
    1. Add missing default uniform initialization when loading
       program binaries.
    2. Re-enable OES Program Binary capabilities for Vulkan.
    3. Added two angle end2end test,
       - ProgramBinaryES3Test.BinaryWithLargeUniformCount
         uses several uniforms across the vertex and fragment
	 shaders.
       - ProgramBinaryES3Test.ActiveUniformShader tests
         the difference between uniform static and active use

Bug: angleproject:3216
Bug: angleproject:3217
Bug: angleproject:3665
Tests: dEQP-GLES3.functional.shader_api.program_binary*
       angle_end2end_tests --gtest_filter=ProgramBinary*
Change-Id: If6886f01241d65bb1e17a21cc3406533021072ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699069
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-19 21:46:29 +00:00
Yuly Novikov 8bea8eec7a Guard ID3DUserDefinedAnnotation access in DebugAnnotator11.
ID3DUserDefinedAnnotation is not thread-safe, like ID3D11DeviceContext,
however, it's being accessed from WorkerThread for parallel compilation,
thus guard it with mutex lock.

Bug: angleproject:3493
Change-Id: Ic7cc7fe03675174e054fe1e11d8d9e05abc716a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709726
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-07-19 21:03:20 +00:00
Jiacheng Lu f35f11106d Add script to apply clang-format on all sources
1. python script wrapper to call clang-format over the whole code base
2. Add clang-format rule `IncludeBlocks: Preserve` to tell clang-format
do not merge include blocks
3. Fix existed clang-format issue in code base

Bug: angleproject:3532
Change-Id: I289292dc62c2784ff21688065c87c3f3f5538f17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709720
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-19 20:10:28 +00:00
Jamie Madill fb5c581dc4 Functional revert of "Signal different dirty bit for vertex buffer change."
Seems to be causing rendering regressions in the Google Maps benchmark.
Likely causing other serious regressions.

Original CL: https://chromium-review.googlesource.com/c/angle/angle/+/1684294

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

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

Test: ./angle_deqp_gles3_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES3.functional.vertex_arrays.*'
Test: ./angle_end2end_tests --gtest_filter='AttributeLayout*/ES3_Vulkan'
Test: ./angle_end2end_tests --gtest_filter='VertexAttribute*/ES3_Vulkan'
Bug: angleproject:3193
Change-Id: I5ae4edd743e86e3e89e2697034c04dc4d9ecd1f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1668230
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: James Dong <dongja@google.com>
2019-07-19 19:19:58 +00:00
Geoff Lang 86a28b3de8 Vulkan: Use the correct context in ImageVk::orphan.
The context used for Image creation was being used during orphaning. This
causes problems when the image is created with an external source or when
different contexts are used between creation and orphaning.

BUG=angleproject:3722

Change-Id: Iee4abd2116c3410efd8fb35722cc956cc6d8a3fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709753
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-07-19 18:16:30 +00:00
Geoff Lang 833bce722b Call ImageImpl::destroy before destroying the image source.
egl::Image destroys the source sibling before calling the backend destroy
function.  ImageVk needs the source image to do proper clean up.

BUG=angleproject:3722

Change-Id: I110d77a9c4151166624bb953c579102ac7dab6ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709752
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2019-07-19 18:16:10 +00:00
Geoff Lang 610f2388fd Return backwards compatible context versions in Vulkan, GL and D3D11.
This allows us to pass some dEQP GLES 2.0 tests that require using an ES 3.0
context and matches native driver behaviour of returning a higher-than-
requested context version when it's backwards compatible.

BUG=angleproject:3425
BUG=angleproject:3300
BUG=angleproject:3715
BUG=angleproject:3243
BUG=angleproject:3240
BUG=angleproject:3716

Change-Id: I03dfd56deb6191c3363808717e0eea6fdcf5f3ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709111
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-07-19 17:49:50 +00:00
Mohan Maiya 901dd5458e Rectify bug in initialization of offsets for uniform variables
Make sure to set a uniform's flattenedOffsetInParentArrays
value only if it has a valid parent array index.
Serialize/Deserialize flattenedOffsetInParentArrays value.

Bug: angleproject:3216
Bug: angleproject:3217
Bug: angleproject:3665
Change-Id: I6e4d003b1dd74b330bcf153f8d3df92414f198dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704219
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-19 16:49:00 +00:00
Clemen Deng 523dbf4070 Add GL versions to desktop implementation
The current implementation generates entry points for GL up to
version 3.1. Will need to support later versions for some apps.

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

Bug: angleproject:3702
Change-Id: Iefe490cb53a384c45f0d0024321deda43b461bcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704214
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Clemen Deng <clemendeng@google.com>
2019-07-19 14:57:07 +00:00
angle-autoroll 3c4cfad19f Roll ./third_party/spirv-tools/src aa9e8f538041..76b75c40a1e2 (1 commits)
aa9e8f5380..76b75c40a1


Created with:
  gclient setdep -r ./third_party/spirv-tools/src@76b75c40a1e2

The AutoRoll server is located here: https://autoroll.skia.org/r/spirv-tools-angle-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



Bug: None
TBR=geofflang@chromium.org
Change-Id: I4582e909efe850056ab42131cfcbfb9ac5915cec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709733
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-07-19 07:46:26 +00:00
Geoff Lang 6a02f06dfd Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.

BUG=angleproject:3425

Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-18 22:51:46 +00:00
Yuly Novikov 3d4dfa671d doc: Update TestResults.qpa location on Android
Bug: angleproject:1944
Change-Id: I2f4e8f70af8590bca54967cd0d65b4399d6c43e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709234
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2019-07-18 19:26:55 +00:00
Jamie Madill 9c78f592fc Remove a few histograms from Renderer11.
D3D11 startup time isn't something we're actively looking at right now.

Bug: chromium:975166
Change-Id: I3e56d0b0e0da7eb5b10c55b8cfcc0b9769064202
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707929
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-18 16:29:26 +00:00
Shahbaz Youssefi 8cb9596077 Vulkan: Fix FS array output location assignment
Test: angle_end2end_test --gtest_filter=GLSLTest_ES3.FragmentShaderOutputArray/ES3_Vulkan
Bug: angleproject:3707
Change-Id: I6519a76aa58ad80ada0e2ad90a2a70d93f831ce5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704779
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-18 13:53:45 +00:00
Jiacheng Lu ec30d78d51 Optimize uniform matrix update
1. Add a fast matrix update function to do a single memcpy for uniform
matrix assignment with same layout. It benefits row-4 no-transpose GLSL
matrix and col-4 transpose HLSL matrix.
2. Make boolean IsColumnMajor to be a template parameter in generate
uniform matrix updating, which gets rid of the conditional branch
in loop and has better performance.
3. Add e2e test of uploading multiple 3x4 GLSL matrices at the same
time, which adds coverage to this CL.

Bug: angleproject:3632
Change-Id: Id1701ef6fbf63ea4b9884254d93ea8eacfe4e16a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688274
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-07-18 13:40:45 +00:00
Jamie Madill 69194e5f49 Reduce variance in TextureUploadPerf.
This reduces the test time to run in several ms instead of almost
seconds per iteration. It allows us to use the perf test runner harness
to check test performance more accurately by increasing the sample
count.

It first reduces the test iteration count to reduce total test time.
It also refactors the test contents to not allocate new objects and
memory with every test iteration. This gives a better sampling of what
the test is obsering: texture upload performance.

Also allows tests that like to track GPU time to be used with the NULL
device option.

Bug: angleproject:3712
Change-Id: Idacc3e3b424f8882d7680769b27d1f04146ea65d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707112
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-18 12:19:15 +00:00
angle-autoroll 27ee35e627 Roll ./third_party/spirv-tools/src 58e2ec25bab0..aa9e8f538041 (1 commits)
58e2ec25ba..aa9e8f5380


Created with:
  gclient setdep -r ./third_party/spirv-tools/src@aa9e8f538041

The AutoRoll server is located here: https://autoroll.skia.org/r/spirv-tools-angle-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



Bug: None
TBR=geofflang@chromium.org
Change-Id: I9922d2ef0fa7b0c2c29885931bdc82628902b61a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1708062
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-07-18 10:11:37 +00:00
angle-autoroll eb3224998d Roll ./third_party/glslang/src 74426f7570fd..9f2236e58ed0 (1 commits)
74426f7570..9f2236e58e


Created with:
  gclient setdep -r ./third_party/glslang/src@9f2236e58ed0

The AutoRoll server is located here: https://autoroll.skia.org/r/glslang-angle-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



Bug: None
TBR=geofflang@chromium.org
Change-Id: Ic57be04dba37fd9f7e1e5e2fa02c9bca7dfcc054
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1708061
Reviewed-by: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: angle-autoroll <angle-autoroll@skia-public.iam.gserviceaccount.com>
2019-07-18 08:06:57 +00:00