|
25390156
|
2025-08-21T00:13:19
|
|
Suppress unsafe buffers on a file-by-file basis in src/ [1 of N]
In this CL, we suppress many files but stop short of actually
enabling the warning by not removing the line from the
unsafe_buffers_paths.txt file. That will happen in a follow-on
CL, along with resolving any stragglers missed here.
This is mostly a manual change so as to familiarize myself with
the kinds of issues faced by the Angle codebase when applying buffer
safety warnings.
-- Re-generate affected hashes.
-- Clang-format applied to all changed files.
-- Add a few missing .reserve() calls to vectors as noticed.
-- Fix some mismatches between file names and header comments.
-- Be more consistent with header comment format (blank lines and
trailing //-only lines when a filename comment adjoins license
boilerplate).
Bug: b/436880895
Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b3986258
|
2025-07-14T14:47:02
|
|
Include <utility> in PoolAlloc to fix gcc builds
std::exchange needs #include <utility>.
Bug: angleproject:429513168
Change-Id: I61e323055cb70545bda883c8bcfb103dcede5136
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6734441
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
|
|
c03b2d59
|
2025-07-15T14:18:28
|
|
common: Fix include for std::exchange
This is to fix error in
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-modules-compile-fyi-rel/41761/overview
Bug: chromium:40263312
Change-Id: I4d37bd92370b80856571cdd97144b61f8477f362
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6734419
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
93b659f9
|
2025-07-04T12:35:29
|
|
Remove PoolAllocator push/pop feature
PoolAllocator would manage a stack of memory pools upon client
calling push() and pop(). This made the code unnecessarily complicated.
The feature was only used with nesting of one, to mark the memory
unused after a shader compile.
Fix by removing the push/pop feature. Instantiate PoolAllocator in
places the previous push() was and uninstantiating instead of previous
pop().
This removes the feature where the PoolAllocator would hold on to
the allocated memory in order to reuse it. This is seen as a
progression: the allocator is held by the compiler, the compiler is
held by the shader and each shader typically see only one compile.
Thus the free pages were just leaking unused until the shader was
destroyed. Instead, destructing the PoolAllocator instead of pop()
will donate the memory back to platform/OS, where it is likely
more useful.
To preserve existing Vulkan behavior, add PoolAllocator::reset()
which would mark the memory unused but leave them reserved for the
PoolAllocator.
Removes UB where PageHeader::nextPage would be accessed after
~PageHeader.
Bug: angleproject:429513168
Change-Id: I21e58b46e0887380db3a2cab5ce22f0042cfae9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6701153
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b954755f
|
2024-07-02T00:00:00
|
|
Release all memory allocated in TCompiler::compile
Ensured that single-page allocations
from compile jobs are released to OS.
Fixed: angleproject:350528355
Change-Id: I5a0d9fd7dbc065f4b4127ceecb3fd6538eb8948d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5673352
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
863d4862
|
2024-01-27T17:42:19
|
|
Work around MSAN complaint with pool allocator - Part 2
Cache a member variable accessed after destructor so MSAN doesn't
consider it having an uninitialized value.
Bug: b/314793573
Change-Id: I7cb515205ed5bf3ba52d68220866009dd04f2d08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5243114
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0beed753
|
2024-01-26T12:42:28
|
|
Work around MSAN complaint with pool allocator
Cache a member variable accessed after destructor so MSAN doesn't
consider it having an uninitialized value.
Bug: b/314793573
Change-Id: I45044e0801ae12a80301240b4de05e9cae03dcc1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5238220
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
35c44b40
|
2023-02-28T14:47:38
|
|
PoolAlloc: unpoison memory before potentially re-using it
std::vector uses special ASan annotations to catch accesses to memory
between v.data()+v.size() and v.capacity() -- which are valid memory
locations but outside the container.
A recent libc++ change [1] made these annotations work with custom
allocators as well. This caused a problem when PoolAlloc re-used memory
that previously held a std::vector with such annotations without having
run the vector's destructor.
To fix it, this change makes PoolAlloc unpoison memory when it's
returned to the allocator via the pop() method.
[1] https://reviews.llvm.org/D136765
Bug: chromium:1419798
Change-Id: I919dd7d7734b36bf770f25e096a94669703d75d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4296797
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
161668b6
|
2021-10-06T21:12:39
|
|
Refix ANGLE_DISABLE_POOL_ALLOC build
mAlignmentMask was removed in the normal path, but wasn't entirely from
this path. This change cleans that up.
Bug: angleproject:3167
Change-Id: I34474c114cd50cf94c5bc3c22ad4548414e9baac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3210627
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
9a776e89
|
2021-10-06T18:08:18
|
|
Fix ANGLE_DISABLE_POOL_ALLOC build
Broken by crrev.com/c/3206255
Fails rolling into Chromium in crrev.com/c/3208847 on
linux-libfuzzer-asan-rel and win-libfuzzer-asan-rel.
Bug: angleproject:3167
Change-Id: If5d085492dfa87120c7c24a7102161d625d68e4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3209966
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
71984bff
|
2021-10-05T14:59:26
|
|
Reduce memory waste in PoolAllocator due to alignments
Prior to this change, the PoolAllocator wasted memory in alignments.
This was due to the fact that alignment was made to the wrong values,
and they were fixed with more alignments and conservative extra space
allocations.
This change makes sure that alignment is applied once, and such that the
actual pointer that needs to be aligned is aligned, not the header that
might come before it, and that allocation size is calculated precisely.
This improves memory allocation by reducing waste, but only affects
the use of the pool in the translator, as Vulkan secondary command
buffers (the other user) use an alignment of 1 and take a different
path.
Running TracePerfTest.Run/vulkan_manhattan_10 on Linux, the total
size of allocations made by this class for the translator goes down from
466944 bytes to 376832 bytes for a ~20% improvement.
Bug: angleproject:3167
Change-Id: Ib4e6fd23ac32c8fb21810b20cd383758b8bff47f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3206255
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
1cd6708a
|
2021-10-05T10:24:35
|
|
Clean up the PoolAllocator class
Many things were unnecessarily in the header and are now moved to the
source file.
Bug: angleproject:3167
Change-Id: I52b83fdde5b6e984c5f5491c2ce050debf78f8b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3206072
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
d7aa0130
|
2021-04-26T16:56:15
|
|
Upstream Apple's direct-to-Metal backend: compile translator.
This change is meant to merge the translator changes from Apple's
direct-to-Metal backend. Taken from Kyle Piddington's CL:
https://chromium-review.googlesource.com/c/angle/angle/+/2857366/
The goal of this CL is to merge the translator code in a state that
compiles, but not to switch the Metal backend over to use this
translator backend yet.
Bug: angleproject:5505
Change-Id: I68a6354604498cd5fd1eb96c13fc56f3b38f2bd0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897536
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
|
|
6a184fe9
|
2020-05-27T20:51:52
|
|
Fix use_libfuzzer build
Broken by https://chromium-review.googlesource.com/c/angle/angle/+/2174719
Failed during roll in
https://ci.chromium.org/p/chromium/builders/try/linux-libfuzzer-asan-rel/466117
https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/437044
Bug: b/154030730
Change-Id: Ia1672b9ae8c86e9da135285101ca2d7f31301c2c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219044
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
02fa7313
|
2020-05-05T17:01:18
|
|
Vulkan:Initial worker thread disabled by default
Created new CommandProcessor class that can be run as a worker thread.
Running CommandProcessor within RendererVk as a worker thread that
takes a CommmandBufferHelper (CBH) ptr as the interface and processes
that CBH into a primary command buffer.
Main thread has a queue of CBH to draw from. After submitting a CBH to
the worker, it pulls next CBH from the queue. Worker thread releases CBH
back to the main thread queue when done.
Synchronization goes two ways:
1. Work submitted to worker thread is managaed with a mutex and
condition variable based around the work queue.
2. Available CBH ptrs for the main thread have a mutex and condition
variable that manages the CBH queue.
The worker thread is disabled by default, and, when enabled, it will
currently behave and perform as the non-threaded code. This is because
the kNumCommandBuffers const in ContextVk.h is set to 2. With only 2
command buffers, they will be assigned to the inside and outside
RenderPass command buffers respectively. Then, as soon as one is
submitted, the main thread will stall waiting for it to be completed
and put back into the queue mentioned in #2 above.
The next step is to move command submission to the worker thread and
update the number of command buffers so that processing/submission
will occur in parallel with the main thread. Right now there is a
race condition issue when attempting to run in parallel because the
main thread updates and submits the same primary command buffers
that are used in the worker thread, which is in violation of the
Vulkan spec.
The follow-on CL will fix this issue as the main thread will only
touch SecondaryCommandBuffers and the worker thread will be the
only thread touching the primary command buffers.
Bug: b/154030730
Change-Id: Ib0c518bbd7ca9a3a7e789f4e1f2f7131ddc0509e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174719
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7e48c9eb
|
2019-08-06T17:17:19
|
|
Add explicit integer casts
WebKit uses the -Wshorten-64-to-32 flag which warns on these cases.
Bug: 3439
Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
3e493c48
|
2019-07-29T16:27:01
|
|
Vulkan: Optimize memory allocation offset rounding
Use bit operation to compute memory alignment round up.
Tested with T-Rex, hotspot in roundUp resolved.
Bug: angleproject:3744
Change-Id: I55db941f588401a1d2d3d93f4d6b810e6b1aa95f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1725118
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a8ff8814
|
2019-03-05T07:06:32
|
|
Vulkan:Optimize SecondaryCommandBuffers
RELAND of this commit. Had to fix fuzzer build errors.
Optimize performance of SecondaryCommandBuffers and enable them as the
default build option.
To disable this set angle_enable_custom_vulkan_cmd_buffers=false in
your build args.
This CL enhances the PoolAllocator to have a "fast" mode that can
be enabled at class creation. This mode uses an alignment of 1 byte and
enables a fastAllocation() call that avoids some bookkeeping overhead.
The SecondaryCommandBuffer uses this fastAllocation() function.
Furthermore the fast path of fast allocate, using the current page,
is inlined for maximum speed.
Jamie Madill also updated the SecondaryCommandBuffers to pre-allocate
blocks so that the commands occur linearly in memory. This speeds up
processing with improved cache coherency and minimizes overhead when
recording commands.
Also the core Draw functions and their state updates are all inlined
as well as the common functions to initialize commands and to copy
command pointer data.
This change also includes some new, custom commands. One is
imageBarrier that is a specialized version of pipelineBarrier that only
performs a single image layout transition.
There are customized versions of various Draw commands to minimize
copying of parameters.
There are also specialized commands to bind[Graphics|Compute]Pipeline
that have the pipeline type built in to the command.
More custom commands and command data size optimizations will be made
in follow-on commits.
Bug: angleproject:3136
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1497418
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Change-Id: I621d8f8893308fca240b32390928e8ba0036cf06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535385
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
896e7811
|
2019-03-22T14:56:33
|
|
Revert "Vulkan:Optimize SecondaryCommandBuffers"
This reverts commit 2219b18c984ed69251f3db3c7b5fd69a2fa68c77.
Reason for revert: Failing to compile on ASAN builders:
https://ci.chromium.org/p/chromium/builders/try/linux-libfuzzer-asan-rel/134782
Currently blocking roll.
Original change's description:
> Vulkan:Optimize SecondaryCommandBuffers
>
> Optimize performance of SecondaryCommandBuffers and enable them as the
> default build option.
> To disable this set angle_enable_custom_vulkan_cmd_buffers=false in
> your build args.
>
> This CL enhances the PoolAllocator to have a "fast" mode that can
> be enabled at class creation. This mode uses an alignment of 1 byte and
> enables a fastAllocation() call that avoids some bookkeeping overhead.
> The SecondaryCommandBuffer uses this fastAllocation() function.
> Furthermore the fast path of fast allocate, using the current page,
> is inlined for maximum speed.
> Jamie Madill also updated the SecondaryCommandBuffers to pre-allocate
> blocks so that the commands occur linearly in memory. This speeds up
> processing with improved cache coherency and minimizes overhead when
> recording commands.
> Also the core Draw functions and their state updates are all inlined
> as well as the common functions to initialize commands and to copy
> command pointer data.
>
> This change also includes some new, custom commands. One is
> imageBarrier that is a specialized version of pipelineBarrier that only
> performs a single image layout transition.
> There are customized versions of various Draw commands to minimize
> copying of parameters.
> There are also specialized commands to bind[Graphics|Compute]Pipeline
> that have the pipeline type built in to the command.
> More custom commands and command data size optimizations will be made
> in follow-on commits.
>
> Bug: angleproject:3136
> Change-Id: I35453cc2656bc8c51f0d84d1adef106900aca9a5
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1497418
> Commit-Queue: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=tobine@google.com,syoussefi@chromium.org,jmadill@chromium.org
Change-Id: I1c0bfe864ff343eb8ea6c88556523f8715c981d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3136
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535998
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2219b18c
|
2019-03-05T07:06:32
|
|
Vulkan:Optimize SecondaryCommandBuffers
Optimize performance of SecondaryCommandBuffers and enable them as the
default build option.
To disable this set angle_enable_custom_vulkan_cmd_buffers=false in
your build args.
This CL enhances the PoolAllocator to have a "fast" mode that can
be enabled at class creation. This mode uses an alignment of 1 byte and
enables a fastAllocation() call that avoids some bookkeeping overhead.
The SecondaryCommandBuffer uses this fastAllocation() function.
Furthermore the fast path of fast allocate, using the current page,
is inlined for maximum speed.
Jamie Madill also updated the SecondaryCommandBuffers to pre-allocate
blocks so that the commands occur linearly in memory. This speeds up
processing with improved cache coherency and minimizes overhead when
recording commands.
Also the core Draw functions and their state updates are all inlined
as well as the common functions to initialize commands and to copy
command pointer data.
This change also includes some new, custom commands. One is
imageBarrier that is a specialized version of pipelineBarrier that only
performs a single image layout transition.
There are customized versions of various Draw commands to minimize
copying of parameters.
There are also specialized commands to bind[Graphics|Compute]Pipeline
that have the pipeline type built in to the command.
More custom commands and command data size optimizations will be made
in follow-on commits.
Bug: angleproject:3136
Change-Id: I35453cc2656bc8c51f0d84d1adef106900aca9a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1497418
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5546fb4f
|
2019-01-17T12:25:54
|
|
Vulkan:Adding custom pool allocator
Migrated pool allocator used by compiler to common.
Planning to use this for ANGLE custom command buffers so this some
refactoring in preparation for that work.
Added a unit test to check PoolAllocator functionality.
Bug: angleproject:2951
Reviewed-on: https://chromium-review.googlesource.com/c/1476953
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
Change-Id: I0b4f3d55ea1799e35c9799c221f7129233f30b24
Reviewed-on: https://chromium-review.googlesource.com/c/1492972
|
|
0546b538
|
2019-02-25T22:47:17
|
|
Revert "Vulkan:Adding custom pool allocator"
This reverts commit 941717496141b96f1d5817f31c2bb4a4e19847b9.
Reason for revert: crashes on Debug bots
Original change's description:
> Vulkan:Adding custom pool allocator
>
> Migrated pool allocator used by compiler to common.
>
> Planning to use this for ANGLE custom command buffers so this some
> refactoring in preparation for that work.
>
> Added a unit test to check PoolAllocator functionality.
>
> Bug: angleproject:2951
> Change-Id: I29618cfdb065b8a5fefd40719a35d27b1f6e99ef
> Reviewed-on: https://chromium-review.googlesource.com/c/1476953
> Reviewed-by: Jamie Madill <jmadill@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Tobin Ehlis <tobine@google.com>
TBR=ynovikov@chromium.org,jmadill@google.com,tobine@google.com,syoussefi@chromium.org
Change-Id: Id8c522bd1d94154e871211d975e801a55cc9c257
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2951, angleproject:3169
Reviewed-on: https://chromium-review.googlesource.com/c/1487977
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
94171749
|
2019-01-17T12:25:54
|
|
Vulkan:Adding custom pool allocator
Migrated pool allocator used by compiler to common.
Planning to use this for ANGLE custom command buffers so this some
refactoring in preparation for that work.
Added a unit test to check PoolAllocator functionality.
Bug: angleproject:2951
Change-Id: I29618cfdb065b8a5fefd40719a35d27b1f6e99ef
Reviewed-on: https://chromium-review.googlesource.com/c/1476953
Reviewed-by: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
47ca1b2f
|
2019-01-23T16:11:41
|
|
Revert "Vulkan: Adding custom pool allocator"
This reverts commit 05459e06fde5047ae8f5f90fe091c3255e6bc88e.
Reason for revert: Clusterfuzz bugs flagged this commit
Original change's description:
> Vulkan: Adding custom pool allocator
>
> Copied pool allocator used by compiler to common and hooking it up as
> custom allocator for CommandPools. Modified it to support reallocation.
>
> RendererVk now has a private poolAllocator and VkAllocationCallbacks
> struct. The allocation callbacks are initialized to static functions
> in RendererVk::initializeDevice() and then passed to CommandPool init()
> and destroy() functions.
>
> Using the pool allocator saves Command Pool/Buffer clean-up time which
> was showing us as a bottleneck is some cases.
>
> Bug: angleproject:2951
> Change-Id: I81aa8a7ec60397676fa722d6435029db27947ef4
> Reviewed-on: https://chromium-review.googlesource.com/c/1409867
> Commit-Queue: Tobin Ehlis <tobine@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=jmadill@chromium.org,tobine@google.com,ianelliott@google.com,syoussefi@chromium.org
Change-Id: I363a351667c4dddef79833061790da90de477e70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2951
Reviewed-on: https://chromium-review.googlesource.com/c/1430679
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>
|
|
05459e06
|
2019-01-17T12:25:54
|
|
Vulkan: Adding custom pool allocator
Copied pool allocator used by compiler to common and hooking it up as
custom allocator for CommandPools. Modified it to support reallocation.
RendererVk now has a private poolAllocator and VkAllocationCallbacks
struct. The allocation callbacks are initialized to static functions
in RendererVk::initializeDevice() and then passed to CommandPool init()
and destroy() functions.
Using the pool allocator saves Command Pool/Buffer clean-up time which
was showing us as a bottleneck is some cases.
Bug: angleproject:2951
Change-Id: I81aa8a7ec60397676fa722d6435029db27947ef4
Reviewed-on: https://chromium-review.googlesource.com/c/1409867
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|