Switch from GTests's ASSERT_NE(),
which allowed to continue execution and hid the error from Swarming,
to ANGLE's ASSERT(), which makes bots to report this error.
Bug: angleproject:7885
Change-Id: I7937a9419f3fbfd9f6ab2d696e40771bde763a1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4126355
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This allows an application to have depth in read-only feedback loop
while stencil is being written to for example.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: Ic2e11d32da7c7e3a7f3cd86dbafc5c56a0dbbfd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116730
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Added an extension spec.
Trivially exposed it on GL, Vulkan, and D3D11.
Adjusted tests and validation to allow no cull
distance support for this extension string.
Removed extra built-in variable definitions.
Bug: angleproject:7904
Change-Id: Ic60772dfe28132c316eaa29aadc1afd66e3b0fa7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114290
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
ContextVk::onSyncObjectInit() will request end of current renderPass but
deferred (in this case, mRenderPassCommandBuffer is nullptr but
mRenderPassCommands->started() still returns true). The next draw call
will actually end current renderPass and starts a new renderPass. But if
next call is glCopyBufferSubData, it will not actually trigger
endRenderPass. This CL modifies
OutsideRenderPassCommandBufferHelper::bufferRead logic to accommodate
this deferred endRenderPass scenario by checking
mRenderPassCommands->started() instead of hasStartedRenderPass so that
the answer to "if this buffer been used by current renderPass or not"
will return correct result.
Bug: angleproject:7903
Change-Id: Ie5c9977ccf083e7d355a2cd8fd08e9077049ee9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4119692
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
There was intermittent failure on bots due to this. Re-disable it for
now.
Bug: b/246683126
Change-Id: Iba5c0bcacb87336d187b952b47804885ce569f6d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4120245
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
This is a refactor change in preparation for adding support for
glShaderBinary.
Move BinaryStream to common so that it is accessible by both libANGLE
and the Compiler.
Extract members that hold the result of compilation from ShaderState
and move into new CompiledShaderState struct.
Move helper functions & classes relevant to ShaderVar serialization to
the CompiledShaderState header.
Tests: EGLBlobCacheTest*
Bug: angleproject:7833
Change-Id: I7ec575247eccb3afbc6ab6bfa24d36e69d4576f5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4080998
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
This CL only adds the layouts in the list, but does not use them. The
layouts are renamed for consistency in this change.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I47986c7252d32626e9f26c6670c0a4e3496fe0c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116736
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
In preparation for a change that optionally uses read/write
depth/stencil layouts. Context is used to test for the
supportsMixedReadWriteDepthStencilLayouts feature to know whether those
layouts are supported or that a fallback must be chosen.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
With recent work of per active context queue serial, mGarbageQueue
behaves almost identical to normal mSharedGarbage now. This CL removed
mGarbageQueue and added garbage into Remove mSharedGarbage instead.
Bug: b/263166501
Change-Id: I6bce47b4535283e7bd0f0c8823b9629cc25f9d94
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4117712
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
This reverts commit 9364246f08.
Reason for revert: iOS build fails
Original change's description:
> Metal: expose Metal backend only on supported GPUs.
>
> Query all the GPUs on the system during ANGLE's initialization, and do
> not expose the EGL_ANGLE_platform_angle_metal client extension unless
> all of them support the required GPU families or feature sets.
>
> Tested locally on a 2015 MacBook Pro with dual Intel Iris Pro and AMD
> Radeon R9 M370X GPUs. The AMD GPU supports Metal GPU family macOS 2,
> but the Intel GPU, only family macOS 1. With this change, Chrome
> properly falls back to using ANGLE's OpenGL backend when
> --use-angle=metal is specified, and renders correctly.
>
> Bug: chromium:1365598
> Change-Id: I2c3533afe733e0d06d7755cae272bbd12aa9e676
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4117716
> Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
> Reviewed-by: Gregg Tavares <gman@chromium.org>
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Bug: chromium:1365598
Change-Id: Iedbe8978f2a2d39a33359fa236a1d305c284266e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114291
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
This is to resolve the presubmit failure in
latest vulkan-deps roller: https://crrev.com/c/4115658.
The latest vulkan-deps change
https://github.com/KhronosGroup/Vulkan-Headers/commit/
00671c64ba5c488ade22ad572a0ef81d5e64c803
has moved the header inclusion of below files to
vulkan_core.h:
vk_video/vulkan_video_codec_h264std.h
vk_video/vulkan_video_codec_h264std_decode.h
vk_video/vulkan_video_codec_h265std.h
vk_video/vulkan_video_codec_h265std_decode.h
But did not add them to the BUILD.gn file.
The presubmit script export_targets.py is complaining
about "Included file must be listed in the GN target or its public
dependency."
Add the above files to the IGNORED_INCLUDES list.
Bug: b/263310519
Change-Id: I65cdb6f69fc95809232b9fd3b3ad77b716ad3329
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4119671
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
This reverts commit 402e7f7a63.
Reason for revert: Chromium android-binary-size build failed.
Original change's description:
> Vulkan: Make available GLInternalFormatToGbmFourCCFormat
>
> GLInternalFormatToGbmFourCCFormat() is not available on Linux
> because of the guard with the wrong definition, ANGLE_USES_GBM.
> This also fixes build errors that were occurred after enabling.
>
> Bug: angleproject:7829
> Change-Id: If7c7543270cc127945149927be0fc3ffdd49163b
> Signed-off-by: Sungyong Choi <sywow.choi@samsung.com>
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4022963
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Jeff Vigil <j.vigil@samsung.com>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:7901
Bug: angleproject:7829
Change-Id: I256d51f78ff0d3ced9920c3ea1d2bfceba43a1ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113577
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Query all the GPUs on the system during ANGLE's initialization, and do
not expose the EGL_ANGLE_platform_angle_metal client extension unless
all of them support the required GPU families or feature sets.
Tested locally on a 2015 MacBook Pro with dual Intel Iris Pro and AMD
Radeon R9 M370X GPUs. The AMD GPU supports Metal GPU family macOS 2,
but the Intel GPU, only family macOS 1. With this change, Chrome
properly falls back to using ANGLE's OpenGL backend when
--use-angle=metal is specified, and renders correctly.
Bug: chromium:1365598
Change-Id: I2c3533afe733e0d06d7755cae272bbd12aa9e676
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4117716
Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Removed limitSimultaneousClipAndCullDistanceUsage cap.
Enhanced HLSL translator to support all valid combinations
of clip and cull distances.
Validate that these arrays are sized explicitly or by using
only constant indices; adjusted link program error message.
Enhanced tests to cover all possible combinations of
implicit and explicit array sizes for both built-ins.
Bug: angleproject:4452
Change-Id: I704db6dc3c8951e5ba482a3e4dad09e5b0182f9c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111645
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Pass the current set of enabled clip distances
to vertex shaders via an internal uniform and
dynamically set disabled elements to zero.
Bug: angleproject:7880
Change-Id: I709d31dc7ca0606decf49adf674460a941837683
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4094314
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Previously, ANGLE created core Vulkan 1.0 render passes by default and
converted them to render pass 2 objects if necessary. However:
- More and more extensions used by ANGLE require this functionality,
- Upcoming use of VK_KHR_separate_depth_stencil_layouts makes this path
almost always taken.
It's time for ANGLE to default to render pass 2 objects instead,
especially as support for it is becoming practically ubiquitous.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I6970a017040a2fdc001d4f2e53c1a0d5968a37cb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116675
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
* This is to prevent TSAN failures due to data race in
setPendingMemoryAlloc().
Bug: b/262029018
Change-Id: I5f2f13ecbe762102692bb910a5baa5b25fa42abe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4115479
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Use vec3 instead of vec4. Either 2 or 3 components are used based on 2D
or cube map textures. On hardware that can pack the varyings, this can
reduce pressure on varyings.
Additionally, this is a minor optimization to texture coord calculation
(when !draw_texture) as one row of the 4x4 matrix multiplication doesn't
need calculation.
Bug: angleproject:6644
Change-Id: I2abac511a0ced575c089dfb3a3b506f51a111a54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116676
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Typically, not all texture units are used. This change ensures no
vertex input / varying is consumed when fewer than maximum textures are
used.
Bug: angleproject:6644
Change-Id: Iea0e35dc12ec4fcb342818786f307286bf7fc5bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4081116
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
* Added logging memory allocation information in handleError() in the
event of an error from ANGLE_VK_TRY.
* Used for the handleError() in ContextVk.
* Updated the name and message of the function to log allocations.
* checkForCurrentMemoryAllocations()
* Added logging memory heap stats, including budget and usage.
* logMemoryHeapStats()
* In the renderer, added the feature flag indicating whether the
platform supports the memory budget extension.
* Uses VK_EXT_memory_budget.
* Added the enum class MemoryLogSeverity, which is used to select
the severity level of the memory log.
* Added logging pending memory allocation information.
* logPendingMemoryAllocation()
* If the last unsuccessful memory allocation was unsuccessful, its
information will be added to the log.
Bug: b/262029018
Change-Id: I97343c1553936aed23d763f3e0c00d495f9ee810
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4089531
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reset ContextVk::mCurrentIndexBufferOffset to 0 after a call to
ContextVk::convertIndexBufferCPU(...) irrespective of whether
the buffer binding is dirty.
Bug: angleproject:7896
Test: DrawElementsTest.DrawElementsWithDifferentIndexBufferOffsets*
Change-Id: I70a63b7e432aaa9f8c647e56bd162312143abd65
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113446
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>