|
03ccd9cc
|
2022-05-13T16:12:11
|
|
Revert "Vulkan: Flush texture updates more often"
This reverts commit 8bb7c35c2159de2fa9e9a008679c692edd4402a6.
Reason for revert: crashes tests in linux-rel
Example: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1012030/overview
Also possible flakiness https://anglebug.com/7308
Repro:
out/Debug/bin/run_blink_web_tests fast/canvas/OffscreenCanvas-2d-drawImage.html
Original change's description:
> Vulkan: Flush texture updates more often
>
> * Added a pointer to the previous texture in ShareGroupVk so we can
> flush the texture updates once we switch to a new texture.
>
> * We check if mip levels 0 and 1 are conformant in terms of
> size, format and number of samples.
>
> * As a part of size check, we also check depths if the texture
> target is either 3D, 2D array, or cube map array. For the former
> two, they have to conform to mip scaling similar to width and
> height. For the latter, the depth represents layer-faces and does
> not change for mipmaps.
>
> * Added a test to ensure the pointer to the previous texture is
> deleted when the corresponding texture is deleted, so the old value
> is not accessed by a future mutable texture.
>
> * Added tests to make sure the mutable texture is uploaded with
> the appropriate mip level attributes, and not uploaded in cases of
> size/format inconsistencies, incompleteness, and no base level.
>
> Bug: b/202744914
> Change-Id: I9c2c1af87a8a49e75d3ad25523436b0cd51a7e81
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606329
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Bug: b/202744914
Change-Id: Id51fd4c76d058aa5100ec58ba618098c8f614253
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645493
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Lingfeng Yang <lfy@google.com>
|
|
d8d396db
|
2022-04-07T09:57:25
|
|
Vulkan: Add shared descriptor set caches.
This allows programs with the same sets of descriptors to
share descriptor sets. Currently there is no cache eviction.
This CL adds a new "Meta" class to manage the descriptor set
caches. Each shared descriptor pool is unique to a descriptor
set layout. The descriptor set cache is moved into the pool
class. Now every instance of a descriptor pool in ANGLE has
easy access to a descriptor set cache as well.
Bug: angleproject:6776
Change-Id: I06982e0349f5a87e4578e769fa356ce8e7ab49f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424660
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8bb7c35c
|
2022-03-23T19:14:54
|
|
Vulkan: Flush texture updates more often
* Added a pointer to the previous texture in ShareGroupVk so we can
flush the texture updates once we switch to a new texture.
* We check if mip levels 0 and 1 are conformant in terms of
size, format and number of samples.
* As a part of size check, we also check depths if the texture
target is either 3D, 2D array, or cube map array. For the former
two, they have to conform to mip scaling similar to width and
height. For the latter, the depth represents layer-faces and does
not change for mipmaps.
* Added a test to ensure the pointer to the previous texture is
deleted when the corresponding texture is deleted, so the old value
is not accessed by a future mutable texture.
* Added tests to make sure the mutable texture is uploaded with
the appropriate mip level attributes, and not uploaded in cases of
size/format inconsistencies, incompleteness, and no base level.
Bug: b/202744914
Change-Id: I9c2c1af87a8a49e75d3ad25523436b0cd51a7e81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3606329
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
51dc3c3e
|
2022-05-02T18:11:26
|
|
Vulkan: Force prune when there are lots of suballocations destroyed
If there are a lot of suballocations destroyed, there is bigger chance
that some buffers become empty and we might able to trim down excessive
empty buffers. This CL tracks the suballocations destroyed at each
cleanupGarbage call and use that information to force immediate
pruneEmptyBuffers call.
Bug: b/230538246
Change-Id: Icca2ea731639545c635c09d58a8606d67405e1a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3620981
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2fae9482
|
2022-05-02T11:05:36
|
|
Vulkan: Use heuristic to decide how many empty buffers to keep
Instead of rely on static information (16 max empty buffers and not been
used for a given period of time), this CL keeps track of how many new
buffers are needed (either reused from empty buffer list or allocated
new) since last prune. We use this heuristic information to decide how
many empty buffers to keep around and trim the excessive empty buffers.
Combined with the next few CLs, on pixel6 I am seeing 11.7M reduction
with vsync_angry_birds_2_1500. The memory_max minus memory_median
reduced from 49M to 38M.
Bug: b/230538246
Change-Id: I51da745afe4bfdbff0ba165418531803bdce681b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3622264
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
802504ad
|
2022-04-29T20:22:53
|
|
Vulkan: Add log for buffer pool stats
For debugging purpose, this will calculate stats of buffer pool and
output string to log. Set ANGLE_ENABLE_BUFFER_POOL_STATS_LOGGING to 1
will log stats into INFO() stream.
Bug: b/230538246
Change-Id: I68f83af547e782ca7cb6cb222967ba02b8005083
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3617229
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5014ce66
|
2022-04-18T18:05:20
|
|
Vulkan: Add orphaned list for non-empty BufferBlocks.
In the fix for chromium:1299211, we added a new pool in the RendererVk
and pick which pool to use at the getDefaultBufferPool() call. This CL
fixes the original problem differently. In this CL we still uses the
ShareGroup's pool. When display global texture is enabled, we orphan the
non-empty buffer blocks into renderer and check and destroyed from
garbage collection code. This way we still only deal with one buffer
pool and all logic is mostly in context destroy code path, which I
believe is a better solution.
Bug: b/223428306
Change-Id: Ib465a11f7e3656df09cc891416ff57f086a8184b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573390
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
cfc92ebf
|
2022-04-18T18:16:24
|
|
Vulkan: Encapsulate ShareGroup::mContexts
Instead of return mContexts, this add addContext/removeContext API and
changed getContexts to const function. No functional change expected,
but clean up only.
Bug: b/223428306
Change-Id: I020c4bc781f58352089980c9d8ff22bcb183dbe6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3590970
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3587e217
|
2022-04-13T16:52:38
|
|
Remove copyResourceUseList from ShareGroupVk
* Removed copyResourceUseList() and the copy() functions in them,
as they are no longer used in submitting commands.
Bug: angleproject:7103
Change-Id: Ic62b21817aa2843f90695a8f50b79d254ec89929
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3587531
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
cdd97fb8
|
2022-03-24T17:41:30
|
|
Reland "Vulkan: Fix invalid access with display texture share group."
This is a reland of 1099b5ef2279cfe1988a39c8e011aada59c650f1.
Original change's description:
> Vulkan: Fix invalid access with display texture share group.
> Create bufferpool that owns by RendererVk.
> If we are using EGL_ANGLE_display_texture_share_group
> extension, use the bufferpool owned RendererVk,
> otherwise, use the bufferpool owned by EGL::ShareGroup.
> The bufferpool lifetime will remain consistent with
> texture lifetime.
> Bug: chromium:1299211
> Change-Id: Ie4e87cea1dfd20dabab24e2afed6ddd92e469888
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531155
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bug: chromium:1299211
Change-Id: I4b8f5bcb30297f2c5f24e02404fd96011f9d843b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3550038
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
73ec28af
|
2022-03-23T21:13:45
|
|
Revert "Vulkan: Fix invalid access with display texture share group."
This reverts commit 1099b5ef2279cfe1988a39c8e011aada59c650f1.
Reason for revert: suspect culprit of 1309304
Original change's description:
> Vulkan: Fix invalid access with display texture share group.
>
> Create bufferpool that owns by RendererVk.
> If we are using EGL_ANGLE_display_texture_share_group
> extension, use the bufferpool owned RendererVk,
> otherwise, use the bufferpool owned by EGL::ShareGroup.
> The bufferpool lifetime will remain consistent with
> texture lifetime.
>
> Bug: chromium:1299211
> Change-Id: Ie4e87cea1dfd20dabab24e2afed6ddd92e469888
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531155
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bug: chromium:1299211, 1309304
Change-Id: Ibdc119ef6bb52352858114d72a0f1c0edcd4da5e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3546288
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
1099b5ef
|
2022-03-17T17:20:44
|
|
Vulkan: Fix invalid access with display texture share group.
Create bufferpool that owns by RendererVk.
If we are using EGL_ANGLE_display_texture_share_group
extension, use the bufferpool owned RendererVk,
otherwise, use the bufferpool owned by EGL::ShareGroup.
The bufferpool lifetime will remain consistent with
texture lifetime.
Bug: chromium:1299211
Change-Id: Ie4e87cea1dfd20dabab24e2afed6ddd92e469888
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3531155
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
730c1271
|
2022-01-07T13:41:08
|
|
Vulkan: Submit queue more often for texture data
Outside command buffers should be flushed more often in order
to prevent the texture data accumulation just before the first
render pass when they are referenced.
* Added a tracker next to copyBufferToImage() for texture size
(in ContextVk). When its value passes kMaxBufferToImageCopySize,
the outside command buffer operations should be submitted and
the tracker would be reset. Currently, the threshold value is
set to 1 << 28 = 256M.
* Added a variation of submitFrame() to be used in outside
command buffer submission. The main difference is that it
copies mResourceUseList into GetShareGroupVk() rather than
move it.
* Refactored the two functions into submitFrameImpl().
* Added a helper function to submit the outside command
buffer.
* Added explicit copy functions for ResourceUseList and
SharedResourceUse. The counter in the copied object is
incremented by 1.
* Added a test to make sure submitting the outside command
buffer does not break the render pass.
Bug: angleproject:6354
Change-Id: Ia1d4f857fcbd06934609c94622ccbf675b3b1c72
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3379231
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
b72718d2
|
2022-02-22T16:18:45
|
|
Vulkan: Fix the data race for mUse from two threads
A data race of mUse object between two threads can occur with the
following sequences:
1) You use the buffer in the context, it adds into mResourceUseList
2) You release the buffer. Now it goes into mGarbageList, even though it
is still in the mResourceUseList.
Now this mUse object has references from two lists, the mGarbageList and
mResourceUseList, and they do not use the same mutex lock. This means
the race could happen and corrupt the mUse data. The same thing could
happen with ImageHelper object as well. This quick fix also grabs
mGrabageMutex while processing mResourceUseList. This CL creates a new
garbage list to hold garbage that has not been submitted to vulkan. And
this list will only accessed from submission thread and with
mGarbageMutex lock held. The advantage of this is that mSharedGarbage
will only have objects that already submitted, which means it is in FIFO
order so that we can break out the loop as soon as we see an uncompleted
garbage.
This bug was exposed by
MultithreadingTest.MultiContextClear/ES3_Vulkan_SwiftShader on
linux-tsan-test
Bug: angleproject:7045
Change-Id: I264c970579aaa53373a61ff067fa0e21eb410ae6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3482158
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
3adace15
|
2022-01-10T22:53:19
|
|
Don't expose detailed driver version info to webGL
WebGL's GL_RENDERER string now only includes basic version information
on all backends. This is controlled through a bool passed through
getBackendVersionString.
Bug: angleproject:6777
Change-Id: Ie4e3d91d22c96f175a8139fac1c66e985ed9e1b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3380263
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Sean Risser <srisser@google.com>
|
|
701d51b1
|
2022-01-25T15:44:39
|
|
Vulkan: Add SmallBufferPool for small allocations
The small pool uses buddy algorithm that is much faster. The only
downside is that it rounds size to power of two. For small allocations
that rounding does not generate much waste and avoid fragmentation as
well. This CL adds a small pool for host visible non-coherent pool. My
testing with gardenscape shows that on top of other CLs, this reduces
CPU overhead from 1.77ms to 1.55ms as measured with --minimize-gpu-work
with offscreen.
Bug: b/215768827
Change-Id: I68434931f238c4e980b77d3df46d762260ef1db5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3415211
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
83a670ab
|
2021-10-29T09:12:26
|
|
Vulkan: Implement BufferPool using VMA's virtual allocator
VMA's allocation calls used to be sub-allocating a pool of memory. What
we really want is sub-allocate a VkBuffer object. VMA recently added
support to expose the underlying range allocation algorithm via APIs,
which user can use it to sub-allocate any object. This CL uses that new
virtual allocation API to sub-allocate from a pool of VkBuffers.
In this CL we only switched BufferVk::mBuffer to sub-allocate from the
BufferPool object.
Bug: b/205337962
Change-Id: Ia6ef00c22e58687e375b31bc12ac515fd89f3488
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266146
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
32f572b7
|
2021-12-03T17:58:51
|
|
Support creating EGLImage from VkImage
Bug: chromium:1264439
Change-Id: I520182143e748f25b44d0725f3f171b7b33a85d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3311131
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
81d964a1
|
2021-10-28T10:50:51
|
|
vulkan: implement EGLDevice for vulkan backend
It allows ANGLE clients to get and use VkDevice and VkQueue
used by vulkan backend.
Bug: chromium:1264439
Change-Id: I338ac08152cfec50bb34c5025730e5e6368efba9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3250964
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
27e7c4dd
|
2021-10-01T13:43:57
|
|
Vulkan: Submit commands when Sync objects are initialized
This CL calls ContextVk::flushImpl() after the sync object (VkEvent) has
been created and initialized, so it has a valid Serial when it's waited
on later.
This change allows us to remove any tracking of pending sync objects,
since all sync objects will be flushed and submitted by the end of
SyncHelper::initialize().
Bug: angleproject:6464
Test: MultithreadingTest.CreateFenceThreadAClientWaitSyncThreadBDelayedFlush
Change-Id: I47e7ced452727b434ed974368311fb3439a107c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3200274
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
223cd0ac
|
2021-06-15T18:46:07
|
|
Capture/Replay: Refactor shared context handling
This is the initial CL to enable capture/replay of multi-context
applications.
This CL refactors FrameCapture and FrameCaptureShared to move much of
the functionality into FrameCaptureShared, since most everything is
shared by Contexts in the share group. For example, the setup of the
majority of the GL objects is done in the new SetupReplayContextShared()
function in the new $LABEL_capture_context_shared_frame001.cpp file. The
setup is performed by (for example):
void SetupReplay()
{
$LABEL::InitReplay();
$LABEL::SetupReplayContextShared();
SetupReplayContext2();
}
This performs the shared setup first, followed by the context-specific
setup, which may reference shared objects careated by
LABEL::SetupReplayContextShared().
No re-capturing is required with this change, since the external APIs
(i.e., SetupReplay()) are still the same.
Bug: angleproject:5878
Test: Manual MEC and replay of Magic Tiles 3, Candy Crush Soda Saga, Temple Run 2
Change-Id: Iab7bfe651437e9be1dee83514cd97acc20c61d1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965780
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b73eee71
|
2021-07-07T18:51:35
|
|
Reland: [Vulkan] Add DisplayVkNull
Currently all DisplayVk implementations depend on VK_KHR_swapchain and
VK_KHR_surface extensions. When running Chromium on Fuchsia these
extensions are never used (content is shown on the screen using
ImagePipe API without dependency on swapchain). ANGLE still depended
on these extensions for DisplayVkFuchsia.
This CL adds DisplayVkNull, which allows to run ANGLE without dependency
on swapchain. It's usable only offscreen and cannot present content on
a surface.
Bug: chromium:1203879
Change-Id: I5cadcdf46ed1cfb5ebb3cb69dbfef063e9e2b826
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3012368
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
88156d26
|
2021-05-18T23:55:32
|
|
Revert "[Vulkan] Add DisplayVkNull"
This reverts commit cbbaf76b758fb6a37175795b1f424549d535fbdc.
Reason for revert: Suspecting this breaks the fuchsia_x64 bot WebGL
tests.
Ex:
https://chromium-review.googlesource.com/c/chromium/src/+/2904812
Original change's description:
> [Vulkan] Add DisplayVkNull
>
> Currently all DisplayVk implementations depend on VK_KHR_swapchain and
> VK_KHR_surface extensions. When running Chromium on Fuchsia these
> extensions are never used (content is shown on the screen using
> ImagePipe API without dependency on swapchain). ANGLE still depended
> on these extensions for DisplayVkFuchsia.
> This CL adds DisplayVkNull, which allows to run ANGLE without dependency
> on swapchain. It's usable only offscreen and cannot present content on
> a surface.
>
> Bug: chromium:1203879
> Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bug: chromium:1203879
Change-Id: I6701ffff48fcb925f387e63b356d2d5cf360ea7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2904183
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
cbbaf76b
|
2021-04-29T16:09:09
|
|
[Vulkan] Add DisplayVkNull
Currently all DisplayVk implementations depend on VK_KHR_swapchain and
VK_KHR_surface extensions. When running Chromium on Fuchsia these
extensions are never used (content is shown on the screen using
ImagePipe API without dependency on swapchain). ANGLE still depended
on these extensions for DisplayVkFuchsia.
This CL adds DisplayVkNull, which allows to run ANGLE without dependency
on swapchain. It's usable only offscreen and cannot present content on
a surface.
Bug: chromium:1203879
Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4968f6f2
|
2021-02-04T16:40:36
|
|
Move getRendererDescription from ContextImpl to DisplayImpl
The other backend description strings are in DisplayImpl. This will
help with caching the result of glGetString in the GL backend. Also
Update the getters to not be const in order to allow caching.
Bug: chromium:1173672
Change-Id: I43df35688762b23429f47f169c04482cf4cd089a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676881
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
0be050a4
|
2020-09-23T15:12:56
|
|
Pass GL_VERSION info through ANGLE's GL_RENDERER string
Chrome needs ANGLE to pass through the underlying driver vendor and
version, which cannot always be determined by the SystemInfo library.
This is done by construction GL_RENDERER in the frontend through
combining GL_VENDOR, GL_RENDERER, and GL_VERSION from the backends.
Example changes are in the doc:
https://docs.google.com/document/d/1p0dvrLlu8NKhO-RCU5gqlQ_LvcQj-ZqhvfwSk1n3Sz8/edit?usp=sharing
Bug: chromium:1126526
Bug: chromium:1131248
Bug: chromium:1134669
Bug: chromium:1169861
Change-Id: Ia618ebcd7f3caaeb376b4b6a03446732efdaeecb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427383
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
535d4783
|
2021-01-20T14:14:02
|
|
Vulkan: Flush if sync object is pending during SyncVk::getStatus()
When a glGetSynciv() is performed for GL_SYNC_STATUS, we should flush
any pending commands if a sync object is pending a flush, since the
caller is interested in the status of a fence. This will guarantee that
the work is submitted to the hardware and eventually completes.
This is accomplished by moving mSyncObjectPendingFlush from ContextVk to
ShareGroupVk, so that any sync objects used by any contexts within the
share group are submitted to hardware and the required work completes.
Bug: angleproject:5306
Bug: angleproject:5425
Test: FenceSyncTest.BasicOperations
Change-Id: I2e2681ad01fda429ba37f061c9bac5eb91f800fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2641095
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
909ea88b
|
2020-11-20T13:07:53
|
|
Reland "Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9"
This is a reland of 5cf7472dd161bbda329dfc5e4e65bb6ce0c06fbd
The ShareGroupVk::mResourceUseLists was not being cleared each call to
RendererVk::submitFrame(), so it was growing indefinitely. Each
vk::ResourceUseList within it was cleared, so it was holding an
essentially "infinite" list of empty lists, but that caused the loop in
RendererVk::submitFrame() to take more and more time until the tests
timed out.
The fix is to do 'resourceUseLists.clear()' once the loop to release all
resources has completed, like releaseResourceUsesAndUpdateSerials() does
for each individual list. Additionally, ASSERTs are added to guarantee
that the lists are empty when the ContextVk and ShareGroupVk are
destroyed.
Original change's description:
> Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9
>
> Multithreaded apps can use the following pattern:
>
> glDrawElements()
> glFenceSync()
> glFlush()
> glWaitSync()
>
> This currently results in a vkQueueSubmit for every glFlush() to ensure
> that the work has landed in the command queue in the correct order.
> However, ANGLE can instead avoid the vkQueueSubmit during the glFlush()
> in this situation by instead flushing the ContextVk's commands and
> ending the render pass to ensure the commands are submitted in the
> correct order to the renderer. This improves performance for Asphalt 9
> by reducing frame times from 150-200msec to 35-55msec.
>
> Specifically, ANGLE will call flushCommandsAndEndRenderPass() when
> there is a sync object pending a flush or if the ContextVk is currently
> shared.
>
> Additionally, on all devices except Qualcomm, ANGLE can ignore all other
> glFlush() calls entirely and return immediately. For Qualcomm devices,
> ANGLE is still required to perform a full flush (resulting in a
> vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0
> offscreen score by ~3%.
>
> Bug: angleproject:5306
> Bug: angleproject:5425
> Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bug: angleproject:5306
Bug: angleproject:5425
Bug: angleproject:5470
Change-Id: I14ee424d032f22e5285d67accbec078ad1955dd0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595811
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a19bd601
|
2020-12-16T13:04:38
|
|
Revert "Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9"
This reverts commit 5cf7472dd161bbda329dfc5e4e65bb6ce0c06fbd.
Reason for revert: causes timeouts, see anglebug.com/5470
Original change's description:
> Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9
>
> Multithreaded apps can use the following pattern:
>
> glDrawElements()
> glFenceSync()
> glFlush()
> glWaitSync()
>
> This currently results in a vkQueueSubmit for every glFlush() to ensure
> that the work has landed in the command queue in the correct order.
> However, ANGLE can instead avoid the vkQueueSubmit during the glFlush()
> in this situation by instead flushing the ContextVk's commands and
> ending the render pass to ensure the commands are submitted in the
> correct order to the renderer. This improves performance for Asphalt 9
> by reducing frame times from 150-200msec to 35-55msec.
>
> Specifically, ANGLE will call flushCommandsAndEndRenderPass() when
> there is a sync object pending a flush or if the ContextVk is currently
> shared.
>
> Additionally, on all devices except Qualcomm, ANGLE can ignore all other
> glFlush() calls entirely and return immediately. For Qualcomm devices,
> ANGLE is still required to perform a full flush (resulting in a
> vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0
> offscreen score by ~3%.
>
> Bug: angleproject:5306
> Bug: angleproject:5425
> Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,jmadill@chromium.org,cclao@google.com
Change-Id: I9886bf901a835d408b6a4b8be7ea408fa2121be0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5306
Bug: angleproject:5425
Bug: angleproject:5470
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595032
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
5cf7472d
|
2020-11-20T13:07:53
|
|
Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9
Multithreaded apps can use the following pattern:
glDrawElements()
glFenceSync()
glFlush()
glWaitSync()
This currently results in a vkQueueSubmit for every glFlush() to ensure
that the work has landed in the command queue in the correct order.
However, ANGLE can instead avoid the vkQueueSubmit during the glFlush()
in this situation by instead flushing the ContextVk's commands and
ending the render pass to ensure the commands are submitted in the
correct order to the renderer. This improves performance for Asphalt 9
by reducing frame times from 150-200msec to 35-55msec.
Specifically, ANGLE will call flushCommandsAndEndRenderPass() when
there is a sync object pending a flush or if the ContextVk is currently
shared.
Additionally, on all devices except Qualcomm, ANGLE can ignore all other
glFlush() calls entirely and return immediately. For Qualcomm devices,
ANGLE is still required to perform a full flush (resulting in a
vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0
offscreen score by ~3%.
Bug: angleproject:5306
Bug: angleproject:5425
Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
56663dbf
|
2020-11-19T21:21:19
|
|
EGL: Expose device query as a client extension.
This matches the extension spec. Previously we were exposing the ext
as a normal display extension. The extension should work without
needing a display.
Because the extension requires a non-null device for every display we
also add a MockDevice class to handle back-ends which don't implement
any attribute query extensions. By default the device query ext does
not expose any way to use devices so this works fine.
Bug: angleproject:5372
Change-Id: I474310a86aff6a83bd6f9a6b21c8a07c649f306d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551543
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
97843bda
|
2020-10-30T17:03:36
|
|
Vulkan: Fix EGL Surface robust init.
The error here was related to using a single cache variable for the
robust init setting for all the surfaces in a DisplayVk. Fix this by
passing down the robust init setting from the SurfaceVk to image init.
Bug: angleproject:5274
Change-Id: I9bc9c20990268d1d5166411fb53f8f2593fd1971
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2510694
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7d70a62f
|
2020-10-13T10:41:50
|
|
Vulkan: refactor error info
Consolidate error info into a structure in preparation of threading
work. Also preserves the meaning of the data until it's rendered to a
string for consumption by GL.
Bug: b/154030730
Change-Id: I8cde7133c817d77fdb117efc1c11edc94f615da3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468537
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
08142700
|
2020-10-01T19:30:03
|
|
Work-around test runner & DebugAnnotator
Note: This precedes another CL that needs this change.
DebugAnnotator uses a global variable. The test runner doesn't change
state between testing different back-ends. This works-around the
problem by setting the global variable when the context is switched.
Because the GL back-end doesn't have its own DebugAnnotator sub-class,
add a Display* to DisplayImpl::makeCurrent(), so that
DisplayGL::makeCurrent() can install the front-end-Display's
DebugAnnotator.
Note: the Vulkan back-end gets this fix even though the new
DebugAnnotatorVk class will be added in a follow-on CL.
Bug: b/162068318
Bug: b/169243237
Bug: angleproject:5121
Change-Id: If08626a5310f9b4e3210e1a897a6886248e4d8ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451423
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
86ca5d2b
|
2020-10-01T11:56:05
|
|
Vulkan: Add plumbing to render pass when ImageHelper gets deleted
ImageHelper object is not refcounted and garbage collected and
endRenderPass call is deferred until next render pass starts. This
caused a situation that an ImageHelper object gets deleted while still
referenced in the open render pass. This CL make sure that we call into
all shared context's open renderpass when an image goes away so that
they can take appropriate action for this.
Bug: b/169618408
Change-Id: I5075e805980084db82ca3e699462272eee5d2d59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2443571
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
da61c40e
|
2020-10-06T01:57:55
|
|
Revert "Work-around test runner & DebugAnnotator"
This reverts commit e44c94d96a9b65615fe8f5038e124763ac8c45e5.
Reason for revert: Breaks build of DisplayGbm on ChromeOS:
src/libANGLE/renderer/gl/egl/gbm/DisplayGbm.{h,cpp}
First failing builds:
https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28amd64-generic%29/1608
https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28kevin%29/2212
Original change's description:
> Work-around test runner & DebugAnnotator
>
> Note: This precedes another CL that needs this change.
>
> DebugAnnotator uses a global variable. The test runner doesn't change
> state between testing different back-ends. This works-around the
> problem by setting the global variable when the context is switched.
>
> Because the GL back-end doesn't have its own DebugAnnotator sub-class,
> add a Display* to DisplayImpl::makeCurrent(), so that
> DisplayGL::makeCurrent() can install the front-end-Display's
> DebugAnnotator.
>
> Note: the Vulkan back-end gets this fix even though the new
> DebugAnnotatorVk class will be added in a follow-on CL.
>
> Bug: b/162068318
> Bug: b/169243237
> Bug: angleproject:5121
> Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
> Commit-Queue: Ian Elliott <ianelliott@google.com>
TBR=courtneygo@google.com,ianelliott@google.com,jmadill@chromium.org
Change-Id: I99df2716951726ead24961dc3d27a7ec63aeda80
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/162068318
Bug: b/169243237
Bug: angleproject:5121
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451420
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
|
|
e44c94d9
|
2020-10-01T19:30:03
|
|
Work-around test runner & DebugAnnotator
Note: This precedes another CL that needs this change.
DebugAnnotator uses a global variable. The test runner doesn't change
state between testing different back-ends. This works-around the
problem by setting the global variable when the context is switched.
Because the GL back-end doesn't have its own DebugAnnotator sub-class,
add a Display* to DisplayImpl::makeCurrent(), so that
DisplayGL::makeCurrent() can install the front-end-Display's
DebugAnnotator.
Note: the Vulkan back-end gets this fix even though the new
DebugAnnotatorVk class will be added in a follow-on CL.
Bug: b/162068318
Bug: b/169243237
Bug: angleproject:5121
Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
b156a753
|
2020-09-28T16:43:50
|
|
Move LayoutCaches to ShareGroup
Testing with TSN found a race condition with RefCounted objects
(DescriptorSetLayout and PipelineLayout). Rather than add more lock
calls to protect accesses to mRefCount and mObject recommendation was to
put these caches in the ShareGroup (basically part of the context).
Locking at the GL level will ensure that two threads that share the same
context will not access the ShareGroup at the same time.
The ShareGroup also works because these layouts are not destroyed until
the context is destroyed so don't have to worry about other threads
(e.g. command processor thread) accessing them.
Bug: b/168744561
Change-Id: Icc0aa07bf4787a69572d6ec62da2f21d286232c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437509
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
68a5baeb
|
2020-09-23T22:13:03
|
|
Revert "Vulkan: Implement a SharedResourceUse pool"
This reverts commit de335c16855f11d1f0a6f0b37bee30c8a09a6c1d.
Reason for revert: Might actually regress CPU overhead perf.
Unsure but it's possible the reported perf improvement was due
to variance.
Original change's description:
> Vulkan: Implement a SharedResourceUse pool
>
> When adding a Resource to the ResourceUseList of ContextVk
> we constructed a new SharedResourceUse object for tracking
> and update of the Resource's Serial. We would then delete
> it after releasing the resource. This incurs repeated
> memory operation costs.
>
> Instead we now allocate a pool of SharedResourceUse objects
> and acquire and release from this pool as needed.
>
> VTune profile of the Manhattan 30 offscreen benchmark
> shows the CPU occupancy of bufferRead decrease from an
> average of 0.9% -> 0.6% and imageRead decreases from
> an average of 0.4% -> 0.3%. The bottleneck for both
> these methods is the retain() method that leverages
> the new SharedResourceUse pool.
>
> Bug: angleproject:4950
> Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
TBR=syoussefi@chromium.org,jmadill@chromium.org,m.maiya@samsung.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:4950
Change-Id: I40081551c3db67d6e55182fea40119946ed16ac3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426479
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
de335c16
|
2020-09-14T12:04:20
|
|
Vulkan: Implement a SharedResourceUse pool
When adding a Resource to the ResourceUseList of ContextVk
we constructed a new SharedResourceUse object for tracking
and update of the Resource's Serial. We would then delete
it after releasing the resource. This incurs repeated
memory operation costs.
Instead we now allocate a pool of SharedResourceUse objects
and acquire and release from this pool as needed.
VTune profile of the Manhattan 30 offscreen benchmark
shows the CPU occupancy of bufferRead decrease from an
average of 0.9% -> 0.6% and imageRead decreases from
an average of 0.4% -> 0.3%. The bottleneck for both
these methods is the retain() method that leverages
the new SharedResourceUse pool.
Bug: angleproject:4950
Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
84bd9dad
|
2020-08-26T22:01:44
|
|
Vulkan: Allow pbuffer usage if no window support
Vulkan allows rendering to non-swapchain images, so pbuffers can always
be supported on every config. With this change, if the window system
does not support a configuration, EGL_WINDOW_BIT is removed from the
config instead of dropping the config entirely.
Bug: chromium:1034840
Change-Id: Ib972ed8ddf7660c327123fa83ae0674456cf2a35
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378921
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
|
|
22e6fc03
|
2020-07-31T15:58:28
|
|
Vulkan: Move Resource Serial gen into Renderer.
Putting Serial allocation in the Renderer allows the Helper
classes to manage allocating its own Serial. The init functions for
ImageViewHelper only have access to a vk::Context/RendererVk, not a
ContextVk. This will be updated in a future CL.
Re-uses the Serial Type X-Macro to do more code generation.
Serial allocation now uses an atomic because of its now Renderer
shared location.
Bug: angleproject:4911
Change-Id: I2d5d3d0bbf613d5468de795a700f66164291bc79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332884
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
67980f13
|
2020-07-08T08:51:02
|
|
Vulkan: add Buffer/Texture/ImageViewSerial class
In a few places we need a unique ID to represent that object and use
that to compute hash key. Right now we are using Serial for that purpose
but it creates confusion with QueueSerial which we are using Serial to
track GPU progress. This CL changes these usage of Serial to
TextureSerial, SamplerSerial, ImageViewSerial type so that compiler can
perform type checking. It also adds BufferSerial in preparation for next
CL.
Bug: b/159457348
Change-Id: I8e2da69c2029e4ddbcf163981ae46f85e19f751b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2287426
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
29bb612e
|
2020-05-28T10:32:26
|
|
Add egl::ShareGroup class to abstract the share context group
Vulkan backend has a barrier tracker that tracks memory barrier needs of
all shared resources. Because the buffer/texture objects are shared
resources within a shared group, the tracker can not live in a context.
Putting it in a device/renderer requires locks. It fits perfectly in a
shareGroup object. The work is already done at API level to handle the
mutex lock for shared context access so that no extra lock needs to be
taken in the backend. This CL adds egl::ShareGroup class that represents
the object that are shared among all share context group. At the front
end this usually will include all the shared resource managers (not done
in this CL). The ShareGroup object is accessible from gl::State object.
This CL also adds ability for backend driver to allocate implementation
specific ShareGroupImpl object. Vulkan backend will then use it to keeps
the barrier tracker and other things that naturally fits the share group
concept.
Bug: angleproject:4664
Change-Id: Ifcd975cbdf5130022e21c41397894afc28f572e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2217252
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2a0c3596
|
2020-03-31T15:36:45
|
|
Vulkan: Clean up robust and emulated image clears.
This change consolidates image clears in multiple places into a single
site in ImageHelper initialization. It adds support for appending clear
image commands as well as prepend (the default). We prepend clears
because image initialization happens after data upload.
The Vulkan robust clear path now works like the other back-ends. The
change flushed out a bug where partially uninitialized CopyTexImage was
not correctly initializing a texture before triggering a full resource
clear. Texture::copyImage now uses a workaround where we first init the
image before clearing it. After the init we upload the new data.
We'll use the appending clears path when implementing deferred clears.
Bug: angleproject:4517
Change-Id: If9212f3b8cdd0fc8b7e729d364530801a644e164
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2130627
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
4864413b
|
2020-02-17T15:34:33
|
|
Vulkan: Implement eglWaitNative function
Implement eglWaitNative API. It will call XSync() on XCB and
do nothing on other systems.
Bug: angleproject:4281
Change-Id: I597b75124a380df519ab10af3cab9b6e26f3194f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2059620
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
806ba566
|
2019-12-12T13:02:01
|
|
Extend ANGLE_iosurface_client_buffer to Vulkan backend for Swangle
Implement an IOSurface-backed pBuffer surface for the Vulkan backend
on Mac, through SwANGLE. ANGLE will pass a raw pointer to Swiftshader
and handle locking/unlocking the IOSurface.
Bug: chromium:1015454
Change-Id: Ia3ead55334736003d405b54ba8dcc7701706fbb2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965434
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5883a44b
|
2019-11-02T19:34:47
|
|
Vulkan: Don't pass width/height to Surface constructors.
These values are accessible already from the Surface state. Sometimes
they don't apply (e.g. GGP). Remove them to keep the code clearer.
Updates the offscreen surface constructor to pull width and height from
the attributes map instead of using parameters. Otherwise they weren't
used.
Refactoring change only.
Bug: angleproject:4078
Change-Id: I9e49eadc7116562f62bd8d11342d6b8835376719
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1895762
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6a02f06d
|
2019-07-18T16:27:14
|
|
Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.
BUG=angleproject:3425
Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7d6923de
|
2019-07-01T03:22:42
|
|
Revert "Vulkan: pipeline cache not populated as blob cache is not set"
This reverts commit 134d6eed2a7d1f148a42c78c8e5da3cfc2df288e.
Reason for revert: glmark2 is unable to start on Android-Q when using ANGLE as the driver.
Original change's description:
> Vulkan: pipeline cache not populated as blob cache is not set
>
> 1. Use vkMergePipelineCaches in eglSetBlobCacheFuncsANDROID as
> blob cache callbacks are set after eglInititalize.
> 2. Use a more proper way to save the cache data to disk.
>
> Bug: angleproject:3318
> Change-Id: Ieb5d10ab93e7afb2aab4446b387d7f36c878a686
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1559671
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=syoussefi@chromium.org,jmadill@chromium.org,fei.yang@arm.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:3318
Change-Id: I51e49bf103142e80b2c9028b3af6d3bb58cf6348
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1683820
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
134d6eed
|
2019-04-09T14:50:23
|
|
Vulkan: pipeline cache not populated as blob cache is not set
1. Use vkMergePipelineCaches in eglSetBlobCacheFuncsANDROID as
blob cache callbacks are set after eglInititalize.
2. Use a more proper way to save the cache data to disk.
Bug: angleproject:3318
Change-Id: Ieb5d10ab93e7afb2aab4446b387d7f36c878a686
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1559671
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f52f2637
|
2019-05-23T13:52:52
|
|
Add EGL_ANGLE_workaround_control extension.
This extension is used to query strings from an array based on index,
which will be used to query all the information about workarounds in
ANGLE.
Bug: angleproject:1621
Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
740db7fd
|
2019-02-06T09:40:13
|
|
Vulkan: Add support for loading layers from DisplayVk
Fuchsia needs a layer to support VK_KHR_swapchain. Add the ability for
DisplayVk subclasses to request a layer in addition to an extension.
BUG=angleproject:2475
TEST=angle_end2end_tests on Fuchsia
Change-Id: If86c773d4bd4ebecaee4b1631d3d4975105fe849
Reviewed-on: https://chromium-review.googlesource.com/c/1456478
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
82fddcb1
|
2019-01-18T14:27:43
|
|
Vulkan: Implement GLsync and EGLSync fence syncs
That is required in GLES 3 for GLsync and EGL_KHR_fence_sync and
EGL_KHR_wait_sync (or EGL 1.5) for EGLSync.
The two constructs (GLsync and EGLSync) have similar semantics and share
the implementation on the Vulkan backend.
The implementation of a fence sync object is achieved through the
combined use of a vkEvent and the implicit vkFence inserted at the end
of every submission. Imagine the following command buffer:
glDraw : Draw
glCreateSync: Set Event <-- insertion of fence sync
glDraw : Draw
: Signal Fence <-- implicit fence at the end of submission
glFlush : Submit
Assume the serial S is associated to this submission. The following
hold:
- If event is set, the fence sync is signaled
- If S is already finished, the fence sync is signaled
- If client is waiting on the sync and S is not yet flushed, there will
be a deadlock (unless multi-threaded and another thread performs the
flush).
The event is used to implement server waits (glWaitSync), as vkEvent is
the only entity the GPU can signal and wait on within the command
buffer. The wait is inserted in the command graph without incurring a
flush, i.e. the wait can be within the same command buffer as event set.
The event however does not support CPU waits (glClientWaitSync).
vkFence is the only entity the CPU can wait on. For client wait
therefore, the following algorithm is used:
- If the event is already set, there's no wait -> already signaled
- If timeout is zero, there's no wait -> timeout expired
- If S is not flushed, flush it to ensure forward progress.
- Wait until S is finished -> condition satisfied / timeout expired.
Bug: angleproject:2466
Change-Id: I678995a6139dd9533fa8ad361a3d292b202c52a4
Reviewed-on: https://chromium-review.googlesource.com/c/1422552
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0c667215
|
2019-01-01T14:40:36
|
|
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>
|
|
c3dc5d48
|
2018-12-30T12:12:04
|
|
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>
|
|
4f6592fa
|
2018-11-27T16:37:45
|
|
Remove gl::Error.
Removes several TODOs. Only egl::Error remains.
Also slightly decreases binary size.
Bug: angleproject:2491
Change-Id: I3a9d1c22eb0884ca9e37362463fddd0083faf826
Reviewed-on: https://chromium-review.googlesource.com/c/1337462
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
996628a4
|
2018-09-24T16:39:26
|
|
Vulkan: Add support for VkPipelineCache
The cache is initialized from the application's blob cache and is
occasionally written back to it for disk storage.
Bug: angleproject:2516
Change-Id: I4cba4b00a7b9641c2983ef07159bc62cd10a5519
Reviewed-on: https://chromium-review.googlesource.com/1241373
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cd7cd2a8
|
2018-07-19T11:25:54
|
|
Pass Context to EGLImage creation and Display to EGLImage initialization.
BUG=angleproject:2507
Change-Id: I6c195434131709203f892be6037e974002c174c2
Reviewed-on: https://chromium-review.googlesource.com/1143453
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
21061026
|
2018-07-12T23:56:30
|
|
Vulkan: Use angle::Result error handling.
Introduces a vk::Context class to contain an error handler and Renderer
pointer. This abtracts the common code path for ContextVk + DisplayVk.
Removes vk::Error in favor of the POD angle::Result class. There are a
few remaining usages of gl::Error that will have to be cleaned up when
we can change the front-end APIs.
Bug: angleproject:2713
Change-Id: I5e68f223d595c6c561b59d6a85759e5738ed43c6
Reviewed-on: https://chromium-review.googlesource.com/1128924
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
853f8255
|
2018-07-09T09:18:50
|
|
DisplayImpl: Make waitClient/waitNative non-const.
These methods can mutate the display resources. Necessary for getting
rid of ProxyContext and for the Vulkan error refactor.
Bug: angleproject:2714
Bug: angleproject:2713
Change-Id: Ibffb1a382ecb064daaa7c664f9fc65cbcf927b37
Reviewed-on: https://chromium-review.googlesource.com/1128927
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
475ef575
|
2018-06-27T15:54:18
|
|
Vulkan: Refactor config generation out of platform specific code.
Permuatations of configs are now generated in platform-independent code and
a DisplayVk callback is used to determine native support.
BUG=angleproject:2692
Change-Id: Iad450c1a3275239d6bcbc350e8dd8e37470fa8e0
Reviewed-on: https://chromium-review.googlesource.com/1117563
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
3cacf69b
|
2018-06-20T16:49:57
|
|
Pass all context creation parameters to DisplayImpl::createContext.
Knowing the share context at native context creation time is required if
we want to honor the requested share group instead of virtualizing
contexts or using global share groups.
BUG=angleproject:2464
Change-Id: I1fb4d71de266b3191986b1754e73d474e49445bb
Reviewed-on: https://chromium-review.googlesource.com/1108743
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
199f4294
|
2018-01-19T19:04:05
|
|
Vulkan: Enable on Android
Add Android DisplayVk and WindowSurfaceVk variants.
Build Vulkan backend and validation layers on Android
if toolchain uses required NDK API level.
Fix validation layers discovery to work on Android.
BUG=angleproject:2314
TEST=angle_end2end_tests builds and runs on Nexus 5X, 12 VULKAN tests pass
Change-Id: Iac2ec4ecd6470a7552f9f60c023ba1760aa090c5
Reviewed-on: https://chromium-review.googlesource.com/887797
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
e1aa9219
|
2018-01-08T17:53:05
|
|
Create a new DeviceImpl each time one is requested from a DisplayImpl.
This makes sure that the Device to DeviceImpl ratio is always 1:1 and
avoids any potential double-deletion or unexpected deletion of
DeviceImpl objects.
BUG=742034
Change-Id: I778068ccd09b7478d3683123456062b94be242a1
Reviewed-on: https://chromium-review.googlesource.com/854627
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
3dddccff
|
2017-11-14T16:44:36
|
|
Support RGB gl-tex-external stream consumers for StreamProducerNV12.
This makes it relatively simple to sample from a D3D11Texture of
arbitrary format.
From: https://bugzilla.mozilla.org/show_bug.cgi?id=1322746
BUG=angleproject:2233
TEST=angle_end2end_tests
Change-Id: I10cd3043b5cb0c5d36dd613467ba6c0ceadf41af
Reviewed-on: https://chromium-review.googlesource.com/758042
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
fe54834f
|
2017-06-19T11:13:24
|
|
Proliferate gl::Context.
This enables a few small things: it will enable making the platform
a property of the Display rather than a global. The same goes for the
global logging annotator. Also it ensures all back-end implementations
have access to the GL / EGL state when available.
Also introduces a smart pointer helper class to angleutils for objects
that prefer to be destroyed with a context (gl::Context/egl::Display)
parameter. We were using std::unique_ptr in a few places that would
not work well with these objects.
BUG=angleproject:1156
Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba
Reviewed-on: https://chromium-review.googlesource.com/529706
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
29f148b0
|
2016-11-23T21:05:36
|
|
Support Vulkan on Linux as well as Windows.
Refactor display and surface classes into Win32 and Linux parts and
add Linux parts to gn and gyp builds.
BUG=angleproject:1668
Change-Id: I2a7d29c35f4f42fa0035bd97938d3770f3627672
Reviewed-on: https://chromium-review.googlesource.com/412426
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
76b8f469
|
2017-04-21T12:23:40
|
|
Use a shared state for egl::Image.
This allows us to stop duplicating some information in the impl.
BUG=angleproject:1635
Change-Id: If8f7d2418571c3254729f48c463814ec18ed2644
Reviewed-on: https://chromium-review.googlesource.com/469153
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
3311d474
|
2017-01-02T17:55:02
|
|
Display: Add a shared state object.
This will allow us to manage the SurfaceSet in the GL layer.
BUG=angleproject:1684
Change-Id: Iab8243157710beab2667ef10275571078ce9ae8e
Reviewed-on: https://chromium-review.googlesource.com/424228
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4d0bf557
|
2016-12-28T15:45:24
|
|
Vulkan: Initialize the draw surface.
This also involves initializing the swap chain and queue.
BUG=angleproject:1319
Change-Id: Ia3a2141905f17b2cdddddab07336f33a737d4fc1
Reviewed-on: https://chromium-review.googlesource.com/367752
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
e09bd5d3
|
2016-11-29T16:20:35
|
|
Vulkan: Add display creation, test and extension.
With this CL we have the ability to create Vulkan test configs and run
basic tests, although the only thing that works is creating a Vulkan
Renderer using the extension.
BUG=angleproject:1319
Change-Id: I8ad17bba01241334be7da16e68fea38762ca6a20
Reviewed-on: https://chromium-review.googlesource.com/367750
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
a26c6b7c
|
2016-12-15T11:27:50
|
|
Surface: Make the egl::Config part of SurfaceState.
This will be accessible to the Impl, so they won't have to store a
copy of the pointer.
BUG=angleproject:1319
Change-Id: I298a11a243d3d32f4c885273e55162e6862f3e16
Reviewed-on: https://chromium-review.googlesource.com/419697
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
2018c0ba
|
2015-12-08T11:48:51
|
|
Add a EGL_ANGLE_d3d_texture_client_buffer extension.
Allows creation of pbuffers from D3D texture objects.
BUG=540829
BUG=angleproject:1144
Change-Id: If8ea717ef011608cd01357c217837133d726d3ea
Reviewed-on: https://chromium-review.googlesource.com/316804
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6230dd54
|
2016-08-23T15:20:03
|
|
Check for OpenGL ES support when creating context
Support for an OpenGL ES version can come either through OpenGL ES,
OpenGL core or available extensions. The context creation should fail
if the requested OpenGL ES version is not supported.
BUG=angleproject:1477
TEST=angle_end2end_tests
Change-Id: I810d004a1bd62f75f162d775d3cf92c4283252a3
Reviewed-on: https://chromium-review.googlesource.com/374338
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
9c721c64
|
2016-08-02T14:56:23
|
|
Check for device loss on all applicable EGL entry-points
This will make applications aware of device loss on all EGL calls that
need to have an initialized display. For that purpose, we track the
device loss state at the egl::Display level instead of always querying
the implementation. This is correct because at device-loss at the
display level is non-recoverable. It also deduplicates the tracking
that would have to be done in all the EGL backends.
Changes made in this commit:
- Cached device loss in egl::Display
- Check isDeviceLost in ValidateDisplay
- Changed EGL entry-points testing isDeviceLost to explicitely request
a testDeviceLost
- Add calls to ValidateDisplay to entry-points missing it
- Removed unused virtual qualifiers for some robustness methods
BUG=angleproject:1463
Change-Id: I92bea81f2ecd5423c445cff31557a4d9783557d5
Reviewed-on: https://chromium-review.googlesource.com/365450
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
acccc6c9
|
2016-05-03T17:22:10
|
|
Vulkan: Hook up Renderer create functions.
Do this in a separate CL to preserve the renderer generation.
BUG=angleproject:1319
Change-Id: I6d5768f199f6aabff747b3708c0625ff78e1ceb0
Reviewed-on: https://chromium-review.googlesource.com/349424
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
07529ff8
|
2016-06-04T02:19:03
|
|
Remove const qualifier from generateConfigs
Requested in https://chromium-review.googlesource.com/349353
BUG=angleproject:1362
Change-Id: I989757c2fb8f65d5afcfb177b7f8da1414871e6f
Reviewed-on: https://chromium-review.googlesource.com/349694
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
9e54b5af
|
2016-05-25T12:57:39
|
|
Add Vulkan stubs.
Currently enabled for Windows by default.
BUG=angleproject:1319
Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|