|
3fed0866
|
2023-02-22T00:00:00
|
|
Implement EXT_texture_mirror_clamp_to_edge
Support GL_MIRROR_CLAMP_TO_EDGE_EXT address
mode when native support is available.
Adjusted validation, sorted switch cases by
target enums order.
Added new TextureMirrorClampToEdge* end2end
tests.
Drive-by: fixed texture address computation
for integer formats with GL_MIRRORED_REPEAT
on D3D11.
Fixed: angleproject:7968
Change-Id: Iaf29c8b4b32a7630c2a871f832d171f4bc4e2672
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4289137
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
7d8e2778
|
2023-02-13T10:04:08
|
|
Vulkan: Remove usage of VK_EXT_external_memory_host
This extension is no longer used by ANGLE
Bug: angleproject:7959
Change-Id: If6c0e89e63b8b06fd03f7b6a0b083a18bada34fe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4244599
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
54951da2
|
2022-12-18T17:11:33
|
|
Vulkan: Refactor extension vs core version checks
Extensions are now grouped based on promotion-to-core status, and
initialization code is generally cleaned up. ANGLE currently doesn't
attempt to use a core version above Vulkan 1.1, as extensions are always
assumed to be exposed even if promoted to core in later versions.
With this change, it would be simpler to use a newer core version if
ever necessary.
Bug: angleproject:7959
Change-Id: Ia5fd3e06c18f7289e9e5a63af0f039a6dc89c687
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4224582
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2618a9bc
|
2023-02-08T14:14:02
|
|
Vulkan: Fix fragment shading rate entry point init
The function to initialize vkGetPhysicalDeviceFragmentShadingRatesKHR
was accidentally initializing
vkGetPhysicalDeviceExternalSemaphorePropertiesKHR.
Bug: angleproject:7172
Change-Id: I2c76e1b88c5ce2e996d5581731010053821e6f7a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4233091
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
|
|
b96f3abd
|
2023-02-03T13:12:29
|
|
Vulkan: Make Context::mLastSubmittedSerial to QueueSerial
Right now Context::mLastSubmittedSerial and mLastFlushedSerial are all
Serial type instead of QueueSerial. Most places we do need QueueSerial.
This CL changes them to QueueSerial type. This simplifies and improves
code readability. No actual functional change is expected with this CL.
Bug: b/267806287
Change-Id: Ib00cae2637ee9ed95e5fc00060c63017b04e26c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4219944
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
13aee254
|
2023-01-13T14:01:56
|
|
Move memory allocation info vars to separate class
* Moved the RendererVk variables related to memory allocation to a new
class, MemoryAllocationTracker.
* Note: The existing variable "mMemoryAllocationTracker" has been
renamed to "mMemoryAllocationRecord" to avoid confusion.
* Added a custom locale using the class MemoryLogNumberFormat, since
the original method did not include formatting on some Android
devices.
Bug: b/262029018
Change-Id: I23acf37119da02e6430de6b5d360307982ecf9bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4174738
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ivan Neulander <ineula@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
48e40ef6
|
2023-01-06T13:35:21
|
|
Add per-heap memory allocation trackers
* For each member of MemoryAllocationType, we now have a per-heap
counter to keep track of the allocation size in each available heap.
* mActivePerHeapMemoryAllocationsSize
* mActivePerHeapMemoryAllocationsCount (debug mode only)
* Added the memory type index to onMemoryAlloc() and onMemoryDealloc()
as an input. It can then be used to determine the used memory heap
index for that allocation using the memory properties defined in the
renderer.
* checkForCurrentMemoryAllocations() will now log the heap index of the
current memory allocations in debug mode and during an OOM crash.
* logPendingMemoryAllocation() will now log the heap index of the
pending allocation during an OOM crash.
* Renamed constexpr values used for tracking for more consistency.
* kTrackMemoryAllocation -> kTrackMemoryAllocationSizes
* kDebugMemoryAllocationLogs -> kTrackMemoryAllocationDebug
Bug: b/262029018
Change-Id: I178a3556b3107edc0c72c6b23ea2f2d6b12da947
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4149431
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Ivan Neulander <ineula@google.com>
|
|
2550fe9a
|
2023-01-14T21:21:24
|
|
Vulkan: Drop usage of VK_EXT_debug_report
This extension has been deprecated for 6 years in favor of
VK_EXT_debug_utils.
Bug: angleproject:7959
Change-Id: I51923a6821a6a18854ef94e0ca85c328bc8c6da5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4167833
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cd540095
|
2022-12-12T13:13:14
|
|
Vulkan: Add memory log at allocation error
* 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>
|
|
58d7ace2
|
2022-11-22T16:08:07
|
|
Vulkan: Add memory allocation log support in debug
* Added a memory tracker to the renderer object to keep track of the
memory allocations and deallocations in more detail.
* This feature is used for debugging only.
* To enable it, set angle_enable_memory_alloc_logging=true in GN args
(added in renderer/vulkan/BUILD).
* It is related to ANGLE_ENABLE_MEMORY_ALLOC_LOGGING in the code.
* The tracker are updated in the memory allocation tracking functions
if the feature is enabled. (The counter is always updated, even if
the feature is disabled.)
* At the end of a RendererVk object, it checks for and logs any
remaining allocated memory from MemoryAllocationType members.
* The data is stored in the map object "mMemoryAllocationTracker".
The key used for it is currently of type angle::BacktraceInfo.
* If angle_enable_unwind_backtrace_support is disabled, or not on
Android, the key is an empty object.
* MemoryAllocInfoMapKey is used as a key to access the allocation
information.
Bug: b/242641395
Change-Id: If701a4bdea2f8738a830ee47e0c7c5cdacf95b87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4050103
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
2e5ca217
|
2022-11-18T10:44:49
|
|
Vulkan: Let each current context has its own QueueSerial.
This CL makes every current context has its own queueSerial. At context
creation time or when context becomes current, it allocates a QueueIndex
from renderer. When it becomes non-current, it releases QueueIndex for
others to reuse. This way we significantly reduces the max number of
QueueIndexs for reasonable usage. Each CommandBuffer has its own unique
QueueSerial and we use that to determine if a resource is being used by
the given CommandBuffer. The QueueSerial for RenderPassCommands is
deferred until renderPass starts, and when we generate queueSerial for
renderPassCommands, we also reserve a range of serials for
outsideRenderPassCommands so that we can do incremental submission of
outsideRenderPassCommands without need to close renderPassCommands. In
rare situation, if that reserved serials runs out, we also close
renderPassCommands to ensure the ordering of serials matches ordering of
command buffers.
With per current context queue serial, this CL is able to set resource
queue serial as it is being used. This CL completely removes usage of
ResourceUseList class since it was introduced due to deferred setSerial.
This CL also get rid of refCount from ResourceUse since there we no
longer add it to a ResourceUseList. With that, we also able to remove
SharedResourceUse class since access to ResourceUse itself is now thread
safe since we are able to make a copy of it when we add it to
GarbageList.
Because RenderPassCommands now has its own unique QueueSerial as it
encodes command, we can use it to detect if a resource is being used by
it or not, thus this CL also removes usage of CommandBufferID.
Bug: b/255414841
Change-Id: I36dcbeaa7bc996f04e6c04bf9ad44cd0d630f61a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4038096
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
7dd8478e
|
2022-11-17T10:11:02
|
|
Vulkan: Make ResourceUse::serial an FastVector of Serials
In preparation for per context queue serial, this CL makes
ResourceUse::serial a FastVector of Serial. Right now we still limited
to one serial index so that it still work the same way as before. This
CL adds necessary data type and change the function names to reflect
that tracking GPU progress needs a ResourceUse object instead of a
single Serial number.
Bug: b/255414841
Change-Id: Ic60cdf5ec8da45d1821f65a55947f5c553f65737
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4034548
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
b2f55ec3
|
2022-11-14T16:07:19
|
|
Vulkan: Add memory allocation/deallocation counter
* Added a counter to the renderer object to keep track of the
memory allocations and deallocations per allocation type.
* The counters are updated with the functions onMemoryAlloc() and
onMemoryDealloc(), which can be added next to the allocation or
deallocation point.
* Currently used for buffer memory and image memory.
* Removed some of the redundant arguments from vk_helper and
suballocation functions.
Bug: b/242641395
Change-Id: I58b38f619df7bef0ba5fa3373a8db5aed0ef142c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4014164
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
71d28a9b
|
2022-11-02T13:19:20
|
|
Vulkan: Remove unused ShaderAndSerial
The serial in the ShaderAndSerial is unused. This CL removed
ShaderAndSerial and replaced with ShaderModule directly.
Bug: b/257116399
Change-Id: I50d42af7818a12888309a80423531d75135e0bfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3998747
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eaa71709
|
2022-10-14T11:47:07
|
|
Vulkan: s/ContextVk/Context in pipeline creation
With VK_EXT_graphics_pipeline_library, pipeline creation may happen on a
thread. This change prepares the interface such that only a vk::Context
is needed, instead of ContextVk.
Bug: angleproject:7369
Change-Id: Ib7e9e7e140e27a4af71bffee069c88e3d7f47dfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956935
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dbbfdd22
|
2022-10-06T13:39:20
|
|
Vulkan: Bug fix in GL_QCOM_shading_rate
Don't initialize "vkCmdSetFragmentShadingRateKHR" before
creating VkDevice as it leads to a nullptr assertion in
RendererVk::canSupportFragmentShadingRate. Separate out
instance and device function pointer initializations.
Bug: angleproject:7172
Change-Id: I55b5b41313857a2861a197f17d7f88b71aec907f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3938443
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ba3b4515
|
2022-09-15T01:06:51
|
|
Vulkan: Implement GL_ANGLE_logic_op
Enabled if the logicOp device feature is available. According to
gpuinfo, it's pretty much universal except for ARM.
Bug: angleproject:7654
Change-Id: I4808b519fdd6273b2f8c1bb17f59517eb65bfe8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898317
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
aa2a558e
|
2022-08-23T09:47:02
|
|
Vulkan: Add support for setting timestamp surface attribute
On Android the EGL wrapper handles most of the functionality required
by EGL_ANDROID_get_frame_timestamps. However if for some reason the
swapchain is recreated, the timestamp state would be lost resulting in
stuttering.
Introduce EGL_ANGLE_timestamp_surface_attribute extension that adds
support for toggling the EGL_TIMESTAMPS_ANDROID attribute of a surface.
Cache this state and recreate the swapchain accordingly.
Bug: angleproject:7489
Test: EGLSurfaceTest.TimestampSurfaceAttribute*
Test: dEQP-EGL.functional.get_frame_timestamps*
Change-Id: I3660f7137c006d904164d243a682a4ff520eabd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3753396
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
8df0c53e
|
2022-07-11T16:56:26
|
|
Vulkan: Split suballocation out into it's own file
Right now Suballocation and BufferBlock classes are in vk_utils.h, which
is included by other header files. This made it difficult to have these
two classes use variables defined in other headers. And vk_utils.h is
really designed for utilities, it isn't the best place for
bufferBlock/suballocation by definition. This CL split out suballocation
code into its own file to make future CLs much easier. No functional
change is expected other than move the code around.
Bug: b/237686097
Change-Id: I36733468b4bed152a19d9c9bca8e7459c11c3b43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3756761
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fb3e2def
|
2022-05-24T15:47:01
|
|
Extend labelObject functionality
Modify interface to fully support labelObject return codes.
Fix issues with texture implementation, including handling
deferred Vulkan object creation.
Bug: b/229105865
Change-Id: I0c64b72dd0b54642fb643ee7f5ccbb2a134c6787
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3703184
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
4b9eb4ba
|
2022-06-03T09:22:41
|
|
Optionally support vulkan_memory_allocator 3.x
Incompatible API is guarded behind a new define, ANGLE_VMA_VERSION.
This allows a soft migration for Chromium and Fuchsia, while allowing
clients like Flutter to roll to a new version that is compatible with
its revision of Skia.
Bug: chromium:1332566
Change-Id: I68cafde13e50445aa8eea2f18203143659a1c627
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3688835
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Dan Field <dnfield@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7fb021b0
|
2022-05-12T16:19:14
|
|
Reland "Add Vulkan backend support for texture labels"
This is a reland of commit 1afb80587e302e2ce9a901a69fd66e5ef98a73b6
Added check to ensure vkSetDebugUtilsObjectName fcn ptr is valid
before use. Fixes failures on mac-swangle-chromium-try-x64.
Original change's description:
> Add Vulkan backend support for texture labels
>
> Add onLableUpdate support for textures in the Vulkan backend.
>
> Bug: b/229105865
> Change-Id: Id9e5b2b81352e97b7843a63f27709739005dc2f3
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645854
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Ian Elliott <ianelliott@google.com>
Bug: b/229105865
Change-Id: I994da6db2771671c204e4ab01c69912c1be4a48f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3674296
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
28b4c378
|
2022-05-27T15:45:59
|
|
Vulkan: Pipeline creation feedback in perf counters
Bug: angleproject:5881
Change-Id: I42917cab3c97abb50a14035972a96728dcb990b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3672851
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
7ad48b84
|
2022-05-26T00:23:35
|
|
Revert "Add Vulkan backend support for texture labels"
This reverts commit 1afb80587e302e2ce9a901a69fd66e5ef98a73b6.
Reason for revert: Null-dereference crash starting here:
https://ci.chromium.org/ui/p/chromium/builders/ci/mac-swangle-chromium-x64/26323/blamelist
(see angle blamelist)
Crash reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0x0
Process uptime: 24 seconds
Thread 0 (crashed)
0 0x0
rax = 0x0000011c0113c000 rdx = 0x0000011c09094590
rcx = 0x0000000000000006 rbx = 0x0000011c0e2a0000
rsi = 0x00007ffedfc11500 rdi = 0x0000011c01378010
rbp = 0x00007ffedfc11540 rsp = 0x00007ffedfc114f8
r8 = 0x0000000000000006 r9 = 0x0000000123a6ccc4
r10 = 0x0000011c011018d0 r11 = 0x00007ffdbc1a4834
r12 = 0x0000000000000006 r13 = 0x0000011c090944b0
r14 = 0x0000011c0e34c000 r15 = 0x00007ffedfc11550
rip = 0x0000000000000000
Found by: given as instruction pointer in context
1 libGLESv2.dylib!gl::Context::objectLabel(unsigned int, unsigned int, int, char const*) + 0x156
rbp = 0x00007ffedfc116a0 rsp = 0x00007ffedfc11550
rip = 0x00000001357b38e6
Found by: previous frame's frame pointer
2 libGLESv2.dylib!_GL_ObjectLabelKHR + 0xa5
rbp = 0x00007ffedfc116f0 rsp = 0x00007ffedfc116b0
rip = 0x000000013578e7e5
Found by: previous frame's frame pointer
3 Chromium Framework!gpu::gles2::GLES2DecoderPassthroughImpl::DoBindTexture(unsigned int, unsigned int) + 0x1ea
rbp = 0x00007ffedfc11780 rsp = 0x00007ffedfc11700
rip = 0x000000011e7dcd4a
Found by: previous frame's frame pointer
Original change's description:
> Add Vulkan backend support for texture labels
>
> Add onLableUpdate support for textures in the Vulkan backend.
>
> Bug: b/229105865
> Change-Id: Id9e5b2b81352e97b7843a63f27709739005dc2f3
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645854
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Ian Elliott <ianelliott@google.com>
Bug: b/229105865
Change-Id: I5a5e00084e1320a486c43fec9d41b9ae6cb2b1db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3669657
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
|
|
1afb8058
|
2022-05-12T16:19:14
|
|
Add Vulkan backend support for texture labels
Add onLableUpdate support for textures in the Vulkan backend.
Bug: b/229105865
Change-Id: Id9e5b2b81352e97b7843a63f27709739005dc2f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645854
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
7c83a363
|
2022-05-16T22:22:44
|
|
Vulkan: Dynamic state for rasterizer discard enable
Interaction with primitives generated query are tested by those tests
added in
https://chromium-review.googlesource.com/c/angle/angle/+/2976181
Bug: angleproject:5906
Change-Id: I0ab9f54995504be770a93bf13337a5ffe20bf7eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3651582
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
891a4682
|
2022-05-12T22:32:07
|
|
Vulkan: Dynamic state for stencil test/op
Bug: angleproject:5906
Change-Id: I436c6c238a15e54919a74d2a697d1f114bb3eaf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3647207
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4e5da2d2
|
2022-05-11T13:58:07
|
|
Vulkan: Dynamic state for cull mode
Bug: angleproject:5906
Change-Id: I3d7b888e7999d4892ff71d636ea16a2edcf7a27f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3642800
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@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>
|
|
02b96848
|
2022-04-21T16:32:31
|
|
Vulkan: Add support for GL_QCOM_shading_rate
Layer GL_QCOM_shading_rate over VK_KHR_fragment_shading_rate
Test: ShadingRateQcomTest*
Bug: angleproject:7172
Change-Id: I3f040dbfad3906facd4349937fed2ce9a464b824
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3599874
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
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>
|
|
957f8297
|
2022-04-08T15:44:55
|
|
Vulkan: Change ContextVk to Context for BufferPool APIs
These APIs only needs information from Context, not ContextVk. This CL
changes to Context for better encapsulation.
Bug: b/223428306
Change-Id: I4f50aaa4065eff62ca32e9049f5a891d8814e511
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3578587
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
1b94c585
|
2022-04-10T15:09:38
|
|
Revert "Vulkan: Switch loader to new driver files env var."
This reverts commit 1f6123d55467c2af7c67405c0101a6f327b76225.
Reason for revert: Seems to break ANGLE on fuchsia loader:
https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia_arm64/1123629/overview
Original change's description:
> Vulkan: Switch loader to new driver files env var.
>
> VK_DRIVER_FILES replaces VK_ICD_FILENAMES.
>
> Bug: angleproject:7095
> Change-Id: I949ac9a8f375240b6c6068825eccc645f81b0185
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522821
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bug: angleproject:7095
Change-Id: I5b7e094b08d76b9c14adb4acb3b59e4cfb7a28fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580980
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
1f6123d5
|
2022-03-14T11:40:05
|
|
Vulkan: Switch loader to new driver files env var.
VK_DRIVER_FILES replaces VK_ICD_FILENAMES.
Bug: angleproject:7095
Change-Id: I949ac9a8f375240b6c6068825eccc645f81b0185
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522821
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
fe28a429
|
2022-03-30T15:34:49
|
|
Vulkan: Create buffer for vertex array if robust enabled
If robust access is enabled (i.e., chrome), we want to ensure vulkan
driver never access beyond that OpenGL buffer boundary. But with
suballocation from BufferPool, we are using the same VkBuffer for all
suballocations from the same BufferBlock. this combined with the fact
that there is no size information in the vkCmdBindVertexBuffers, it
means vulkan driver can not properly ensure vertex access not go beyond
the subrange. It can only guarantee not access beyond the entire
VkBuffer size. This CL creates a dedicated vkBuffer object and bind it
to the suballocation of the vkDeviceMemory so that vulkan driver will
see the exact range of the subrange instead of entire buffer. Since we
may allocated more memory than actual requested size and the extra
paddings are not zero filled , user size is used to create this
vkBuffer. This is only enabled when robust access is enabled.
This CL also ported webgl conformance test
out-of-bounds-index-buffers.html and out-of-bounds-array-buffers.html
to end2end test.
Bug: chromium:1310038
Change-Id: I3499ae600028149b1039082e5011232b3e4e5e80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3553940
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@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>
|
|
9637185c
|
2022-03-10T15:38:13
|
|
Add ForceGPUSwitch to EGL_ANGLE_power_preference
eglHandleGPUSwitch() does not work with WebKit sandbox profile.
The root cause is that we do not know the
primary display, and as such we do not know which GPU drives this.
Add eglForceGPUSwitchANGLE(display, gpuIDHigh, gpuIDLow).
This lets the caller figure out the GPU in another process. Then
the caller can just set the GPU in the sandboxed process.
Add tests that are disabled by default until the runner and the
infrastructure supports running the tests with automatic switching
enabled.
Bug: angleproject:7092
Change-Id: I316ee431156596effbdb89659a5e24291719a204
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516274
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
|
|
e8ee847d
|
2022-02-23T12:25:39
|
|
Vulkan: Add UpdateDescriptorSetsBuilder.
This helper class encapsulates the vkUpdateDescriptorSets caching.
As part of the refactor, we switch passing a ContextVk to passing
a vk::Context with some mutable variables. This helps encapsulate
ContextVk. Since we use the perf counters in many places, this CL
moves the perf counters to vk::Context, so we can access them
everywhere.
Refactoring change only.
Bug: angleproject:6776
Change-Id: Id529962b2f425bece6f9b3bd0cd1698c692e58cb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484980
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
8d966f7d
|
2022-02-08T11:05:09
|
|
Vulkan: Simplify SubAllocation data types.
We no longer need to bootstrap on the wrapper classes because we
use a separate garbage list. This simplifies the code for the
allocation tracking considerably. Also we remove a few mutable
accessor to fortify our OOP design.
(Credit to Jamie since it is splited from his CL)
Bug: angleproject:6980
Change-Id: I2025ec4d141531273e824bb586957a38efc30be1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469715
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
419bca3f
|
2022-01-19T18:22:56
|
|
Vulkan: Use Vulkan API directly for BufferPool's buffer allocation
There are two motivations in this CL. 1) There are two layers of
suballocator right now. BufferPool provides first suballocation. It
tries to allocate from one of the buffers in the pool. If that failed,
it try to create a new BufferBlock (i.e, a VkBuffer). Right now that
calls into VMA which creates another pool to allocate a buffer. We
really only need one layer of suballocation. And 2) Because we uses VMA
to do actual VkBuffer allocation, we have to use Allocator object. But
VMA can not handle external buffers, so we end up having a BufferMemory
class just to handle two different cases. This CL attempts to clean up
this by let ANGLE calling into vulkan driver directly for the actual
buffer allocation, just like we did for VkImages. By doing so, we able
to remove BufferHelper::mMemory data member as well as BufferMemory
class all together. External memory is now treated exactly the same at
BufferHelper.
Bug: b/205337962
Change-Id: I7c183ab0fd7d9aceb6cf416b0214c300798bc010
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3402740
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
d6dd0cb5
|
2021-09-21T15:26:13
|
|
EGL: EGL_KHR_lock_surface3 backend
Add vulkan implementation
Add test: EGLLockSurface3Test
Test: angle_end2end_test --gtest_filter=EGLLockSurface3Test
Bug: angleproject:6062
Change-Id: Id5bfe37895b550392d11e9e9cc1262c1f0288c42
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3174323
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a83f7e91
|
2022-01-19T14:14:16
|
|
Vulkan: inline some of the BufferSuballocation APIs
These are simply get* calls and frequent used ones. The measurement I
have on Pixel6 shows there is 0.01ms out of 2.28ms on CPU overhead with
asphalt_8 app trace measured with --minimize-gpu-work.
Bug: b/205337962
Change-Id: I746a1ccc67c589d1aba25495601ad874ddc034a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3403159
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
1b5efe51
|
2022-01-19T14:04:35
|
|
Vulkan: Rename SubAllocation to Suballocation
Simply a name change to make it one word. No functional change is
expected.
Bug: b/205337962
Change-Id: Ic505536821f18141c0d036b13d9aa81554a8bafd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3403158
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
15439f8e
|
2022-01-13T14:58:41
|
|
Vulkan: Remove BufferMemoryAllocator
This class was added in crrev.com/c/3036256. The original intention was
to use VMA to implement buffer suballocation. Because VMA itself does
not support buffer suballocation, I was thinking to use VMA custom pool
to implement it and this class was intended to wrap all these
functionality into one class. But now thanks to Jamie's effort, VMA
exported generic suballocation algorithm via API and we have implemented
buffer suballocation using that virtual allocation API. So this
BufferMemoryAllocator class is really no longer useful. This CL mostly
reverted that CL and flatten out the buffer allocation call to directly
use VMA's Allocator object.
Bug: b/205337962
Change-Id: I0336056e440f39e2ff49fee8e0ff4b1f355cefe4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244022
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
0e49a3dd
|
2022-01-04T11:23:54
|
|
Vulkan: Add std::move support for BufferHelper
There are needs to support std::move for BufferHelpers in other CLs (See
crrev.com/c/3352489). Without this support, we can not store
BufferHelper into std::vector. This CL adds move support for
BufferHelper class.
Bug: b/208323792
Change-Id: I93f79490715750abc1bcedd41b683ad0c2460ebb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3366855
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
bc9d2d7d
|
2021-12-07T16:16:47
|
|
Vulkan: Consolidate BufferHelper's code paths into one
There are cases that BufferHelper may not sub-allocate from the pool.
For example, when buffer is created from external memory. Right now we
have two different code paths in the BufferHelper object and checking if
suballocation object is valid or not and pick different code path. This
CL consolidates both code path into one by making non sub-allocated case
also creates BufferSUbAllocation object and owns a BufferBlock object.
Bug: b/205337962
Change-Id: Iac82bdb0b69d424e4147b52d458ced6274e106a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3322100
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
eca427b2
|
2021-12-20T10:55:41
|
|
Vulkan: Add mutex to protect mVirtualBlock
mVirtualBlock could be accessed from multiple thread when
asyncCommandQueue is enabled, where the free call could come from the
submission thread. This CL adds a mVirtualBlockMutex in BufferBlock and
always take the lock when mVirtualBlock is been accessed.
This CL also adds ConditionalMutex class for the general usage that a
mutex is only used based on a boolean.
Bug: angleproject:6840
Change-Id: Ib647b4ff12ebfc08f2a70192d39f16e15a1fc5f5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3350798
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@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>
|
|
24241724
|
2021-11-22T13:26:53
|
|
Reland: Vulkan: Use vkResetQueryPoolEXT when available
This is a reland of 97aa5187ed164f1e9a22b64c966f2a747f651bfb
Original change's description:
> ANGLE currently uses vkCmdResetQueryPool to reset a query pool. As
> reported by Arm, this can cause GPU bubbles. It is better to use
> vkResetQueryPoolEXT() when available (either by Vulkan 1.2 or by the
> VK_EXT_host_query_reset extension).
>
> Bug: angleproject:6692
> Change-Id: I650d7d0f55bdf6587b75be43cc7bed2dc3eb935a
> Reviewed-on:
> https://chromium-review.googlesource.com/c/angle/angle/+/3294061
> Commit-Queue: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
Bug: angleproject:6692
Change-Id: Idff87977bd39ccd1d05684e48929f4cd3fa733c7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3313382
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
a5e391d7
|
2021-11-19T17:35:06
|
|
Add GL_ANGLE_vulkan_image extension
glAcquireTextures & glReleaseTextures are added for sharing
texture ownership with an external API.
Bug: chromium:1264439
Change-Id: If46d8d230b4f611768b5ff1187674509e42f01e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3293921
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
2fa1adf0
|
2021-11-24T18:29:13
|
|
Revert "Vulkan: Use vkResetQueryPoolEXT when available"
This reverts commit 97aa5187ed164f1e9a22b64c966f2a747f651bfb.
Reason for revert: This apparently caused crbug.com/1273344
Original change's description:
> Vulkan: Use vkResetQueryPoolEXT when available
>
> ANGLE currently uses vkCmdResetQueryPool to reset a query pool. As
> reported by Arm, this can cause GPU bubbles. It is better to use
> vkResetQueryPoolEXT() when available (either by Vulkan 1.2 or by the
> VK_EXT_host_query_reset extension).
>
> Bug: angleproject:6692
> Change-Id: I650d7d0f55bdf6587b75be43cc7bed2dc3eb935a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294061
> Commit-Queue: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
Bug: angleproject:6692
Change-Id: I70d5eeb0b98f016fd262935194f8f4abee2a72b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3300309
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
8b60855b
|
2021-09-15T15:16:10
|
|
EGL: implement EGL_KHR_mutable_render_buffer
Pass render buffer mode change to WindowSurfaceVk.
On mode change trigger OUT_OF_DATE. Then in CreateSwapchain,
if new mode, set the Presentation mode and the Image count.
OffscreenSurfaceVk ignores mode change.
Add MUTABLE_RENDER_BUFFER_BIT to GenerateDefaultConfig.
Test: dEQP-EGL.functional.mutable_render_buffer.*
Bug: angleproject:3966
Change-Id: I7b59708514bcda10f8d45ce5f9528aa840fcccfa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3171822
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
97aa5187
|
2021-11-22T13:26:53
|
|
Vulkan: Use vkResetQueryPoolEXT when available
ANGLE currently uses vkCmdResetQueryPool to reset a query pool. As
reported by Arm, this can cause GPU bubbles. It is better to use
vkResetQueryPoolEXT() when available (either by Vulkan 1.2 or by the
VK_EXT_host_query_reset extension).
Bug: angleproject:6692
Change-Id: I650d7d0f55bdf6587b75be43cc7bed2dc3eb935a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294061
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
5f755c29
|
2021-11-17T16:29:37
|
|
Vulkan: Lock around handle counter.
TSAN showed we could have a data race when multiple threads
were releasing objects because of the singleton handle
counter.
Bug: angleproject:6714
Change-Id: I23b5d343bec421a663198e7efc30c78dab2bde8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3288328
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
421dbf20
|
2021-10-26T19:06:19
|
|
Revert "Vulkan: Use different strategy for buffer memory allocation"
This reverts commit 0dbe308d91a3526e28fecd9014d873c649f4ef71.
Reason for revert: crbug.com/1253325
Original change's description:
> Vulkan: Use different strategy for buffer memory allocation
>
> This CL uses different memory allocation strategy based on the requested
> size. If the requested size exceeds 1M, we use dedicated memory
> allocation to avoid memory waste associated with the sub-allocator.
> Otherwise we uses VMA's sub-allocator pool. This CL creates two sets of
> customized pool so that we uses different allocation strategy for each
> set of pool: the small pool uses buddy algorithm which favors speed over
> memory and large pool uses default algorithm that favors memory saving
> over speed. This CL also replaces vmaFindMemoryTypeIndexForBufferInfo
> with vmaFindMemoryTypeIndex to avoid create and destroy VkBuffer object
> just try to find memoryTypeIndex.
>
> Bug: b/195588159
> Change-Id: I2bddbfffd77ba2ce6b9389d83a31051c4b748c4d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939490
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
Bug: b/195588159
Change-Id: I2c8fe8cb2930d16f5212570d32be68e7c6a6e5f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3244258
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
0dbe308d
|
2021-07-16T14:26:20
|
|
Vulkan: Use different strategy for buffer memory allocation
This CL uses different memory allocation strategy based on the requested
size. If the requested size exceeds 1M, we use dedicated memory
allocation to avoid memory waste associated with the sub-allocator.
Otherwise we uses VMA's sub-allocator pool. This CL creates two sets of
customized pool so that we uses different allocation strategy for each
set of pool: the small pool uses buddy algorithm which favors speed over
memory and large pool uses default algorithm that favors memory saving
over speed. This CL also replaces vmaFindMemoryTypeIndexForBufferInfo
with vmaFindMemoryTypeIndex to avoid create and destroy VkBuffer object
just try to find memoryTypeIndex.
Bug: b/195588159
Change-Id: I2bddbfffd77ba2ce6b9389d83a31051c4b748c4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939490
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
22ecd454
|
2021-07-19T17:28:05
|
|
Vulkan: Move BufferMemory class from vk_helpers.h to vk_utils.h
In preparation for the StagingBuffer may also use BufferMemory, this CL
moves the class to vk_utils.h so that it can be used by any class
without create kinks on header file inclusion.
Bug: b/195588159
Change-Id: I97ab136be691322fe6284fd1b4b7336fdf1f904f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3040106
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
8ef1b2a2
|
2021-07-15T15:27:15
|
|
Vulkan: Add BufferMemoryAllocator class
BufferMemoryAllocator class will be responsible for memory allocation
for vkBuffers. The original Allocator class remains the wrapper for
vmaAllocator.
Bug: b/195588159
Change-Id: I26d016e2f8d13ba459d0aa0bd4e1ebf4d0d48251
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036256
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
2f1d503b
|
2021-09-16T21:49:14
|
|
Vulkan: Fix Vulkan secondary command buffers
This change abstracts initialization, begin/end, reset and recycle of
command buffers such that both Vulkan and ANGLE secondary command
buffers are supported.
Bug: angleproject:6100
Change-Id: I8c79764ac98b599fda08fe45cf8c4f0a6573f0f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987873
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dc99db91
|
2021-09-16T21:45:35
|
|
Vulkan: Allow Vulkan secondary CBs to count their commands
This is used by render pass related code to determine if some command
has been issued since a previous event. With ANGLE
SecondaryCommandBuffer, the memory pointer where the commands are being
written to are used for this purpose. For Vulkan secondary command
buffers the code simply increments a counter.
Bug: angleproject:6100
Change-Id: I85320f8453bd3325793df85aabde3d42b1eeb22a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3167214
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2d79918f
|
2021-09-16T16:43:53
|
|
Vulkan: Pass command pool around
Preparatory work for re-enabling support for Vulkan secondary command
buffers. The command pool being passed around is not yet used.
Additionally, the work to allocate, initialize, reset and recycle
command buffers has been refactored to a helper class for better
abstraction.
The CommandBufferHelper class now holds a pointer to the pool it was
allocated from for clean up. Each ContextVk has its own command pool,
where Vulkan secondary command buffers are allocated from. The command
pool that CommandProcessor had was unused and is removed by this change.
Bug: angleproject:6100
Change-Id: I0d4fa6a76ef06e88779145ffe9c613518a8eb390
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3167213
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
458389f2
|
2021-09-02T22:41:40
|
|
Vulkan: Support Linux dma-bufs
This change adds support for EGL_EXT_image_dma_buf_import and
EGL_EXT_image_dma_buf_import_modifiers on top of Vulkan's
VK_EXT_external_memory_dma_buf and VK_EXT_image_drm_format_modifier.
Bug: angleproject:6248
Change-Id: I581987f88e9ddcf351dc721f499f63912dca05f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3145610
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cf24931a
|
2021-08-17T10:48:23
|
|
Vulkan: Add ImageHelper::getActualFormat()
This is preparation for future CLs. In the future vk::Format may not
tell you what actual format is. This CL adds a new method of
ImageHelper::getActualFormatID() and ImageHelper::getActualFormat() so
that we can use these two APIs and avoid using vk::Format, thus reduce
reliance on vk::Format.
Bug: b/196456356
Change-Id: Ic50e664e033feb5e066f40269c33cffe96024172
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3100319
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
971ba359
|
2021-06-23T16:45:33
|
|
Add angle::BitMask for creating bit masks
angle::BitMask(n) implements the common pattern of angle::Bit(n)-1.
Bug: angleproject:6048
Change-Id: Icd56ef1504804add59d0804a7249b3035c96f9c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2984099
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
851fbedb
|
2021-06-10T21:27:01
|
|
Vulkan: Switch viewport and scissor to dynamic state
Heavily based on http://crrev/c/1316888
Some apps are creating a large number of viewport combinations and
are running out of graphics memory. This CL drops their graphics
pipeline use from tens of thousands to tens.
Performance testing shows little impact to application traces.
Bug: b/190026813
Bug: angleproject:3143
Change-Id: Ib7415be1128f8fedae4a7ca72e067b2815201223
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954925
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
84d22197
|
2021-04-26T17:11:27
|
|
Vulkan: Add device local fallback in findCompatibleMemoryIndex(...)
When finding a compatible memory index for an external buffer,
we need to have a fallback path that requires just the
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT property.
Bug: angleproject:5909
Change-Id: Id3faffb3e357be2e5e6f5fce9e64f0f2889d199a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2862561
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
80a4223e
|
2021-01-28T17:51:31
|
|
Vulkan: Handle changes to viewport when clip origin is modified
The expected view port is different from current viewport translation
when the clip origin is the upper left. So now, it has four different
view port translations based on clip origin and y-flip of framebuffer.
- add query and state management for EXT_clip_control
- add dirty bit for clip control
- change viewport, scissor and cull face when clip origin changes
Bug: angleproject:5471
Tests: dEQP-GLES2.functional.clip_control.*
Change-Id: I78dc752c3287b09f25496034e0d0d2724138010c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615863
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
53105997
|
2021-01-28T07:42:15
|
|
Initialize some missing vulkan function pointers
Those methods are used by VMA. However VMA can get those methods
by itself, if null function pointers are provided for creating
the VMA. But it will cause problem, when ANGLE & Chromium are
sharing one VMA implementation, since the VMA implementation
in chromium will be built with VMA_STATIC_VULKAN_FUNCTIONS=0 &
VMA_DYNAMIC_VULKAN_FUNCTIONS=0.
Bug: chromium:1170339
Change-Id: I5bf435698e4e361bfa7a6afce84390ccc4355b53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2655795
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2e9706d8
|
2021-01-08T17:29:42
|
|
Vulkan: Use angle::FormatID instead of VkFormat.
This change switches the internal enums we pass around from VkFormat
to FormatID. The end goal of the refactor is to allow the Vulkan
back-end to store packed tables indexed by FormatID. Because VkFormat
has large gaps in its enum space we'd otherwise need to use unordered
data structures like unordered_map.
The change removes the redundant VkFormat storage from vk::Format and
uses a new table query to return the VkFormat that 1:1 matches an
angle::FormatID. We also include a reverse mapping for use with native
Vulkan get functions for Android.
Also moves sRGB conversion functions into renderer_utils. A couple
sRGB formats that don't exist in GL are no longer handled by the sRGB
conversion functions. These formats should be extremely rare.
Bug: angleproject:5438
Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
e91097bf
|
2020-12-29T14:05:56
|
|
Vulkan: Clean up "actual"/"intended" naming.
Clarifies that the GL internal format is an "intended" format
and the Vulkan formats are "actual" formats. This makes all the format
fields use the same consistent naming pattern.
Bug: angleproject:5438
Change-Id: I935a49895109e9e06eae5ef98d5614dfd1128ff8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605728
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b35a468a
|
2020-12-04T12:14:37
|
|
Vulkan: Support geometry/tessellation primitive topologies
Bug: angleproject:5406
Change-Id: Ifb7553e87164c204353e1ed94b8d64f5fb4b7206
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2574822
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a5da17cd
|
2020-11-26T17:09:37
|
|
Vulkan: Remove vk:: inside namespace vk
Bug: angleproject:5404
Change-Id: I51df1ad69a65b17621a3cbe4e5d55621cc9ae6ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562683
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f197ebac
|
2020-11-16T15:16:56
|
|
Vulkan: Add EXT_external_buffer support
Addition of buffer support for external memory
Also adds new end2end tests for these usecases
* SubData update
* map/unmap buffer
* dispatch compute with external buffer
Bug: angleproject:5073
Test: ExternalBufferTestES31.*Vulkan
Change-Id: Ib3cccaca77b76830effe49d3731782552e7424ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525105
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9e7f08fc
|
2020-11-06T16:55:51
|
|
Vulkan: Fix incorrect reordering of barriers
Take the following situation, a simple copy from image to buffer:
ANGLE_TRY(contextVk->onBufferTransferWrite(buffer));
ANGLE_TRY(contextVk->onImageTransferRead(aspectFlags, image));
CommandBuffer &commandBuffer = contextVk->getOutsideRenderPassCommandBuffer();
commandBuffer.copyImageToBuffer(imageHandle, layout, bufferHandle, 1, regions);
Both `onBufferTransferWrite` and `onImageTransferRead` may flush either
the outsideRP or insideRP command buffers. If buffer is not previously
used, but image is used:
- onBufferTransferWrite: buffer usage is recorded in outsideRP1
- onImageTransferREad: outsiderRP1 is flushed, outsideRP2 is started
- copyImageToBuffer: recorded on outsideRP2, but buffer usage not
recorded there
- A following command that uses the buffer and requires barrier doesn't
close outsideRP2 as it believes it was not used there
Bug: angleproject:5319
Change-Id: Ib8994083fbc21969a538cda3784adee57b089415
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2523388
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
16102e8b
|
2020-10-17T01:15:05
|
|
Reland "Vulkan: Fold deferred clears into current clears"
This reverts commit 37c400146e59f718b516eb58e16fa53c8a88bf21.
Reason for revert: Need to clear the package cache when bisecting.
Original change's description:
> Revert "Vulkan: Fold deferred clears into current clears"
>
> This reverts commit e416c92a81c9ef01d633ec5c05e81c2551b6c5d6.
>
> Reason for revert: Reverted parent:
> https://chromium-review.googlesource.com/c/angle/angle/+/2481612
>
> Original change's description:
> > Vulkan: Fold deferred clears into current clears
> >
> > If there are clears prior to a glClear() call, those clears were
> > flushed (starting a new render pass) and then the clear call's clears
> > would be applied (essentially modifying the loadOps of said render
> > pass).
> >
> > The main downside of the above is that the current glClear() clears
> > don't get a chance to be deferred. This was observed in Chrome which
> > clears an attachment with an emulated format, then switches
> > framebuffers.
> >
> > Additionally, if the render pass had already been started, the deferred
> > clears could have become inlined instead of breaking the render pass.
> > Although, it's unlikely for there to be deferred clears when the render
> > pass is already open.
> >
> > This change first identifies which clears need to go through the draw
> > path (scissored, masked or as workaround for driver bug). It merges the
> > rest of the clears (that don't need the draw path) with the deferred
> > clears. It then checks deferred clears and applies them by either:
> >
> > - vkCmdClearAttachments if mid RP
> > - Start a new render pass and use loadOps, if any draw-based clear needs
> > to follow.
> > - Modify current RP loadOps / defer the clear
> >
> > Afterwards, the draw-based clears are applied.
> >
> > Bug: angleproject:4836
> > Change-Id: Id4992c78983b199734508c9d4bb18ed3195c91ec
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455167
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: I85733b3594409df9b96e3d5b34933522c97c42cf
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:4836
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481613
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because this is a reland.
Bug: angleproject:4836
Change-Id: I702cd510f39ee46feab27d4efbf61ae5da10d4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481856
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
37c40014
|
2020-10-16T22:19:20
|
|
Revert "Vulkan: Fold deferred clears into current clears"
This reverts commit e416c92a81c9ef01d633ec5c05e81c2551b6c5d6.
Reason for revert: Reverted parent:
https://chromium-review.googlesource.com/c/angle/angle/+/2481612
Original change's description:
> Vulkan: Fold deferred clears into current clears
>
> If there are clears prior to a glClear() call, those clears were
> flushed (starting a new render pass) and then the clear call's clears
> would be applied (essentially modifying the loadOps of said render
> pass).
>
> The main downside of the above is that the current glClear() clears
> don't get a chance to be deferred. This was observed in Chrome which
> clears an attachment with an emulated format, then switches
> framebuffers.
>
> Additionally, if the render pass had already been started, the deferred
> clears could have become inlined instead of breaking the render pass.
> Although, it's unlikely for there to be deferred clears when the render
> pass is already open.
>
> This change first identifies which clears need to go through the draw
> path (scissored, masked or as workaround for driver bug). It merges the
> rest of the clears (that don't need the draw path) with the deferred
> clears. It then checks deferred clears and applies them by either:
>
> - vkCmdClearAttachments if mid RP
> - Start a new render pass and use loadOps, if any draw-based clear needs
> to follow.
> - Modify current RP loadOps / defer the clear
>
> Afterwards, the draw-based clears are applied.
>
> Bug: angleproject:4836
> Change-Id: Id4992c78983b199734508c9d4bb18ed3195c91ec
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455167
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: I85733b3594409df9b96e3d5b34933522c97c42cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4836
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481613
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
e416c92a
|
2020-10-06T23:29:02
|
|
Vulkan: Fold deferred clears into current clears
If there are clears prior to a glClear() call, those clears were
flushed (starting a new render pass) and then the clear call's clears
would be applied (essentially modifying the loadOps of said render
pass).
The main downside of the above is that the current glClear() clears
don't get a chance to be deferred. This was observed in Chrome which
clears an attachment with an emulated format, then switches
framebuffers.
Additionally, if the render pass had already been started, the deferred
clears could have become inlined instead of breaking the render pass.
Although, it's unlikely for there to be deferred clears when the render
pass is already open.
This change first identifies which clears need to go through the draw
path (scissored, masked or as workaround for driver bug). It merges the
rest of the clears (that don't need the draw path) with the deferred
clears. It then checks deferred clears and applies them by either:
- vkCmdClearAttachments if mid RP
- Start a new render pass and use loadOps, if any draw-based clear needs
to follow.
- Modify current RP loadOps / defer the clear
Afterwards, the draw-based clears are applied.
Bug: angleproject:4836
Change-Id: Id4992c78983b199734508c9d4bb18ed3195c91ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455167
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
d9a88d63
|
2020-09-28T17:58:31
|
|
Vulkan: Support OES_texture_cube_map_array extension
Add support for GL_OES_texture_cube_map_array to the Vulkan backend
if the underlying ICD supports creation of of cube array ImageViews
Bug: angleproject:3584
Test: dEQP-GLES31.functional.fbo.color.texcubearray.*
Change-Id: I636cbf347d718abfc1600119b312578370b8e02e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437989
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
463e02e6
|
2020-09-29T14:46:46
|
|
Vulkan: Constants for unpacked D/S attachment indices
kClearValueDepth/StencilIndex is renamed and repurposed in other places
where depth and stencil are placed at indices MAX_DRAW_BUFFERS and
MAX_DRAW_BUFFERS+1.
Bug: angleproject:4836
Change-Id: Idaeff5017d944d786a5f388c4f1ce3a4e3fe9b7d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437505
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
fc4e3cf2
|
2020-09-23T08:41:18
|
|
Vulkan: fix ASSERT issue in ResourceSerialFactory
Refactor ResourceSerialFactory::issueSerial so that the ASSERT is valid
in a threaded environment. Otherwise it's possible for another thread to
increment mCurrentUniqueSerial in the middle of the ASSERT.
Bug: b/168744561
Change-Id: I7208e8be91b21c50ad4a260d02d69f5b7dab2efe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426685
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
a76b6836
|
2020-09-17T22:40:42
|
|
Vulkan: Support MSRTT depth/stencil resolve
VK_KHR_depth_stencil_resolve is used by this change to resolve
depth/stencil multisampled-render-to-texture renderbuffers.
This extension is not widely supported yet. If it's not present, the
depth/stencil resolve operation is silently ignored and the renderbuffer
acts as a normal multisampled one. This is not correct, but our primary
user (Chrome), and most applications don't care for the resolved
depth/stencil data. In fact, it's recommended for the depth/stencil
attachment to be invalidated after rendering.
Exposing EXT_multisampled_render_to_texture even in the absence of
depth/stencil resolve allows the majority of the applications to still
take advantage of MSRTT color attachments.
Bug: angleproject:4836
Change-Id: I6ba4187344a0c9330d2c77bdc5e2c6fc5483c299
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2417645
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
22d30378
|
2020-09-15T23:19:48
|
|
Vulkan: Change VK suffix to Vk
For consistency with the rest of the backend. Level index variables
were using the VK suffix while color index variables used Vk.
Bug: angleproject:4881
Change-Id: I0c2799da34cdfe19cb04adbebba042ac8876af96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2413155
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a0d048a4
|
2020-08-27T12:03:02
|
|
Vulkan: Fool-proof usage of GL and VK level indices
Using boxed types, this change allows the compiler to catch errors when
a level index in one space (e.g. GL) is mistakenly used in another space
(e.g. VK).
This change uncovered a number of bugs due to such mistakes which are
fixed.
Mistakes are still possible when the index is explicitly extracted, for
example to be given to a Vulkan command, or when it's created, for
example when retrieved from gl::ImageIndex::getLevelIndex. Future work
can include using gl::LevelIndex in gl::ImageIndex directly to alleviate
the latter at least.
Bug: angleproject:4880
Change-Id: I6427c68c3bc096f771402f51c8554d8171758aa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380232
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
78d10017
|
2020-08-16T16:13:59
|
|
Vulkan: Enable VK_KHR_bind_memory2 extension
Don't assume support for VK_KHR_bind_memory2,
enable the extension, if supported, during device creation.
Also initialize all required extension functions for the
memory allocator.
Bug: angleproject:4966
Change-Id: I878939fb3324723675a2b7dec18ab453b2a9fc77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2359529
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d201ed8b
|
2020-08-02T16:29:35
|
|
Vulkan: Track used Images in RenderPass.
Adding a simple ImageSerial tracking map in our RenderPass allows us
to know when we do or do not need to close the RenderPass on a new
Image access. This simple tracking scheme improves Manhattan
performance by up to 25% on Android. The improved perf comes from
reducing our RenderPass count (23->18 RenderPasses in our capture
scene).
Adds a FastUnorderedSet class to manage the used RP Image serials.
Updates the Query helpers to explicitly flush the RP before inserting
queries.
Bug: angleproject:4911
Change-Id: I0c34fc8e307514ebdf3e81e08d8e5aedb70ebe8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334346
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
91a03bd4
|
2020-08-03T23:24:31
|
|
Vulkan: Fix render-to-texture simultaneously bound to two FBOs
If a texture is simultaneously attached to two FBOs, one where it's a
normal texture and another where it's multisampled-render-to-texture,
different render targets must be created for it.
If a texture is simultaneously attached to two FBOs, both as
multisampled-render-to-texture but with different sample counts, two
implicit multisampled images need to be created as well as different
render targets.
Bug: angleproject:4913
Change-Id: I584ba327e4cb2099ef62f86f5d88719dc156ce13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335810
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: 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>
|
|
dcc56215
|
2020-07-19T01:12:09
|
|
Vulkan: Implement GL_EXT_multisampled_render_to_texture
This change allows the use of resolve attachments in the Vulkan backend.
GL_EXT_multisampled_render_to_texture is implemented using this feature.
The infrastructure for specifying resolve attachments is designed with
eventual support for GL_EXT_multisampled_render_to_texture2 in mind as
well as optimizations to glBlitFramebuffer() and multisampled
backbuffers.
Proper support for glRenderbufferStorageMultisampledEXT is still missing
from this change. All tests use this for the depth/stencil attachment
and don't read back the data. Currently, the depth/stencil attachment
is created as a normal multisampled image.
Bug: angleproject:4836
Change-Id: I110a7f63312ae61a657b6094adf7d97c92bd5843
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2304170
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
8adc5469
|
2020-07-02T10:15:17
|
|
Vulkan: Generate mipmap in compute
An initial implementation based on AMD's FFX SPD (Single Pass
Downsampler).
Apart from requiring STORAGE_IMAGE support for the image format, the
following limitations are in place due to FFX SPD:
- Image must be 2D or 2D array (including cube maps)
- Image must be single-sampled
The following _can_ be supported, but not yet implemented:
- sRGB formats
- Integer formats
- depth/stencil formats
Bug: angleproject:4551
Change-Id: Ibc4d5cea701cca31e55e3d651540872bbd3b473f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278713
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d8ce865b
|
2020-07-19T00:20:17
|
|
Vulkan: Make room in RenderPassDesc for resolve attachments
Data in RenderPassDesc is packed better to make room for resolve
attachments (9 bits made available; 8 for color and 1 for
depth/stencil).
mColorAttachmentRange contains values in [0, 8). The right side of the
range is made inclusive (i.e. [0, 7]) so it will fit in 3 bits.
The number of samples is always a power of 2, and below 128 (for the
foreseeable future), so its log is stored instead in 3 bits.
This change doesn't add support for resolve attachments yet, but is
split off the one that does to simplify it.
Bug: angleproject:4836
Change-Id: I2856286d5239499d0ab0c78b8154881c003309bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2306515
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
f61272fb
|
2020-06-17T11:38:37
|
|
Add support for VK_KHR_sampler_ycbcr_conversion
This adds ability for applications to import Android Hardware Buffers
(AHBs) as OpenGL images which in turn can be sampled from and/or
written.
This was specifically tested with the common use case of importing a
buffer created by an media decoder and using that as a texture source to
include that video content on the screen. Tested with:
- Angry Birds 2 video player (for ads) requires YUV conversion.
- Basic Media Decoder example:
https://github.com/android/media-samples/tree/master/BasicMediaDecoder
Bug: b/155487768
Change-Id: I9255450f81aa4daa2aace7205d4f6c3f225abcca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175103
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3589d9a0
|
2020-06-16T15:32:18
|
|
Add a test for generateMipmap after modify
To make sure TextureVk::syncState is called before generateMipmap.
Bug: angleproject:4551
Change-Id: Ibce0738b72fc81270e07617f04ffee57f1c8ed20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248209
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
6cb8345f
|
2020-06-17T23:22:57
|
|
Vulkan: Non-zero memory initialization for all images
This was only implemented for single-level, single-layer, single-sample
color images. This change implements clear for all images.
Additionally, the move to VMA broke the initialization of the staging
buffer, so even for the supported case, the image was being initialized
with uninitialized data.
Bug: angleproject:4092
Bug: angleproject:4551
Change-Id: Ic2eee3f8454a93f1bcf3ca725afabcdc693047e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2249376
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b50541b2
|
2020-01-14T09:07:03
|
|
Vulkan:Adding key perf trace markers
Adding trace markers in performance-critical functions.
Primary areas of interest are command buffer processing
and cleanup and memory mapping.
Bug: b/156403378
Change-Id: Icba53024771711d79f7eee7085bf4dae0e033e63
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002689
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
b947498b
|
2020-05-28T13:06:13
|
|
Vulkan: Clean up VMA wrapper classes.
Make these more consistent with the rest of the wrapper classes.
Also handle some VkResult errors that were being ignored.
Will pave the way for better handling of buffer allocation error
conditions.
Bug: chromium:1086532
Change-Id: Idc5b3f0e2945b1f44f152d33e8cc572f83a6b658
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219136
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
|
|
d705f18f
|
2020-05-11T13:53:13
|
|
Vulkan: Add immediate scissored clears.
This allows us to avoid using draw commands with pipelines for
scissored clears. This prevents some tests from generating
large numbers of VkPipelines.
Bug: angleproject:4517
Bug: angleproject:4617
Change-Id: Id4a44000078098a60aa89233cfef30b75727d108
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2194473
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
d657e1d7
|
2020-04-24T13:13:18
|
|
Vulkan: Defer framebuffer clears.
This works by storing the deferred clears in the ImageHelper's staging
buffers. We apply the deferred clears onto the RenderPass right before
we begin to draw. Storing the clears in the ImageHelper solves problems
where we clear GL Textures in a Framebuffer and then unbind the
Textures and sample from them. Or do other commands like CopyTexImage.
Note that because the staging buffer clears only handle full-image
clears we need to immediately apply some scissored clears where before
we would use the RP. This should be a pretty rare occurrence and it is
possible to optimize that in the future.
Reduces the RenderPass count in the Manhattan "frame 10" trace from max
22 to max 20. May improve perf slightly on Android or may have effects
too small to measure. Should not regress performance.
Bug: angleproject:4517
Change-Id: I02150d531022afb903f1058f070937ec6337bd88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2142711
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3cb9c4be
|
2020-03-13T13:56:47
|
|
Statically link vulkan-loader on Mac
Disable angle_shared_libvulkan on Mac since we are the only client.
Re-add codepaths to support this.
Bug: angleproject:4477
Change-Id: Ie128c83adaae741636541bbfd6105d160d874a8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2102954
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|