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>
This change just adds the feature. A follow up change will actually
start using the extension.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I19c078ebe57a7819b3aa3e95d4436cefa34ba85b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113912
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Clean up some retain* APIs. retainImge and retainReadOnlyResource and
retainResource are doing exact same thing, they are consolidated into
just retainResource. ContextVk::retainResource is removed since mUse
can now safely copied from DescriptorSetHelperPool object which tracks
mUse.
Bug: b/262047600
Change-Id: I56ea08696e870826bd94ccb79dd621f35923bc6a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114500
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Currently, dma_buf_util_sources is only accessible
from the vulkan backend. Fixed this because gl backend
also uses this.
Bug: angleproject:7829
Change-Id: I1bd71c191d1a8ae633083d1626d41c58fb6d269b
Signed-off-by: Sungyong Choi <sywow.choi@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113745
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
This is a reland of c7414946b8
The change here is that the program, shader and blob caches are now
reset _after_ the backend is torn down. Otherwise the pipeline cache
sync thread's use of the caches races with that.
Bug: b/246683126
Change-Id: Ifc3d67279de50a2ee2866476aa5df85d4c10d30d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111972
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
There are places that we call setQueueSerial after usesBuffer() check.
This was useful when we had the ResourceList where it is more expensive
to set serial. But now setQueueSerial is cheap (actually is cheaper than
usesBuffer check), so there is no need to do this check any more. This
CL removes the check to further reduce the CPU overhead. Because of
this, mUsedBufferCount will not be accurate, so this CL also removes the
tracking of mUsedBufferCount (was only for informational purpose
anyway).
This CL also removes commandBufferQueueSerial.valid() check in
Resource::usedByCommandBuffer() and turns it into assertion. Some places
in contextVk will ensure we only call it on started renderpass so that
other places that calls usedByCommandBuffer will not need to eat the if
check.
Bug: b/262047600
Change-Id: I6b8004b6aa5b567fa94c0eb56801054f818838b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4112145
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
We're changing eglReleaseTexImage so it calls
flushCommandBuffer(mtl::NoWait) instead of
flushCommandBuffer(mtl::WaitUntilScheduled)
and then adding an extension to allow us to
WaitUntilScheduled.
This is because Chrome calls eglReleaseTexImage for
every canvas and having it WaitUntilScheduled per call
is very slow. So instead we'll call eglWaitUntilWorkScheduledANGLE
once which will effectively wait just once.
Bug: angleproject:7890
Change-Id: I87bc9f9a1a7f4a0f99d93736cc3083799e76afeb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4109311
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
Breaks in android rolls where we have both
angle_expose_non_conformant_extensions_and_versions
and
angle_enable_vulkan
Bug: angleproject:7829
Change-Id: Iaa163b34e01a31a6872f1158064f685ca6fec958
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4111968
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
This reverts commit 214742be91.
Reason for revert: Regression https://bugs.chromium.org/p/chromium/issues/detail?id=1401503
Original change's description:
> D3D: Remove ResourceSerial
>
> The only difference between ResourceSerial and UniqueueSerial (formerly
> Serial) appears to be ResourceSerial is wrapper of object pointer. This
> CL removes ResourceSerial class and switched it to UniqueSerial class
> instead. (We may need to see why it needs to use pointer to initialize
> the serial, that sounds like the exact thing serial try to avoid.)
>
> Bug: b/262047600
> Change-Id: Ic8e1b26d7da9304ff02fd9a7e1b584bb70efcb77
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4102107
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/262047600
Change-Id: I757451a487839db17390dde18f1e2bc5eda36d37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114273
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
This reverts commit c303758fbc.
Reason for revert: This is causing the Android roller fail: https://crrev.com/c/4072215/comments/6918d7f6_8100d66b?tab=comments
Original change's description:
> Make ANGLE program version only dependent on data that matters
>
> This change introduces a new variable ANGLE_PROGRAM_VERSION
> to track the version of ANGLE source files that affect shader
> program serialization/deserialization. This change include more
> source files than necessary, to serve the purpose of a conservative
> jumping off point. We will narrow down the list of files for
> ANGLE_PROGRAM_VERSION hash generation in the future.
>
> Add a new script program_serialize_data_version.py that will
> be triggered during the build when the related source files changed.
> The script will generate a hash and the hash size from the related
> source files. In program serialization/deserialization and cache
> key generation, we will use this hash value instead of the entire
> ANGLE git hash. When the hash value changed, we know that the
> related source files changed, and we should invalidate the program
> cache and re-generate the blob cache / program binary.
>
> Bug: angleproject:4981
> Change-Id: I2fb609416738d459d3289190c232c2d797ba58e3
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4072215
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Bug: angleproject:4981
Change-Id: Ib235d85c79ed54110696ac5413571934890fdc98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114274
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
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>