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

9437 Коммитов

Автор SHA1 Сообщение Дата
Jamie Madill 4e712be2e1 Refactor BlockLayoutEncoder APIs for std430.
This splits HLSL SSBO access into two steps.

First we compute a mapping from the collected SSBO variable names to
TField pointers. Then during tree traversal we use a block encoding
visitor class that uses the shader names to store BlockMemberInfo
structures for the structures and variables. Each nested structure
is traversed separately so that the BlockMemberInfo offsets are
relative to the structure start rather than the enclosing block. The
array stride for a structure is the size of the struct after all the
alignment is included.

This gives the correct results for the SSBO access chain in the HLSL
code. It also will allow us to use the same encoding and visiting logic
for SSBOs on the API side.

Bug: angleproject:3024
Change-Id: I42b1db0e7547782ae77fe5f64a797f803f203f45
Reviewed-on: https://chromium-review.googlesource.com/c/1352731
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 19:51:15 +00:00
Shahbaz Youssefi f83a28a688 Vulkan: Shader path for framebuffer-to-texture copy
Part 1 in a series of changes to perform image copies on the GPU.

Bug: angleproject:2958
Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118
Reviewed-on: https://chromium-review.googlesource.com/c/1370724
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-03 19:32:05 +00:00
Shahbaz Youssefi d7969cdd40 Vulkan: optimize image layout transitions
Removes dstAccessMask being redundantly set where
`GetBasicLayoutAccessFlags()` sets the same bits.  Additionally, removes
setting HOST_WRITE_BIT and TRANSFER_WRITE_BIT as src access mask if new
layout is SHADER_READ_ONLY_OPTIMAL.  The correct src access mask will be
set based on the previous layout.

Additionally, specializes `GetBasicLayoutAccessFlags()` in
`GetSrcLayoutAccessFlags()` and `GetDstLayoutAccessFlags()` where the
access mask is set correctly (and optimally) based on whether the layout
is the old or the new one.  This removes a few unnecessary access masks
from src (for WAR hazards), and adds a few missing access masks to dst
(for RAW hazards), such as VK_ACCESS_COLOR_ATTACHMENT_READ_BIT necessary
for blending.

Bug: angleproject:2958
Change-Id: I5870bc99c755f0444332418f998032850825aca5
Reviewed-on: https://chromium-review.googlesource.com/c/1392397
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-01-03 19:28:55 +00:00
Jamie Madill ad398ee839 Free OSWindow and EGLWindow through helpers.
This cleans up any potential problems with allocating and freeing
resources in different shared objects or DLLs. Previously we were
using a dynamically linked allocation function and then calling
the standard delete function.

Also adds a base class helper for EGLWindow. Will base the WGL
Window class on this.

Needed for running ANGLE tests against native drivers.

Bug: angleproject:2995
Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0
Reviewed-on: https://chromium-review.googlesource.com/c/1393443
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 18:42:50 +00:00
Jamie Madill 9fa54eab25 Optimize and inline more validation.
Previously on each draw call we were checking both the instanced and
non-instanced attributes for overflow. On on-instanced draw calls we
don't need to do any special checks for instanced attributes. Also
we can inline more into the headers. This improves draw call
performance slightly.

Bug: angleproject:2966
Change-Id: Idf5861d2d9daf9fffd5c84f6a1ea5b23ac8ab713
Reviewed-on: https://chromium-review.googlesource.com/c/1390357
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
2019-01-03 16:47:58 +00:00
Jamie Madill 4627b3705d Add gl null driver tests to DrawElements.
Requires a couple tweaks to the back-end to be compatible with the
null driver.

Bug: angleproject:2966
Change-Id: Ia83651aabb0dd14b7d6f64152c276463a8fb28fc
Reviewed-on: https://chromium-review.googlesource.com/c/1392392
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-03 03:45:18 +00:00
Jamie Madill 904bb91857 Rename constants in blocklayout.h.
This adds the "k" prefix.

Bug: angleproject:3024
Change-Id: I3771a8a9d90cd5edc7173f2b3817a5f1f053bdd4
Reviewed-on: https://chromium-review.googlesource.com/c/1392399
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-02 22:23:19 +00:00
Bryan Bernhart 48bbc53ea4 ES31: Fix for reading back initialized SSBO buffers in D3D11
If a SSBO is initialized with data, a staging buffer was created. When the
data was read back, it was read from the staging buffer instead of the GPU.
This patch fixes that by making the UAV buffer the latest buffer.

Bug: angleproject:2990
Test: angle_end2end_tests
Change-Id: I43c8c85144c74cc9b317577b7c834e3f7e347f72
Reviewed-on: https://chromium-review.googlesource.com/c/1359712
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-02 20:56:16 +00:00
Shahbaz Youssefi 441649f749 Suppress flaky Linux/Intel/OpenGL test.
SimpleStateChangeTestES31.DispatchImageTextureAThenTextureBThenTextureA/ES3_1_OPENGL

Bug: angleproject:3044
Change-Id: I21a4e4dadcb1dea23d3a7b2e9089e395e33dc1cd
Reviewed-on: https://chromium-review.googlesource.com/c/1392398
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-01-02 20:29:39 +00:00
Jamie Madill bbdeee914a Suppress FL 9_3 failing test.
RobustBufferAccessBehaviorTest.RobustBufferAccessBehaviorTest

Bug: angleproject:3042
Change-Id: I40186eeeb69ee2939844117b661209a433773db9
Reviewed-on: https://chromium-review.googlesource.com/c/1392396
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-02 15:30:03 +00:00
Jamie Madill 04ea03e4e1 Make default block member info a constant.
Instead of generating a struct each time we can use a constexpr
constructor to use a single representation.

Bug: angleproject:3024
Change-Id: I14dec65a4f6ac9ab2f7e7af444862e4ceab88d8c
Reviewed-on: https://chromium-review.googlesource.com/c/1392395
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-02 06:42:25 +00:00
Qin Jiajia 76f66954db ES31: Fix the bug that SSBO is active but not statically used
If a SSBO is active but not statically used, there will be no UAV slot is
bound. So we should skip this kind of block.

Bug: angleproject:1951
Change-Id: I4d813ddefcce6c31fa02701f26148eb21c00f380
Reviewed-on: https://chromium-review.googlesource.com/c/1381847
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
2019-01-02 06:07:44 +00:00
Jamie Madill 0c6672158c Pass ErrorSet to ContextImpl constructor.
This removes the need for the setErrorSet method.
Also update some egl::Error TODO bugs.

Bug: angleproject:2491
Change-Id: I0aba07c4a53b579835a88c3dacae294f752e6b17
Reviewed-on: https://chromium-review.googlesource.com/c/1392393
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-01 21:23:18 +00:00
Jamie Madill ba319ba31c Re-land "Load entry points dynamically in tests and samples."
Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.

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: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-01 18:56:45 +00:00
Jamie Madill c3dc5d4857 Merge gl::Context and gl::ContextState.
This reduces the number of indrections when accessing the Extensions
or Caps structures. It will provide a small speed-up to some methods.
It also cleans up the code.

Bug: angleproject:2966
Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685
Reviewed-on: https://chromium-review.googlesource.com/c/1392391
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
2019-01-01 17:11:01 +00:00
Markus Tavenrath 957eb07f59 Remove redundant masking of the bits in angle::BitSet when using ternary operators.
Bug: angleproject:3040
Change-Id: I59e69ddb27ec9c5723aff04858ac5c052e2775da
Reviewed-on: https://chromium-review.googlesource.com/c/1392806
Commit-Queue: Markus Tavenrath <matavenrath@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-01 11:21:05 +00:00
Markus Tavenrath cc37cbf201 Apply several small micro-optimizations to ValidateDrawElementsCommon
* Remove indirection when getting CotextState from Context
* Reduce number of branches from 2 to 1 when checking for an InvalidEnum in FromGLEnum<DrawElementsType>
* Provide IndexRange constructor which doesn't initialize the member variables
* Reduce number of branches to 1 when checking for BasicDrawStateErrors for the fast path
* Remove a few branches and reduce math cost during the buffer range check in ValidateDrawElementsCommon

Bug: angleproject:2966

Change-Id: Ibdbed8a59ad9d7abce76622e9f507498e67ab997
Reviewed-on: https://chromium-review.googlesource.com/c/1392805
Commit-Queue: Markus Tavenrath <matavenrath@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-01 01:54:58 +00:00
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