Shadow buffers help reduce the latency of glMap* operations
at the cost of CPU overhead. It might not be desirable to
incur such an overhead for all usecases. Featurize it but
enable it by default.
Bug: angleproject:4339
Change-Id: I6374618bf99677eef55fd50a139fb86f5ea70791
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278102
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
After the initial suppression the bot started failing on the next test.
Use GTEST_SKIP in testSetUp to make all tests using the fixture skipped.
Bug: chromium:1097750
Change-Id: Ic993d7cd274e1328684571c5ba1a1520b9cb80d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270020
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch updates usages of the JsonCpp library, including the
following changes:
1. Removed unused version variable from the DEPS file.
2. Removed deprecated writer and reader usages, in favor of the new
builder pattern inside JsonCpp.
3. Modernized usage of the Json::Value types, including some rewrites to
avoid unnecessary heap allocations, and using the new foreach
iterators.
Bug: chromium:983223
Change-Id: If26abc8be677d905183a23498fbb81256854525c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265093
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
A Qualcomm driver bug causes certain
"dEQP-GLES3.functional.fragment_ops*" tests to fail. On Pixel 4 XL,
this only occurs when the device is rotated 90 or 270 degrees.
Bug: angleproject:4344
Bug: b/157933198
Change-Id: Iedb7e8c76fbe55795537cab3e821a410899fdea3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2277103
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
The use of worker thread is chromium is triggering CFI error.
This CL disables the use of chromium worker pool to avoid
blocking the roll-deps:
https://chromium.googlesource.com/angle/
angle.git/+log/1be395fe1250..a935c65a0488
The intend is to avoid the effects of the fix from that CL:
https://chromium-review.googlesource.com/c/angle/angle/+/2262573
Instead of reverting the CL (with is an obvious mistake) we disable
the feature.
Bug: chromium:1091259
Change-Id: I4e473ec42be2a82e47e2e4c882f75ba33bcd9476
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275730
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Although the EXT_float_blend extension is defined only for ES 3.0+,
ANGLE exposes it on ES 2.0 client contexts.
Bug: angleproject:4595
Change-Id: I7451062ed8b1ab4eb18a8c7c1d37ee7383c8ea4b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2172738
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
The rotation calculations are a little different for this code (that
uses a special shader) than for other pre-rotation cases. I also
modified the CopyTexImageTestES3.2DArraySubImage test to make future
bugs a little easier to diagnose.
Test: Test: angle_end2end_tests --gtest_filter=*CopyTexImageTestES3.2DArraySubImage*Vulkan*
Test: Test: angle_end2end_tests --gtest_filter=*WebGLReadOutsideFramebufferTest.CopyTexSubImage2D*Vulkan*
Bug: b/158245571
Change-Id: I497ec541cae5cd4085c3e9d596ee20943f5510f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275733
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
Since the original SPIR-V is never store after being modified, we don't
need to keep the transformed SPIR-V either.
Bug: angleproject:4513
Test: CQ
Change-Id: I4b70cfa355a08107e6a27377f6258cbf9e4072be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270718
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This file is needed by the bots to run as an isolated script.
Bug: angleproject:3162
Change-Id: I1bb87b3622613334b379896a3c124a6007676346
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275729
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Some apps actually do this. One of them is gfxbench. This helps
performance by dropping the redundant clear calls.
Bug: b/159489614
Change-Id: Ib7958042f081b8fd58c5bc912fbb45bb223aec0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2255643
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Std140 storage layout has some rules for uniform block, must
pad StructuredBuffer element type explicitly to match std140
layout rules when translating std140 uniform block to
StructuredBuffer. In this CL, restrict member types which are
not needed to add paddings according std140 layout rules.
Bug: angleproject:4783
Change-Id: I50130da64ad6865083849bf55b76525f3d2835a8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2259226
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Prior to this change, the SPIR-V would be transformed as part of
GlslangGetShaderSpirvCode() and then possibly another time afterward to
disable the early fragment test optmization (for monolithic programs) or
to update the descriptor set/binding values (for PPOs). By storing the
original SPIR-V in the ProgramVk and the transformed SPIR-V in the
ProgramExecutableVk, we can now remove the SPIR-V transformation from
GlslangGetShaderSpirvCode() and only perform it once in
ProgramInfo::initProgram() for monolithic programs and PPOs.
Bug: angleproject:4513
Test: CQ
Change-Id: I4e7240b2abe7c796c46cf531948dad0e37c1419a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267537
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The original SPIR-V is specific to a ProgramVk while the transformed
SPIR-V is specific to a ProgramExecutableVk. This CL keeps the original
SPIR-V in the ProgramVk::mOriginalShaderInfo and the transformed SPIR-V
in ProgramExecutableVk::mTransformedShaderInfo. This allows us to skip
an extra copy that was occurring during PPO link().
Bug: angleproject:4513
Test: CQ
Change-Id: I796dcd6bcfb2df08d9b8f1a5295b2821a4096f16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265484
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This workaround should only be enabled when ANGLE is built with TSAN
on.
Bug: chromium:1094869
Change-Id: If527457c11ce744b543ac69761cc64235d2f1dd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267420
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
frame_capture_utils.h is only used in tests so changing the name to be
frame_capture_test_utils.h is more appropriate. Also
frame_capture_utils.h will now be a file in libANGLE_with_capture
library where serialization code is stored.
Bug: angleproject:4806
Change-Id: I7482693a75b2d0edda7e84ae9b777fd3f46f1855
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2273917
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
When transferring vkImages between queues, the new layout
needs to be set based on the usage flags of the vkImage
instead of hardcoding it to AllGraphicsShadersReadWrite
Bug: angleproject:4791
Change-Id: I3b543a6280e6c2317cc11bf65dc4c337bc5f90b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2271563
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This will set the color buffer load_op to DONT_CARE if the application
has invalidated the color buffers prior to drawing.
Will also set load_op to DONT_CARE for depth & stencil, though this
isn't likely a common use case.
Tests:
angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_* --use-angle=vulkan
angle_end2end_tests --use-angle=vulkan --gtest_filter=StateChangeRenderTestES3.InvalidateNonCurrentFramebuffer/ES3_Vulkan
Bug: b/150458520
Bug: angleproject:4444
Change-Id: I6ce3d20fc1e9f4ab7ba3af9755c5ddc544f58ddd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267057
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Especially with emulated formats and robust resource init, a clear is
staged that's often superseded by a data upload to the same subresource.
This change ensures that superseded updates are dropped to avoid
unnecessary GPU work.
Bug: angleproject:4691
Change-Id: I697ccd438b92fd2fff17a5800550694658c95c54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2262574
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This error was introduced while fixing nits in the
previous CL.
The Delegate Pool was not created at all and always
fallback to the Async thread pool instead.
Bug: chromium:1091259
Change-Id: I5036836b5d792372636f21e936a03906eb587f67
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2262573
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
(uintN_t)1 << M has undefined behavior when M >= N. For example, the
following:
shift = 64;
value = 1 << shift;
Gives a value of 1 (instead of the arithmetically expected 0) on (some?)
Intel CPUs.
Bug: None
Change-Id: I5fbb01eff812a62eb778474cec25a25b80052bac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2269857
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Textures specified through external images need to
transition to a ReadWrite layout and not ReadOnly.
Bug: angleproject:4791
Change-Id: I8c0d5999d65499de6a36725ed1cc9c390c479c8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270513
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reformat Framebuffer::readPixels and its overriding methods
to the following method signature
angle::Result readPixels(const Context *context,
const Rectangle &area,
GLenum format,
GLenum type,
const PixelPackState &pack,
Buffer *packBuffer
void *pixels);
This will allow capture replay tool to use its own PixelPackState
to read pixels from framebuffer without having to set the global states
Bug: angleproject:4787
Change-Id: Idc64179d8e8f6b5163ef0747f239cd5172a2491b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267417
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This involves cases of copying from a rotated default framebuffer.
Various adjustments are needed for where the source is and its
relationship to gl_FragCoord in the custom ImageCopy fragment
shaders. Various tests are affected, including the following:
Test: angle_deqp_gles2_tests --gtest_filter=dEQP.GLES2/functional_texture_specification_basic_copy*teximage2d_*
Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_texture_specification_basic_copy*teximage2d_*
Bug: b/158245571
Bug: b/157933235
Change-Id: Id9ec56d849cd2268954dd82623a7632a10fb8e8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248204
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
When generating mipmaps, the non-base levels are redefined to be
compatible. mRedefinedLevels was not updated to take this into account,
resulting in invalid copies to the image.
Additionally, noted a few spots where ImageDesc is used to respecify the
image, but those are not up-to-date when the backend functions are
called. Changed those to directly get the necessary information from
the allocated image.
Bug: chromium:1094644
Bug: chromium:1094599
Change-Id: I2afc9e5a53f24ef56836c5d7eec2e3e11df0ef61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267423
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
If the image is recreated for mipmap generation, and if the format used
is emulated, clears are automatically staged for all levels of the
image. Since non-base levels will be completely rendered to (using
blit, so not through the staging buffer), there is no point in
performing these clears for non-base levels. This change drops those
clears.
Note that another change will drop the clear for base level if detecting
that a future update will supersede it, for example because the base
level is being copied from the old image.
Bug: angleproject:4551
Change-Id: If2f10cf67e24b44243b29d22bfcf1cb933895cd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2262575
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
On Linux this test is supported with GLX but not EGL, so Ozone (which
uses EGL) fails. Update the test suppression to avoid Linux Ozone.
TBR=geofflang@chromium.org
Bug: angleproject:4725
Change-Id: I9e85b51a01ab5b25c6cbbdbcdbbfb4b21b7a6152
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270021
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Newly added spirv-val validation is triggered by these test cases.
Suppress failing tests to let the roll go through and investigate later.
TBR=jmadill@chromium.org
Bug: angleproject:4790
Change-Id: I3cbb2fb13889e83caea9ff69272b615cec47041f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270019
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>