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

9420 Коммитов

Автор SHA1 Сообщение Дата
Jamie Madill 60a50cfcb8 Inline Context::DrawArrays and Context::BindBuffer.
This reduces the call depth of both of these two hotspots.
Reduces time spent in the CPU overhead benchmarks by about 10%.

Bug: angleproject:2966
Change-Id: I5052e56dcc1dfb80274326a7f0891fafba7d6655
Reviewed-on: https://chromium-review.googlesource.com/c/1392389
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
2018-12-30 06:00:42 +00:00
Yuly Novikov 9f088621eb Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7.

Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624

Original change's description:
> Load entry points dynamically in tests and samples.
> 
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
> 
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
> 
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
> 
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
> 
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

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

Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 20:46:23 +00:00
Jamie Madill 03923558a7 Load entry points dynamically in tests and samples.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
Reviewed-on: https://chromium-review.googlesource.com/c/1359516
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-29 16:24:36 +00:00
Jamie Madill 8c78ce4bd3 Use visitor pattern for Shader Variable APIs.
In many places in ANGLE we need to traverse a ShaderVariable tree. We
do this to store uniform offset and other information, to flatten the
tree of uniforms for the front-end, or to produce active variable lists
for uniform and shader storage blocks. In each case, we would write
separate tree traversal code.

This patch introduces a shared visitor pattern for all of the shader
variable tree traversal instances. With that get more common code. Also
it is easier to write new variable traversals. ProgramD3D and
ProgramLinkedResources in particular get nice simplificiations.

The visitor object recieves callbacks from the traversal when entering
structs, array elements, and new variables. The visitor can treat these
differently depending on the use case. A common visitor that constructs
full variable names is used as a base class in several places.

Also moves the 'isRowMajorLayout' from sh::InterfaceBlockField to
sh::ShaderVariable. This allows us to forgo using templates in several
call sites.

Bug: angleproject:3024
Change-Id: I472d81ec775e2eee92fb3d2eb0ca83860221ba2e
Reviewed-on: https://chromium-review.googlesource.com/c/1358722
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 08:04:48 +00:00
Shahbaz Youssefi e321940cb0 Vulkan: Move image clear functionality to UtilsVk
DispatchUtilsVk is renamed to UtilsVk and the functionality in
framebuffer's clearWithDraw() is moved to that class.  Eventually, more
fragment-shader-based internal algorithms will be added to this class as
well.

Bug: angleproject:2958
Change-Id: I4753c9cb3288b59cd1ed60fe7a57b9f189704322
Reviewed-on: https://chromium-review.googlesource.com/c/1369284
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-29 07:34:55 +00:00
Shahbaz Youssefi af4cef51ea Improve CopyTexImageTest
The test is enhanced to perform the copy multiple times.  Initially, the
copy creates a new texture from a 16x16 framebuffer.  Then, a copy is
made from another 16x16 framebuffer (which should not trigger the
recreation of the texture).  Finally, a copy is made from a 32x32
framebuffer (which should trigger the recreation of the texture).

Bug: angleproject:2958
Change-Id: Idc934d6f3d6312a2122d079309a4c2ae2608ba7f
Reviewed-on: https://chromium-review.googlesource.com/c/1392388
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-29 05:11:12 +00:00
Xinghua Cao c5117571c8 Add test case for storage buffer
When storage buffer bound is unchanged and shader writes it,
buffer content should also be updated. Currently, this case
cannot work normally on D3D backend.

Bug: angleproject:2814
TEST=angle_end2end_tests.ComputeShaderTest.StorageBufferBoundUnchanged

Change-Id: I6f25b7eac84c44392befaca61a33bdf2457f29f9
Reviewed-on: https://chromium-review.googlesource.com/c/1391880
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-29 02:19:57 +00:00
Qin Jiajia 3f01f53c02 ES31: Add state change tests for image
This change adds dirty bit state change tests for image textures.
Meanwhile, syncImages related codes are removed since syncTextures will do
all texture states sync.

Bug: angleproject:3015

Change-Id: I9b299c86af1d589e72c08c5d7c55ac74cc7833aa
Reviewed-on: https://chromium-review.googlesource.com/c/1390596
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-29 01:32:07 +00:00
Markus Tavenrath cb9609fe58 Optimize glDrawElements performance
A call to glDrawElements results in a calling depth of up to 4
* glDrawElements
* gl::Context::DrawElements
* rx::ContextGL::DrawElements
* VertexArrayGL::syncDrawState.

Each function call has to save/restore a lot of registers which
results in a stall in the prologue of rx::ContextGL::DrawElements
due to memory bandwidth limitations.

The main change is the function gl::Context::DrawElements being
inlined to reduce the calling depth by one. In addition the call
to ContextGL::syncDrawElementsState is now protected so that it
gets called only if it's required. Finally a few small getter
functions have been inlined where the calling code was bigger
than the actual function.

In total this change improves performance of the
DrawElementsPerfBenchmark.Run/gl benchmark by 16%.

Bug: angleproject:2966

Change-Id: I423d18452f2f5b520ab52850fda2054e1da86991
Reviewed-on: https://chromium-review.googlesource.com/c/1389988
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Markus Tavenrath <matavenrath@nvidia.com>
2018-12-28 15:47:26 +00:00
Raul Tambre 7f6b367497 Disable null pointer arithmetic warnings for GLES1 conformance tests
Required for the rest of Chromium to compile with the warning enabled.

Bug: chromium:766891
Change-Id: Ie319df01599434011dc953532a30ad68d6a7c9a3
Reviewed-on: https://chromium-review.googlesource.com/c/1390659
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-25 16:18:02 +00:00
Xinghua Cao 8441286093 Set dirty for uniform on D3D backend
When uniform's value had been updated, set dirty and
update its content on D3D backend.

Bug: angleproject:2814
TEST=angle_end2end_tests.ComputeShaderTest
     .UniformDirty/ES3_1_D3D11
dEQP.GLES31/functional_image_load_store_cube*
dEQP.GLES31/functional_image_load_store_3d*
dEQP.GLES31/functional_image_load_store_2d_array*

Change-Id: Ic135c140559925fe33790475d03dc608afa92384
Reviewed-on: https://chromium-review.googlesource.com/c/1387967
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
2018-12-23 04:55:47 +00:00
Jamie Madill ae6ba9f83d Optimize check for active not paused XFB.
Local testing showed an improved score of about 2% in the most
sensitive CPU overhead benchmark. Likely because of improved
caching from fewer indirections.

Bug: angleproject:2966
Change-Id: I5d9a4b4bcf624ab0b430bb696c4227e589cdb7a6
Reviewed-on: https://chromium-review.googlesource.com/c/1359518
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-22 05:14:33 +00:00
Jamie Madill 1e85326695 Cache common DrawElements states.
Similar to how we cache the base common draw states. This will improve
DrawElements performance. Several state checks are optimized into a
single 'if' check of a cached value.

Also includes a regression test for mapping the element array buffer.

Bug: angleproject:2966
Change-Id: Ia6e524a58ad6b7df2e455d67733e15d324b1b893
Reviewed-on: https://chromium-review.googlesource.com/c/1357150
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-22 03:58:36 +00:00
Ian Elliott 52f5da4318 Also enable flipY for Vulkan 1.1
The necessary support for flipY is included in core Vulkan 1.1
so enable the feature if that's what's available.

Bug: angleproject:2968
Change-Id: I6808a1a0b1ace74976a7476f77d686e137a1e747
Reviewed-on: https://chromium-review.googlesource.com/c/1387758
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-21 22:41:42 +00:00
Ian Elliott 899c5d264f Appropriately set VkApplicationInfo::apiVersion to 1.1
Check if the Vulkan instance version is 1.1+, and if so, set
VkApplicationInfo::apiVersion to 1.1 (which signals to the validation
layers that ANGLE will use Vulkan 1.1 functionality.

Bug: angleproject:2968
Change-Id: I6808a1a0b1ace74976a7476f77d686e137a1e746
Reviewed-on: https://chromium-review.googlesource.com/c/1387757
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-21 21:58:40 +00:00
Ian Elliott d50521fd06 Only enable VK_KHR_maintenance1 when available.
This prevents an error in case ANGLE is run on an older Vulkan driver
that does not support the VK_KHR_maintenance1 extension.

Bug: angleproject:3035
Change-Id: I7e2b74bcb88bffdfc2a525a1d332eb3ef7d23d7c
Reviewed-on: https://chromium-review.googlesource.com/c/1387347
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-12-21 19:17:26 +00:00
Courtney Goeltzenleuchter 92b16ea262 Re-land: Compress symbols for libraries
Reintroduce commit ffda3e2985.

Android requires system libraries to include symbols to aid
debugging. This CL will compress and attach the symbols from the
unstripped .so and add it to the stripped .so that goes in the apk
when building a release build.

Fix https://crbug.com/916751 introduced by Compress symbol
support CL ffda3e2985.

Bug: angleproject:2981
Change-Id: I8d3ef8e9f0ed44bdd24290f6cd56ba674b79f98c
Reviewed-on: https://chromium-review.googlesource.com/c/1387344
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2018-12-20 20:29:53 +00:00
Jamie Madill 2b35654dcf compiler: Fix const non-square matrix component mult.
It seems like there weren't any dEQP tests for constant folding of
nonsquare matrices component-wise multiplication. There were a couple
bugs in our implementation which could lead to undefined behaviour.

Fixes the code and cleans up a few style issues.

Also includes a regression test.

Bug: chromium:912505
Bug: chromium:912508
Change-Id: I7fb85d1404a32950fa9fe4c3bbba9edc9f38ddd1
Reviewed-on: https://chromium-review.googlesource.com/c/1387065
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-20 19:46:29 +00:00
Ian Elliott bcb7890895 Implement eglSwapBuffersWithDamage on top of VK_KHR_incremental_present
Bug: angleproject:2510
Change-Id: I12b0877f787dbcb48e2890f54ba4bc8ebe8294b4
Reviewed-on: https://chromium-review.googlesource.com/c/1383373
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-12-20 17:09:46 +00:00
CJ DiMeglio 96c11cc794 Revert "Compress symbols for libraries"
This reverts commit ffda3e2985.

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

Original change's description:
> Compress symbols for libraries
> 
> Android requires system libraries to include symbols to aid
> debugging. This CL will compress and attach the symbols from the
> unstripped .so and add it to the stripped .so that goes in the apk
> when building a release build.
> 
> Bug: angleproject:2981
> Change-Id: I51c315627b9183e49b509c27df506bf99bf45f30
> Reviewed-on: https://chromium-review.googlesource.com/c/1376270
> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>

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

Change-Id: Ifda891fc5257aa9c9b522bf5a20fda10142e82ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2981
Reviewed-on: https://chromium-review.googlesource.com/c/1385347
Reviewed-by: CJ DiMeglio <lethalantidote@chromium.org>
Commit-Queue: CJ DiMeglio <lethalantidote@chromium.org>
2018-12-19 23:04:28 +00:00
Jamie Madill 6f087e9e60 Modify end2end_tests main to not import ANGLETest.h.
This will allow for easier dependency management in the build files.

Bug: angleproject:2995
Change-Id: Ia3464bf622b861df03c3d06bcf1b34874a9a5400
Reviewed-on: https://chromium-review.googlesource.com/c/1385025
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-19 21:52:45 +00:00
Courtney Goeltzenleuchter ffda3e2985 Compress symbols for libraries
Android requires system libraries to include symbols to aid
debugging. This CL will compress and attach the symbols from the
unstripped .so and add it to the stripped .so that goes in the apk
when building a release build.

Bug: angleproject:2981
Change-Id: I51c315627b9183e49b509c27df506bf99bf45f30
Reviewed-on: https://chromium-review.googlesource.com/c/1376270
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-19 18:07:08 +00:00
Jamie Madill 4638dc9def Re-land "Load correct libGLESv2 on Linux and Mac."
Re-land fixes build to ensure commit_id is built before libEGL.

libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Bug: chromium:915731
Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab
Reviewed-on: https://chromium-review.googlesource.com/c/1380511
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 18:54:44 +00:00
Jamie Madill 720ca44976 Pass GN header visibility check.
This fixes a few things:

* removes includes that weren't supposed to be present
* scopes some compiler code into white_box_perftests
* makes version.h/commit and angle_common id more visible
* roll zlib to a version that passes check

This should help prevent build problems from popping up in the
downstream Chromium build. We could also potentially look at
including gn check in our CQ recipe.

Bug: chromium:915429
Change-Id: I350f543e16de13c84eb2c43260f4966d47185114
Reviewed-on: https://chromium-review.googlesource.com/c/1380771
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 15:25:40 +00:00
Xinghua Cao 0d218da495 Specify texture LOD in compute shader on D3D backend
D3D does not define LOD in compute shader, so Sample()
is not supported, try to use SampleLevel().

Bug: angleproject:2756
TEST=angle_end2end_tests.ComputeShaderTest
     .TextureFunction/ES3_1_D3D11
     dEQP.GLES31/functional_image_load_store_2d_store*

Change-Id: I63e707d2b56e807cfe766cc21bc6b0819982ce80
Reviewed-on: https://chromium-review.googlesource.com/c/1379672
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-18 04:00:12 +00:00
Xinghua Cao 2db5082b21 Add UAV format for GL_RGBA8I
GL_RGBA8I is a supported image unit format, add
its corresponding UAV format on D3D backend.

Bug: angleproject:1987
TEST=dEQP.GLES31/functional_image_load_store_2d_store_rgba8i
     dEQP.GLES31/functional_image_load_store_2d_load_store_rgba8i

Change-Id: Ib759f873c8629a644f85784a57ce141d3018e0c1
Reviewed-on: https://chromium-review.googlesource.com/c/1378888
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
2018-12-18 02:48:46 +00:00
Ian Elliott 18017ca4b7 Add opt-in/out unit testing for API version below minimum
Bug: angleproject:2794
Change-Id: I133ebd4afb7064e8ac461f4f7174ec59af5ea0d1
Reviewed-on: https://chromium-review.googlesource.com/c/1380716
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-12-17 23:35:06 +00:00
Ian Elliott 5a8d0bc288 Remove version-1 API of A4A opt-in/out (a.k.a. feature-support utilities)
Bug: angleproject:2794
Change-Id: I7f41452a37536a00d772ecd9b21125ff7459a3d6
Reviewed-on: https://chromium-review.googlesource.com/c/1357151
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-12-17 19:52:45 +00:00
Qin Jiajia 4622905b30 ES31: Add atomic memory functions for SSBO
Due to SSBO is translated to RWByteAddressBuffer in HLSL, the corresponding
atomic memory functions atomic* will be translated to
RWByteAddressBuffer.Interlocked*. The translation is like below:

atomicAdd(instanceName.data[0], 5u);
// becomes
uint _ssbo_atomicAdd_uint(RWByteAddressBuffer buffer, uint loc, uint value)
{
    uint original_value;
    buffer.InterlockedAdd(loc, value, original_value);
    return original_value;
}

_ssbo_atomicAdd_uint(_instanceName, 0 + 16 * 0, 5);

Bug: angleproject:1951

Change-Id: If2af8bedb67a4135b443d2512d43c6058a78888d
Reviewed-on: https://chromium-review.googlesource.com/c/1370676
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
2018-12-17 07:53:16 +00:00
Yuly Novikov 175d918a1f Revert "Load correct libGLESv2 on Linux and Mac."
This reverts commit dd815b623e.

Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006

Original change's description:
> Load correct libGLESv2 on Linux and Mac.
> 
> libEGL was implicitly loading libGLESv2 on startup. This is bad
> because on platforms like Linux and Mac we could sometimes use the
> incorrect rpath. This in turn meant we needed workarounds like using
> "_angle" extensions to our shared objects to get the correct loading
> behaviour.
> 
> Fix this by loading libGLESv2 dynamically in libEGL. We build the
> loader automatically from egl.xml. The loader itself is lazily
> initialized on every EGL entry point call. This is necessary because
> on Linux, etc, there is no equivalent to Windows' DLLMain.
> 
> We also use an EGL.h with different generation options so we have the
> proper function pointer types. A README is included for instructions
> on how to regenerate EGL.h.
> 
> The entry point generation script is refactored into a helper class
> that is used in the loader generator. Also adds the libGLESv2 versions
> of the EGL entry points in the DEF file on Windows. This allows them to
> be imported properly in 32-bit configurations.
> 
> Also fixes up some errors in ANGLE's entry point definitions. Also
> includes a clang-format disable rule for the Khronos headers.
> 
> This CL will help us to run ANGLE tests against native drivers.
> 
> Bug: angleproject:2871
> Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
> Reviewed-on: https://chromium-review.googlesource.com/c/1370725
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

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

Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2871
Reviewed-on: https://chromium-review.googlesource.com/c/1378887
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-16 19:53:36 +00:00
Jamie Madill dd815b623e Load correct libGLESv2 on Linux and Mac.
libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
Reviewed-on: https://chromium-review.googlesource.com/c/1370725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-16 14:04:28 +00:00
Geoff Lang 7139b43421 Print a warning on unexpected internal errors.
The error message can be dropped when converting angle::Result to egl::Error.
This makes sure something is always printed when we get an unexpected error.

BUG=914911

Change-Id: Icc8b06b1c13e3ea83287da5a217f4c8bc218deec
Reviewed-on: https://chromium-review.googlesource.com/c/1378689
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-12-15 16:39:47 +00:00
Tim Van Patten f307584255 Use intent-filter to enforce that only a single ANGLE APK is present
In order to support multiple ANGLE builds (Google-signed,
AOSP unsigned, OEM-signed), we will use intent-filter to
indicate that ANGLE is installed.   During CTS testing,
we will verify that only a single ANGLE is installed and
provides the necessary functionality.

Bug: angleproject:3011
Test: Verify CTS hostside tests pass.
Change-Id: I71dc3a32a4c2bd57b4bbff30bd640e7f7704ab32
Reviewed-on: https://chromium-review.googlesource.com/c/1377610
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
2018-12-15 03:16:01 +00:00
Yuly Novikov 9a51daf614 Fix angle_apk build
Bug: angleproject:2995
Change-Id: I277a36b58dc6e0a9268b43d89e1da46635b5e1d1
Reviewed-on: https://chromium-review.googlesource.com/c/1378691
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-14 23:24:34 +00:00
Geoff Lang a7af56be7a Vulkan: Print the device id in the renderer string.
Add a end2end test that prints all strings to help debug on the bots.

BUG=angleproject:3026

Change-Id: Ia524a0d7dac88e55e0aa67412339e646a5564e64
Reviewed-on: https://chromium-review.googlesource.com/c/1378686
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-12-14 21:58:27 +00:00
Geoff Lang e1f742af18 GL: Clean up workaround detection.
Use functions instead of macros for platform detection so compilation can be
checked from any platform.  Also makes the workaround detection more readable.

BUG=angleproject:3026

Change-Id: I4153f0a2a6a6d5860c7b37f7cc67561895165ed1
Reviewed-on: https://chromium-review.googlesource.com/c/1378685
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-14 21:44:49 +00:00
Jamie Madill 70fd9b5d38 Fix compile error in angle_white_box_perftests.
This seems to have slipped through our CQ coverage.

Bug: angleproject:3025
Change-Id: I2975eed3026feaa39b0cb3b897821e3bfc112f43
Reviewed-on: https://chromium-review.googlesource.com/c/1378385
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-14 15:50:28 +00:00
Jamie Madill dfaccbc08a Clean up Windows DEF file generation.
Ordinal numbers weren't necessary. It's a legacy function from Win16.
Also refactor the def file generator to be much simpler.

Will be helpful for adding the libGLESv2 EGL entry points to the DEF
files. This will enable loading the right GLES libs on Linux and Mac
once we break the link dependency of libEGL on libGLESv2.

Bug: angleproject:2871
Bug: angleproject:2621
Change-Id: Ia2585323b076446af55359d875a6b67bcdc4d6f9
Reviewed-on: https://chromium-review.googlesource.com/c/1372378
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-14 05:00:52 +00:00
Jamie Madill 828c59462f Split angle_perftests into white and black box.
The black box version tests traditional GL API features. The white box
version is designed to test internal classes and uses a static link
against libANGLE and libGLESv2. The black box version will also be
extendable to test native drivers directly instead of going through
ANGLE.

Bug: angleproject:2995
Change-Id: I0b672db37ed38f82157c7a1db70080ff539337ce
Reviewed-on: https://chromium-review.googlesource.com/c/1359515
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-14 04:36:27 +00:00
Qin Jiajia 4a9f9b08b6 ES31: support ssbo as the operand of unary operator
Bug: angleproject:1951

Change-Id: I71c2cf2ca35d7b1fe5d14358a0749f47e223816b
Reviewed-on: https://chromium-review.googlesource.com/c/1367405
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
2018-12-14 02:51:17 +00:00
Tobin Ehlis bec398774e tests:Fix memory leak in MipmapTest
Update createRGBInitData() to use/return std::vector instead of raw ptr
w/ "new." This prevents potential for memory leaks.

Bug: angleproject:2958
Change-Id: I4b1bb4ee293e171f56d1221a562e607ff8eb0fb3
Reviewed-on: https://chromium-review.googlesource.com/c/1375229
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
2018-12-13 21:48:25 +00:00
Geoff Lang 91002266bd Use angle::Result and pass a context pointer to TransformFeedbackImpl
BUG=angleproject:3020

Change-Id: Ib0877dd33f9a8c6ea57976642f1b904258cb6a86
Reviewed-on: https://chromium-review.googlesource.com/c/1374273
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-12-13 19:38:54 +00:00
Jamie Madill 9b02506c85 Cache valid draw modes with transform feedback.
Enabling transform feedback can affect which draw modes are valid. We
can use the exiting draw modes cache to save having to check the draw
modes twice. We update the cached draw modes on any change to the
transform feedback activity state. e.g. when transform feedback is
started, or resumed.

There are also spec changes that comes into effect in ES 3.2 or when
EXT_geometry_shader is enabled. Again we cache these draw modes in the
packed valid draw modes map.

Will allow for faster validation for draw calls once the other checks
for transform feedback are optimized. Also adds a new regression test.

Bug: angleproject:2966
Change-Id: Iab901e45aab70980b9e631ec8383fdeadbd32368
Reviewed-on: https://chromium-review.googlesource.com/c/1357149
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-12 22:11:31 +00:00
Shahbaz Youssefi b08457df23 Vulkan: Make flushAfterVertexConversion workaround Nexus5X-specific
Workaround added in 611bbaabb2 is likely
Nexus5X-specific.  This commit detects the phone and enables the
workaround only on that.

Bug: angleproject:2958, angleproject:3009
Change-Id: I9ab230d4aa690fd92e3d2d84ad98c159128c1093
Reviewed-on: https://chromium-review.googlesource.com/c/1372445
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-12 18:02:54 +00:00
Yuly Novikov 64f62f4a17 Skip external texture ImageTest tests on Ozone
Since Ozone supports external target only
for images created with EGL_EXT_image_dma_buf_import

Bug: 914146, angleproject:2507
Change-Id: I454b26bbb7aa8ed638045dc0c9c98065c9ed76e4
Reviewed-on: https://chromium-review.googlesource.com/c/1374269
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-12 17:15:01 +00:00
Qin Jiajia 88faa69674 ES31: Add unsized array length support in SSBO
Bug: angleproject:1951

Change-Id: I10c798c62a741b156f5b614e0df0795c0e845108
Reviewed-on: https://chromium-review.googlesource.com/c/1365154
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
2018-12-12 02:41:09 +00:00
Qin Jiajia a48f26fb7a ES31: Use deepCopy to make sure that every node being used only once
This patch uses deepCopy for nodes which are used more than once in the SSBO
traverser.

Bug: angleproject:1951
Change-Id: Ie8e03d4f595484a1e2ca0397ed30a7f484add607
Reviewed-on: https://chromium-review.googlesource.com/c/1370678
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
2018-12-12 01:43:06 +00:00
Jamie Madill 3a25622879 Update ANGLE_multiview validation.
Multiview transform feedback now passes if the transform feedback is
paused. Also updates the relevant validation. This aligns the
ANGLE_multiview validation with OVR_multivew and with the WebGL
extension spec.

This change allow us to combine multiple draw call validation updates
into one update function.

Bug: angleproject:3012
Change-Id: I2ce04edc386039134198afa1792201e03cc20490
Reviewed-on: https://chromium-review.googlesource.com/c/1357148
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-12 01:00:09 +00:00
Shahbaz Youssefi 611bbaabb2 Vulkan: Convert vertex attributes in compute
In this commit, VertexArrayVk::convertVertexBuffer() is renamed to
VertexArrayVk::convertVertexBufferCpu() to explicitly show it does a CPU
readback.  A new VertexArrayVk::convertVertexBuffer() function is added
that has the same functionality in gpu (with some assumptions, where the
CPU fallback is used should those assumptions fail).  Currently, the
only requirement is that buffer offset/stride are divided by the
component size.

ConvertVertex.comp is the shader responsible for this conversion, and it
implements the functionality in renderer/copyvertex.inc, minus a few
functions that are not used in the Vulkan backend.

Bug: angleproject:2958, angleproject:3009
Change-Id: I8ec9a5f4672509bcf7b9e352cd27663970ad4653
Reviewed-on: https://chromium-review.googlesource.com/c/1364451
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-11 21:20:33 +00:00
Geoff Lang be607ad636 GL: Implement GL_OES_EGL_image_external and GL_OES_EGL_image_external_essl3
Chrome uses external textures as part of its hardware video decode paths
on Android.

BUG=angleproject:2507

Change-Id: I2af608f84a99843c99a16dcfb9fb2fa28cc8fbb6
Reviewed-on: https://chromium-review.googlesource.com/c/1361480
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-12-11 17:22:31 +00:00